REST API List Collector as Variable on submit_producer POST
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2023 05:45 AM
Hello,
we are using the following Rest API:
/api/sn_sc/servicecatalog/items/{sys_id}/submit_producer
We are able to populated all the fields except the List Collector type field called "personal_data_type".
This is the RAW Body we use
{
"variables":{
"short_description":"Test",
"description":"Test Description",
"personal_data_type":["Value"],
}
We tried passing the label, the value, adding the value/label with and without "[]" but same result.
When the Record Producer is submitted a List type field is populated in the Table.
From the Service Portal catalog item view everything works well but if we use the Rest API the field is not populated in the Table.
Can you please help us?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2023 07:13 AM
Try with below request body.
{
"variables":{
"short_description":"Test",
"description":"Test Description",
"personal_data_type":"sys_id_of_record_1,sys_id_of_record_2"
}
}
Make sure that the backend name of the variable is correct. If it is mapped to any field via Map to Field checkbox, then it's backend name might have changed to the backend name of the field to which it is mapped to.