When we submit a POST request to create a new access request, we want to pass a bunch of data in the ClientMetadata field, we want to be able to pass a json object as part of this so that in the workflow in a email we can include these values using the jsonpath variables, how can we accomplish this.
Hi Jothin.
That should be as simple as supplying clientMetadata
with the JSON object.
For example, if your JSON object is as follows:
metadata = {
"requestedAppId": "10293812",
"requestedAppName": "test-app"
}
Then just set clientMetadata
to that object before sending the request.
{
"requestedFor": [
"2c918084660f45d6016617daa9210584"
],
"requestType": "GRANT_ACCESS",
"requestedItems": [
{
"type": "ACCESS_PROFILE",
"id": "2c9180835d2e5168015d32f890ca1581",
"comment": "Requesting access profile for John Doe",
"clientMetadata": {
"requestedAppName": "test-app",
"requestedAppId": "2c91808f7892918f0178b78da4a305a1"
},
"removeDate": "2020-07-11T21:23:15.000Z"
}
],
"clientMetadata": metadata
}
is the request, I am getting this response:
{“detailCode”:“400.0 Bad request syntax”,“trackingId”:“aaa3e9b59f2341e9ac8b9cbc36535a77”,“messages”:[{“locale”:“en-US”,“localeOrigin”:“DEFAULT”,“text”:“The request could not be parsed.”},{“locale”:“und”,“localeOrigin”:“REQUEST”,“text”:“The request could not be parsed.”}],“causes”:}
To debug this, start eliminating attributes until it succeeds. That will help you narrow down which attribute is causing the issue.