Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Request for example of multiple API call in CreateticketJSON and removeAccessJSON

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on May 6 2020 at 04:27 UTC

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

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.
2 REPLIES 2

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on May 7 2020 at 10:33 UTC

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

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on May 7 2020 at 12:33 UTC

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

image



2. Thanks for the clarification , we found out enabling the option to create dependent task for each entitlement for remove access in the endpoint solved the issue.


Once again, thanks for your help.


Regards,

Bits

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.