我正在使用ServiceNow API创建目录请求。
URL:
https://<ServiceNow>/api/sn_sc/servicecatalog/items/6e2cc01d4f51ce08d4fb2b8ca310c7a6/order_now
BODY:
{
"sysparm_quantity":"1",
"variables": {
"requestor":"6e2cc01d4f51ce08d4fb2b8ca310c7a6",
"Requested For":"6e2cc01d4f51ce08d4fb2b8ca310c7a6",
"Group Name":"01304c6ddbef9f0827673672399619c4",
"Group Domain":"FG",
"Rationale for Approver Only (this will not be viewed by fulfillment team)":"testing"
}
}
我收到此错误:
{
"error": {
"detail": "",
"message": "Mandatory Variables are required"
},
"status": "failure"
}
我怎么知道什么是必填字段?
我发现此ID将用于获取必需变量。https://<ServiceNow>/api/sn_sc/servicecatalog/items/<Item_ID>/variables
但是,我现在不在官方服务文档中找到它。不知道这是否是API扩展。