Click HERE to see how Saviynt Intelligence is transforming the industry. |
04/12/2022 12:55 PM
Hi All,
I'll appreciate if anyone can provide examples of the below JSONs :
1. Example of multiple API call in CreateticketJSON in serviceNow with call1 , call2 , call3 where each call create a snow REQ, RITM, and SCTASK by passing on the " number" from each reponse to the next call.
2. removeAccessJSON : for JIRA , by calling delete operation on the below url , an account can be removed from a jira group.
"url": "https://jiratest.wiley.com/rest/api/2/group/user?groupname=${entitlementValue.entitlement_value.repl...' ','%20')}&username=${account.accountID}",
"httpMethod": "DELETE",
However, when a Remove Access task is being created from user update rule by Inactivating the user, and the user has multiple jira entitlement, that task is not capturing any entitlement and not removing any entitlement,
I find this example which looks like can remove from multiple groups, I just need help with the second url structure, if anyone has used it for JIRA.
{
"call": [{
"name": "Group",
"connection": "acctAuth",
"url": "https://***********m/api/v2/users/${account.accountID}/group_memberships",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json"
},
{
"name": "Group",
"connection": "acctAuth",
"url": "https://***********m/api/v2/group_memberships/${for (Map map : response.Group1.message.group_memberships){if (map.group_id.toString().equals(entitlementValue.entitlementID)){return map.id;}}}",
"httpMethod": "DELETE",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json"
}
]
}
Thanks and Regards,
Bits
Solved! Go to Solution.
04/12/2022 01:54 PM
Hi Bitoshok,
1. Rest Connector supports multiple calls in Create Ticket JSON with a limitation as only the previous call response will be accessible in its successive call only. For Example, the response of Call1 can be accessed in Call2 only but not in Call3 or so on. Call3 will be able to access only the response of Call2.
Please find the attached sample for your reference
2. REST connector does not support removing multiple Access in the same task. Multiple tasks must be created to remove multiple access.
Thank you
Vedanth B.K
04/12/2022 01:54 PM
Hi Vedanth,
Thank you for the json example, I was trying to understand what's the right way to pass the number response to the next call, I believe "${response.message.result.number} as per your example would be able to achieve it.
However, I tried with the attached json example, and I'm not receiving any ticket number in the Saviynt task ,also neither req / ritm / sctask were crated, Please have a loook at the below ss
Once again, thanks for your help.
Regards,
Bits