Request Item variables via REST API

bernard6
Mega Expert

I have a Catalog Item that has variables.   When I perform a Get for a request Item for that Catalog Item (sc_req_item) via the REST API it doesn't return the values that were set for the variables on that Request Item.   Is there a way to have these included in the Get or a way to query that information from the REST API?

1 ACCEPTED SOLUTION

joshua_bice
Giga Expert

You need to use the variable ownership table (sc_item_option_mtom). Query by the Request Item and you'll get a list of variables for it.


View solution in original post

16 REPLIES 16

joshua_bice
Giga Expert

You need to use the variable ownership table (sc_item_option_mtom). Query by the Request Item and you'll get a list of variables for it.


Hi Joshua,



I see that is to get from Request Item, how about Catalog Tasks? How to pull the variables from task table?


image001.png


I don't see any table with the same relationship like sc_item_option_mtom.



Thanks,


Gabriel


What is shown on the Catalog Tasks is simply an overlay of what is shown on the RITM. Therefore, it's the exact same relationship (sc_item_option_mtom), you'll simply have to look for the Request Item of the Catalog Task instead of the Task itself.


Hi joshua,



Iam trying to post the catalog item's variable information using rest message through workflow attached to the catalog item. I coudn't get the variables to reference and capure there data to post. Can you please explain how we can achieve.(can you please provide any working code example to query and variables data.)



Thanks


Niranjan.