Leveraging Intelligent Recommendations for Operational Transformation. AMS Partners click HERE | EMEA/APJ Partners click HERE |
04/12/2022 12:54 PM
Does anyone have an example json that does pagination to import users from Okta? Below is the json I'm trying and it keeps making the import job stick. This same json worked for other rest connectors.
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://.okta.com/api/v1/users?100",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}"
}
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "profile.login~#~char",
"displayname": "profile.displayName~#~char",
"customproperty2": "profile.email~#~char",
"customproperty1": "status~#~char"
},
"pagination":{
"nextUrl":{
"nextUrlPath":"${if(headers.Link.split(',')?.length > 1){for(int i=0;i<headers.Link.split(',')?.length;i++){if (headers.Link.split(',')[i].contains('next')){return headers.Link.split(',')[i].replace('<', '').replace('>;rel=\\\"next\\\"','').trim()}}}else{ return ''}}"
}
}
}
}
}
}
Solved! Go to Solution.
04/12/2022 01:50 PM
Hello Gary,
Please find below the sample JSON.
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://okta.com/api/v1/users",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/x-www-form-urlencoded",
"httpMethod": "GET"
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"customproperty1": "profile.login~#~char",
"name": "profile.login~#~char",
"accountID": "id~#~char",
"customproperty2": "profile.email~#~char",
"customproperty18": "profile.mobilePhone~#~char",
"customproperty6": "profile.firstName~#~char",
"customproperty9": "profile.lastName~#~char",
"displayname": "profile.displayName~#~char",
"customproperty15": "profile.employeeType~#~char",
"customproperty27": "lastLogin~#~char"
},
"pagination": {
"nextUrl": {
"nextUrlPath": "${(headers.Link?.contains(','))? headers.Link?.split(',')[1].replace('<', '').replace('>; rel=\"next\"','').trim() : ''}"
}
}
}
}
}
}
04/12/2022 01:50 PM
That worked, thank you!