and more in a single search tool across platforms. Read the announcement here. |
11/28/2023 10:44 AM - edited 11/28/2023 10:46 AM
Hello,
I am getting the error during the 2nd call in the below Addaccessjson. Please let me know if there is anything wrong here. when i do the below to operations separately it gives the expected result.
${Map map = new HashMap(); ArrayList responseList=response.Access1.message.permissions.appGroup; int size = responseList.size();
int flag=0;
for (int i=0;i<size;i++)
{
if(responseList.get(i).appGroup.toString() == \"rx_dev\")
{
responseList.get(i).appGroupPermissions = [\"basic_access\"];
flag++;
}
}
if (flag != 1)
{map.put(\"appGroup\",\"tv_test\"); map.put(\"Permissions\",[\"manage_media_library\"]); responseList.add(map);} return responseList;}
First Access call is to get existing entitlement/permission(Not included in the post), call2 to either append or add a new entry.
Thanks
11/28/2023 07:35 PM
Please share full json
11/28/2023 11:46 PM
Add access json
{
"call": [
{
"name": "Access",
"connection": "userAuth",
"url": "https://xxx",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}"
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
}
},
{
"name": "Access",
"connection": "userAuth",
"url": "https://xxx",
"httpMethod": "PUT",
"httpParams": "{\"schemas\":[\"urn:ietf:params:scim:schemas:core:2.0:User\"],\"userName\":\"devtest12@kat\",\"name\":{\"givenName\":\"DevTest12\",\"familyName\":\"Test\"},\"department\":\"engineering\",\"permissions\":{\"companyPermissions\":[],\"appGroup\":${Map map = new HashMap(); ArrayList<String> responseList=response.Access1.message.permissions.appGroup; int size = responseList.size();for (int i=0;i<size;i++){if(responseList.get(i).appGroup.toString() == \"rx_dev\"){responseList.get(i).appGroupPermissions = [\"basic_access\"]; flag=1;}} if (flag != 1)
{map.put(\"appGroup\",\"tv_test\"); map.put(\"Permissions\",[\"manage_media_library\"]); responseList.add(map);} return responseList;}}}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
}
}
]
}
11/30/2023 04:53 AM
Hi @rushikeshvartak , Anything??
12/13/2023 02:06 PM
@NM is your issue resolved or still looking for assistance?
12/14/2023 02:52 AM
Hi Rishi,
Yes it is working now. Thanks Amit for your help
Regards,
NM
12/14/2023 04:07 AM
Can you share working JSON