Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/07/2024 10:33 AM
Hi Team,
We are trying to integrate a REST application. With the create account json, while creation of user we want to fetch the response and then align it with the account id field.
But in response we are getting the 201 code and the below field, in which the xxxxxxxx part we want to map as the accountid for the user.
Location : http://domain/names.nsf/api/doc/unid/xxxxxxxx
Create account json used is as below.
{
"accountIdPath": "call1.message.id",
"responseColsToPropsMap": {
"accountID": "call1.message.id~#~char"
},
"call": [
{
"connection": "acctAuth",
"name": "call",
"url": "http://xxxxxxxxx/names.nsf/api/xxx/documents?form=xxxxxx&computewithform=true",
"httpMethod": "POST",
"httpHeaders": {
"Authorization": "${access_token}",
"ContentType": "application/json"
},
"httpContentType": "application/json",
"httpParams": "{\"ShortName\": \"${user.username}\",\"FirstName\": \"${user.firstname}\",\"LastName\": \"${user.lastname}\",\"InternetAddress\": \"${user.email}\",\"MailAddress\": \"${user.email}\",\"password\": \"${password}\",\"form\": \"Person\",\"MailSystem\": \"1\"}",
"successResponses": {
"statusCode": [
200,
201,
204
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404,
405,
500
]
}
}
]
}
Can you please guide on what we need to select as part of the create json accountpathid, so that we can only fetch the xxxxxxxx value from the site that is coming in the response.
Thanks
08/07/2024 12:21 PM
Hi @DG1811 , can you share API response.
08/08/2024 02:57 AM - edited 08/08/2024 02:57 AM
Response received on user creation is as below and we need to pull the "xxxxxxxx" value.
08/08/2024 03:19 AM
"customproperty11": "#CONST#${call1.message.location.substring(call1.message.location.indexOf('uid/')+1,call1.message.location.length())}
08/08/2024 03:22 AM
08/08/2024 03:30 AM
{
"accountIdPath": "#CONST#${call1.message.location.substring(call1.message.location.indexOf('uid/')+1,call1.message.location.length())}",
"responseColsToPropsMap": {
"accountID":"#CONST#${call1.message.location.substring(call1.message.location.indexOf('uid/')+1,call1.message.location.length())}"
},
"call": [
{
"connection": "acctAuth",
"name": "call",
"url": "http://xxxxxxxxx/names.nsf/api/xxx/documents?form=xxxxxx&computewithform=true",
"httpMethod": "POST",
"httpHeaders": {
"Authorization": "${access_token}",
"ContentType": "application/json"
},
"httpContentType": "application/json",
"httpParams": "{\"ShortName\": \"${user.username}\",\"FirstName\": \"${user.firstname}\",\"LastName\": \"${user.lastname}\",\"InternetAddress\": \"${user.email}\",\"MailAddress\": \"${user.email}\",\"password\": \"${password}\",\"form\": \"Person\",\"MailSystem\": \"1\"}",
"successResponses": {
"statusCode": [
200,
201,
204
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404,
405,
500
]
}
}
]
}
08/08/2024 03:44 AM
Hi @NM ,
This is storing the constant value in the accountid field. Please find the snapshot for reference.
Please suggest a step where we can pull the account details.
Thanks
08/08/2024 03:47 AM
Make L captial in location
Should be Location.
08/08/2024 03:56 AM
It is still the same @NM .
08/08/2024 04:00 AM
Try this
#CONST#${response.call1.message.Location.substring(response.call1.message.Location.indexOf('uid/')+1,response.call1.message.Location.length())}
08/08/2024 04:21 AM
@DG1811 ,
try this
{
"accountIdPath": "#CONST#${call1.message.location.substring(call1.message.location.indexOf('uid/')+1,call1.message.location.length())}",
"responseColsToPropsMap": {
"accountID":"#CONST#${call1.message.location.substring(call1.message.location.indexOf('uid/')+1,call1.message.location.length())}~#~char"
},
"call": [
{
"connection": "acctAuth",
"name": "call",
"url": "http://xxxxxxxxx/names.nsf/api/xxx/documents?form=xxxxxx&computewithform=true",
"httpMethod": "POST",
"httpHeaders": {
"Authorization": "${access_token}",
"ContentType": "application/json"
},
"httpContentType": "application/json",
"httpParams": "{\"ShortName\": \"${user.username}\",\"FirstName\": \"${user.firstname}\",\"LastName\": \"${user.lastname}\",\"InternetAddress\": \"${user.email}\",\"MailAddress\": \"${user.email}\",\"password\": \"${password}\",\"form\": \"Person\",\"MailSystem\": \"1\"}",
"successResponses": {
"statusCode": [
200,
201,
204
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404,
405,
500
]
}
}
]
}
08/08/2024 06:08 AM
{
"responseColsToPropsMap": {
"accountID": "#CONST#${call1.message.location != null ? call1.message.location.substring(call1.message.location.indexOf('uid/') + 4) : ''}"
}
}
08/07/2024 05:54 PM
Please share postman screenshot and curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]
⚠️‼️‼️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.‼️‼️⚠️
08/16/2024 02:43 AM - last edited on 08/19/2024 12:56 AM by Sunil
Hi @rushikeshvartak and @NM ,
We had a recent update on the request and now we are getting the UNID (marked in yellow) in the response in headers but as part of a URL. Please find the attached details below.
Please let us know if there are any way we can pull this out and mark it to the accountId field.
Thanks
[This message has been edited by moderator to mask sensitive info]
08/16/2024 06:58 AM
call1.message.values.Location
08/16/2024 07:30 AM
Hi @rushikeshvartak ,
But it is coming in as body, rather the details are coming in headers and also the header value is just the URL, from which we need to take the UNID marked in yellow in the last image attached.
thanks
08/16/2024 07:57 AM
First try to see if you can read location in cp then we can do replace (one step at a time)
08/16/2024 09:18 AM
Hi @DG1811 is it not coming in response now?
call1.message.values.Location.substring(indexof('unid/'),call1.message.values.Location.length())
Try this
08/18/2024 11:43 PM
08/19/2024 02:26 AM
Did you tried above suggestion ?
08/19/2024 02:43 AM - last edited on 08/19/2024 03:16 AM by Sunil
Hi @rushikeshvartak ,
Yes, we tried. Below is what populated in the task view field. Task is only getting completed, whereas the user is created in the target as per the provisioning comments. Please find the snapshot below.
the Provisioning comment have below content.
{"call1":{"headers":"vgaSQhEEjr6zLpJD4bKRdntD5jelxiYW5X1U9YZaulMLPDk0XnZCiVKUyqj3ZO6/Mgo+18khbaGjCENb3jxrrCjzSFG0cS9PiFvc/BM5aeVW/chrN3erm6CeGrH4bQ4i8WWVP5hf2I3PZC5YGHZORXlry+NUSurhcfjri4khr1b0aGRit/MZzcWsfb96zZOmNxPqA/XuXWpuUocc2J+NMR4onHvRjPwcimMqGr7An24sE75xLjgduulbItXKnrtr8P6+AMOtxa1W4vKJ7sUAh/VETVmA5HgwdFYWbLV8S+j2l6kL0QVezQ8Sq7GKbiyznPFnyiin2P4fpTiVlC3RNm6Jew4XVy0K7jq8nd/gj3d4+0X5dZpLYu9xmhbBbhX2","message":"","statusCode":201,"description":null,"status":"Success"}}
Number of tries for provisioning
2
Thanks
[This message has been edited by moderator to mask sensitive information]
08/19/2024 02:51 AM
Now whats concern?
08/19/2024 02:56 AM
Hi @rushikeshvartak ,
The issue is still not resolved. As we are still not able to map the UNID value in the accountID field. Using this approach even the NEW ACCOUNT task is not getting completed. So we want to read the value in the header and post it in the accountid.
Thanks
08/19/2024 06:22 AM
08/20/2024 04:51 AM
Hi @rushikeshvartak ,
Can you please suggest us with the create account json format checking on the create account json attached in the snippet.
08/20/2024 05:26 AM
Missing attachment (attachment as text)
08/20/2024 05:32 AM
Hi @rushikeshvartak ,
Attached the createaccountjson.
{
"accountIdPath": "call1.message.id",
"responseColsToPropsMap": {
"accountID": "call1.message.id~#~char"
},
"call": [
{
"connection": "acctAuth",
"name": "call",
"url": "http://xxxxxxxxx/names.nsf/api/xxx/documents?form=xxxxxx&computewithform=true",
"httpMethod": "POST",
"httpHeaders": {
"Authorization": "${access_token}",
"ContentType": "application/json"
},
"httpContentType": "application/json",
"httpParams": "{\"ShortName\": \"${user.username}\",\"FirstName\": \"${user.firstname}\",\"LastName\": \"${user.lastname}\",\"InternetAddress\": \"${user.email}\",\"MailAddress\": \"${user.email}\",\"password\": \"${password}\",\"form\": \"Person\",\"MailSystem\": \"1\"}",
"successResponses": {
"statusCode": [
200,
201,
204
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404,
405,
500
]
}
}
]
}
08/20/2024 05:56 AM
Change JSON as per your API URL and response
{
"accountIdPath": "call2.message.accountID",
"responseColsToPropsMap": {
"accountID": "call2.message.accountID~#~char"
},
"call": [
{
"connection": "acctAuth",
"name": "call1",
"url": "http://xxxxxxxxx/names.nsf/api/xxx/documents?form=xxxxxx&computewithform=true",
"httpMethod": "POST",
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"httpParams": "{\"ShortName\": \"${user.username}\",\"FirstName\": \"${user.firstname}\",\"LastName\": \"${user.lastname}\",\"InternetAddress\": \"${user.email}\",\"MailAddress\": \"${user.email}\",\"password\": \"${password}\",\"form\": \"Person\",\"MailSystem\": \"1\"}",
"successResponses": {
"statusCode": [
200,
201,
204
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404,
405,
500
]
}
},
{
"connection": "acctAuth",
"name": "call2",
"url": "http://xxxxxxxxx/names.nsf/api/xxx/documents/${call1.response.id}",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404,
405,
500
]
}
}
]
}