and more in a single search tool across platforms. Read the announcement here. |
03/22/2024 06:13 AM
Hello Team,
I have a use case where i need to pass entitlement_value selected in the ARS request in the REST call. I got to know from other forum discussions that we cannot access entitlement objects in create account json.
Hence, i'm trying to use add access json with multiple calls to achieve this. Is this possible or do we have any limitations in Add access json too ?
Please provide me a sample add access json with 2 calls, call 1 should be patch call and call 2 should be create account, Post call.
Regards,
Suresh V.
Solved! Go to Solution.
03/24/2024 07:51 PM
Sample
{
"call": [
{
"name": "Group",
"connection": "acctAuth",
"url": "https://jira.xxx.com/rest/api/2/group/user?groupname=${entitlementValue.entitlement_value.replace(' ','+')}",
"httpMethod": "POST",
"httpParams": "",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201
]
}
},
{
"name": "Group",
"connection": "acctAuth",
"url": "https://jira.xxx.com/rest/api/2/group/user?groupname=${entitlementValue.entitlement_value.replace(' ','+')}",
"httpMethod": "POST",
"httpParams": "",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201
]
}
}
]
}
03/25/2024 10:50 AM
So do we have any limitations on the call names here ? So, when i tried with Call1 name as groups and call2 name as Call2 it didnt work only call 1 was successful.
But now i tried with both call1 and call2 names as groups it did work.
so do we have any limitations on the call names in Add access json ?
Regards,
Suresh V.
03/25/2024 07:37 PM
Call name should same as entitlement type name and that is limitation and how product works
03/26/2024 09:35 AM
Hi @rushikeshvartak ,
Can you provide me the syntax for passing a static value along with a dynamic cp value from users table in add access json https params ?
for instance, I'm using a if else statement as below.
\"spCustomAttribute2\":\"${if(entitlementValue?.entitlement_value=='SUPER_USER'){'SUPER_USER-OP_EE1:ADMIN'} else {'CALLCENTRE-OP_EE1:{user?.email}'}}\"
Here, i need to pass user's email dynamically. could you please provide the syntax to achieve this ?
Regards,
Suresh V.
03/26/2024 08:00 PM
\"spCustomAttribute2\": \"${if(entitlementValue?.entitlement_value == 'SUPER_USER') {'SUPER_USER-OP_EE1:ADMIN'} else {'CALLCENTRE-OP_EE1:' + user?.email}}\"