Need to Create a Request from REST API

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 12:16 AM
Hi There,
I have one requirement, i need to create a New Hire/Transfer Request from REST API,
For this i have navigated to REST API Explorer
And selected below fields,
Namespace : sn_sc
API Name : Service Catalog API
API Version : latest
Add Item to Cart(POST) method i have used
In Path Parameters:
sys_id: sysid of the Catalog Item
and in the Raw body
{
"sysparm_quantity":1,
"variables":{
"requestor":"Zagone, Tara",
"officer_group_approval":"Fu, Judy",
"full_name":"Test",
"employment_type":"Consultant",
"access_required_from":"Home PC",
"declaration":"The computer in question does not currently have any viruses, worms, etc. to my knowledge"
}
}
and when i Run this i'm getting the Error in Response body(400 Bad Request) ie,
{
"error": {
"message": "Mandatory Variables are required",
"detail": ""
},
"status": "failure"
}
Can anyone please help me to get the proper solution
Thanks,