Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/27/2024 05:13 PM - edited 08/27/2024 05:22 PM
Hi Team,
Im using sav4sav update user json which will trigger an run time analytics for fetching and updating users. The thing is its fetching user and pending task is created but once we complete the task it is not updating the user.
Attaching the updateuserjson below.
{
"actions": {
"Update Login": {
"call": [
{
"name": "Update Login",
"callOrder": 0,
"connection": "userAuth",
"url": "url/ECM/api/v5/fetchRuntimeControlsDataV2",
"httpMethod": "GET",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"1557\",\"username\":\"${username}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200
]
}
},
{
"name": "Update Login",
"callOrder": 1,
"connection": "userAuth",
"url": "url/ECM/api/v5/updateUser",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"username\":\"${response.'Update Login'.message.result[0].USERNAME}\",\"customproperty1\":\"${response.'Update Login'.message.result[0].CUSTOMPROPERTY1}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}
}
}
Analytics query:
Select username as username, 'Testing Success' as customproperty1 from users where customproperty1 = '${customproperty1}'
can someone help me what is the issue?
Thanks in advance
Srinivas N
08/27/2024 07:17 PM
08/27/2024 08:19 PM
Hi @Srinivas_N keep static data in username what I have seen it doesn't work with passing dynamic value.
08/27/2024 08:34 PM
Hi @rushikeshvartak / @NM ,
I tried passing static value but no luck, tried below query
08/27/2024 08:36 PM
Share logs
08/27/2024 08:46 PM
attaching the screenshot for logs
08/27/2024 08:47 PM
Share text file
08/27/2024 08:51 PM
Hi @Srinivas_N , try this json
{
"actions": {
"Update Login": {
"call": [
{
"name": "Update Login",
"callOrder": 0,
"connection": "userAuth",
"url": "url/ECM/api/v5/fetchRuntimeControlsDataV2",
"httpMethod": "GET",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"1557\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200
]
}
},
{
"name": "Update Login",
"callOrder": 0,
"connection": "userAuth",
"url": "url/ECM/api/v5/updateUser",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"username\":\"${response.'Update Login1.message.result[0].USERNAME}\",\"customproperty1\":\"${response.Update Login1.message.result[0].CUSTOMPROPERTY1}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}
}
}
08/27/2024 08:55 PM
08/27/2024 08:57 PM
Logs does not have any relevant information. share logs for 5 minutes after running job
08/27/2024 09:14 PM
@NM ,
I tried with your json but it didnt work
08/27/2024 09:18 PM
@Srinivas_N try this
{
"actions": {
"Update Login": {
"call": [
{
"name": "call1",
"callOrder": 0,
"connection": "userAuth",
"url": "url/ECM/api/v5/fetchRuntimeControlsDataV2",
"httpMethod": "GET",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"1557\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200
]
}
},
{
"name": "call2",
"callOrder": 0,
"connection": "userAuth",
"url": "url/ECM/api/v5/updateUser",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"username\":\"${response.call1.message.result[0].USERNAME}\",\"customproperty1\":\"${response.call1.message.result[0].CUSTOMPROPERTY1}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}
}
}
08/27/2024 09:15 PM
08/27/2024 09:17 PM
Whenever your sharing logs first check whether job name or report name exists in report.
Share log file as .txt
08/27/2024 09:33 PM - edited 08/27/2024 09:34 PM
Use below JSON
{
"actions": {
"Update Login": {
"call": [
{
"name": "Update Login",
"connection": "userAuth",
"url": "url/ECM/api/v5/FetchRuntimeControlsData",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"1557\",\"attributes\":{\"username\":\"${user.username}\"}}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200,
201
]
}
},
{
"name": "Update Login",
"connection": "userAuth",
"url": "url/ECM/api/v5/updateUser",
"httpMethod": "POST",
"httpParams": "{\"username\":\"${response.'Update Login'.message.result[0].USERNAME}\",\"customproperty1\":\"${response.'Update Login'.message.result[0].CUSTOMPROPERTY1}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"message": "User Updated Successfully",
"statusCode": [
200,
201
]
},
"unsuccessResponses": {
"statusCode": [
500,
403,
409,
412
]
}
}
]
}
}
}
08/28/2024 02:10 AM
Hi @naveenss , need your input on this can you please help
08/28/2024 06:33 AM
Did you tried above last json shared
08/28/2024 06:40 AM
yes tried above json its not working
08/28/2024 06:55 AM
Share logs and config /json screenshot
08/29/2024 06:40 AM
@Srinivas_N the below JSON is working for me in 24.4. I've created a v2 runtime analytics
{
"actions": {
"Update Login": {
"call": [
{
"name": "Update Login",
"connection": "userAuth",
"url": "https://url/ECM/api/v5/fetchRuntimeControlsDataV2",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"analyticsid\":\"1519\",\"attributes\":{\"username\":\"${user.username}\"}}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [
200,
201
]
}
},
{
"name": "Update Login",
"connection": "userAuth",
"url": "https://url/ECM/api/v5/updateUser",
"httpMethod": "POST",
"httpParams": "{\"username\":\"${response.'Update Login'.message.results[0].username}\",\"customproperty1\":\"${response.'Update Login'.message.results[0].customproperty1}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"message": "User Updated Successfully",
"statusCode": [
200,
201
]
},
"unsuccessResponses": {
"statusCode": [
500,
403,
409,
412
]
}
}
]
}
}
}