I've encountered an issue while using the ACC API of Autodesk Platform Service. My runtime environment is Node.js+Express.
I referred to the following API for property querying: https://aps.autodesk.com/en/docs/acc/v1/reference/http/index-v2-index-jobs-batch-status-post/
Upon using it, the returned propertiesUrl and queryResultsUrl were in the following format:
https://bim360-nucleus-production-us-east-1-temporary-index.s3.amazonaws.com/{projectId}/index/v2/indexes/{indexId}/properties.ldjson.gz?X-Amz-Expires=60&X-Amz-Security-Token={{token_value}}-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential={{Credential_value}}/20231003/us-east-1/s3/aws4_request&X-Amz-Date=20231003T021812Z&X-Amz-SignedHeaders=host&X-Amz-Signature={{Amz_Signature_Value}}
However, the URI is structured in such a way that authentication credentials and other details aren't being recognized correctly, preventing me from accessing the property information.
Error received:
Error: 400 Bad Request <?xml version="1.0" encoding="UTF-8"?>
forge-api-app | <Error><Code>InvalidArgument</Code><Message>Only one auth mechanism allowed; only the X-Amz-Algorithm query parameter, Signature query string parameter or the Authorization header should be specified</Message><ArgumentName>Authorization</ArgumentName><ArgumentValue>Bearer {Secret}</ArgumentValue><RequestId>{RequestId}</RequestId><HostId>{HostID}</HostId></Error>
Other URLs, like the manifestUrl, are returned in the format like: https://developer.api.autodesk.com/construction/index/v2/projects/:projectId/indexes/:indexId/manifest
If anyone has experienced a similar issue or has found a solution, I would greatly appreciate your advice. Thank you for reading.
expample code:
async function getBatchStatus(header, containerID, versionDict) {
const bashStatus_url = PROJECT_URL + containerID + "/indexes:batch-status";
var jobsList = await post(bashStatus_url, header, JSON.stringify(versionDict));
return jobsList;
};