REST API Issue for service-now catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2017 10:56 AM
Hi I am planning to use REST API for service catalog in C# and facing below issue while testing. Please help me to fix this issue -
To test I navigated to "REST API Explorer" in service now. While testing Add Item To Cart (POST) call fails. Please refer attached screen short.
Error -
{
"error": {
"detail": "",
"message": "Invalid Quantity value"
},
"status": "failure"
}
Please help me what the issue is?
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2017 10:39 AM
Hi Eric,
Could you generate the curl code from the REST api explorer and post it - along the lines of my post Sept 12?
There may be some clues there!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2017 10:50 AM
I looked at the variables and it looks like that service_offering is the only mandatory variable.
I just don't know how to add the service_offering variable to the variables.
I get a 400 Bad Request "Mandatory Variables are required".
Below is the Request body with my 2 elements:
{"sysparm_quantity":"1","variables":"{\"service_offering\":\"56aedfba0ff1b100f178317ce1050e2e\"}"}
I think the problem is the variables element, it must not be formatted correctly, that's the only thing I can think of.