- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2022 09:43 AM
Using Rest API Explorer to create a catalog request item im facing an issue with when im passing the all mandatory variables values in request body but i was received a response body as a
POST https://coniferdev.service-now.com/api/sn_sc/servicecatalog/items/{sys_id}/add_to_cart
Response Body
{
"error": {
"message": "Mandatory Variables are required", //even though passing the all mandatory variables values
"detail": ""
},
"status": "failure"
}
Request Body
{"caller":"06b978111bc3c090f1e6b9d51a4bcbeb","short_description":"Test","requested_for":"06b978111bc3c090f1e6b9d51a4bcbeb","additional_comments":"Test","sysparm_quantity":"1","configuration_item":"ACE-SOSDVL:FTP","business_service":"AnyConnect VPN"}
There is 2 variable sets called 1 is for additional comments and 1 for caller/ requested for this are mandatory for other catalog items . please anyone give me a solution on this issue .
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2022 09:59 AM - edited 12-11-2022 09:59 AM
In your request body, try this format
{
"sysparm_quantity": "1",
"variables":
{
"caller":"06b978111bc3c090f1e6b9d51a4bcbeb",
"short_description":"Test",
"requested_for":"06b978111bc3c090f1e6b9d51a4bcbeb",
"additional_comments":"Test",
"configuration_item":"ACE-SOSDVL:FTP",
"business_service":"AnyConnect VPN"
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2022 09:59 AM - edited 12-11-2022 09:59 AM
In your request body, try this format
{
"sysparm_quantity": "1",
"variables":
{
"caller":"06b978111bc3c090f1e6b9d51a4bcbeb",
"short_description":"Test",
"requested_for":"06b978111bc3c090f1e6b9d51a4bcbeb",
"additional_comments":"Test",
"configuration_item":"ACE-SOSDVL:FTP",
"business_service":"AnyConnect VPN"
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2022 12:32 AM
The issue has been solved . Thank you