I’m having problems with an API that uses an Experience endpoint method to trigger an experience workflow.
the endpoint is https://csi-cbm.onlosant.com and path to the endpoint is /api/custom-scripts/execute-scripts so I’m trying to post my payload data to https://csi-cbm.onlosant.com/api/custom-scripts/execute-scripts
The main part of the workflow is this:
if (!payload._working) {
payload._working = {};
}
let rows = ;
payload.data.body.scriptIds.forEach(sId => {
payload.data.body.assetIds.forEach(aId => {
rows.push({
scriptId: sId,
assetId: aId,
status: ‘NEW’,
scheduledTime: payload._working.scheduledTime,
timeToDeploy: payload.data.body.timeToExecute
});
});
});
payload._working.rows = rows;
From that, and debug output of a workflow that was triggered within the application, I’m providing this payload:
{
“data”: {
“body”: {
“deployWithProxy”: false,
“clearPartialCacheList”: true,
“assetIds”: [
“6182c2565a5de23fa275ebe2”
],
“scriptIds”: [
“620c17d514c9d8dd74316444”
]
}
}
}
and finally, the headers that go with my POST request.
‘accept’ => ‘application/json’
‘authorization’ => 'Bearer ’
‘cache-control’ => ‘no-cache’
‘content-type’ => ‘application/json’
‘host’ => ‘csi-cbm.onlosant.com’
‘user-agent’ => ‘Mozilla/5.0’
So, the question is, why am I getting “Authorization Required” ?