- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2019 12:04 PM
HI All,
I'm using the REST API explorer to submit an existing Service Catalog Request.
For this, on the REST API Explorer GUI: I chose the "Service Catalog API" and "BUY Item (Post)"
I pass the sys_id of the existing Service Catalog Item that I want to open, along with sysparm_quantity = 1
I click SEND and it works perfectly. The catalog item opens, the REQ, the RITM and the WF on that item fires.
Now I have 1 variable on that catalog item called my_variable.
In the API Explorer, how do I pass a value into my_variable?
I have tried several syntax suggested by users but none have worked.
This was the last attempt to pass the word "testing" into the RITM variable called my_variable.
When I send, I get 404 Not Found "Invalid Request"
Am I using the right API to submit a catalog request and at the same time passing a variable?
This perfectly opens the catalog item, just can't pass a value to the variable on this catalog item.
{"sysparm_quantity":"1","variables":"{my_variable:testing}"}
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2019 03:19 PM
Instead of using builder, please select raw tab and use the below body
{
"sysparm_quantity":"1",
"variables":{
"my_testing":"testing"
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2019 01:49 PM
Submit your variable value in quotes
as "testing"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2019 03:03 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2019 03:19 PM
Instead of using builder, please select raw tab and use the below body
{
"sysparm_quantity":"1",
"variables":{
"my_testing":"testing"
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2019 03:58 PM
I cannot thank you enough.
This has been driving me crazy all day.
I've been trying every syntax possible.
Adding the syntax as RAW worked.
Thanks.
{
"sysparm_quantity":"1",
"variables":{
"my_variable":"testing"
}
}