I'm trying to translate an object I've previously uploaded to a Forge bucket, but I'm getting a parameter error. I'm assuming the URN is the issue. I can confirm that the object is uploaded properly, as I have been able to download it from the bucket.
My code is as follows:
I use the getObjectDetails call to get the object URN as the object ID:
static getObjectUrn (oAuth2TwoLegged, objectName, callback) {
ObjectsApi.getObjectDetails(bucketKey, objectName, {}, oAuth2TwoLegged, oAuth2TwoLegged.getCredentials()).then((resp) => {
callback(null, resp.body.objectId);
}, callback);
}
I get back something like: urn:adsk.objects:os.object:configtest2/f8d215f7-9ff0-474a-87b9-632ca745b39eresult.zip
My request body looks like this:
let data = urn;
var buf = new Buffer(data, 'base64');
var plain_buf = buf.toString();
console.log(plain_buf);
const resolvedTemplate = {
'input': {
"urn": plain_buf,
"compressedUrn": true,
"rootFilename": self.rootFilename
},
'output': {
"destination": {
"region": "us"
},
"formats": [
{
"type": "svf",
"views": [
"3d"
]
}
]
},
};
I've tried a couple different variations of the urn before and after encoding it, to no avail. My root file name is PlaysetGA.iam, although this is a .zip folder, so I've also tried the path inside the folder which is Playset/PlaysetGA.iam.
I've checked out the following page: https://forge.autodesk.com/en/docs/model-derivative/v2/tutorials/prepare-file-for-viewer/ and this question: Model Derivative API Post Job - 400 Bad Request "Invalid 'design' parameter"
This is the response I'm getting: {"diagnostic":"Invalid 'design' parameter."}
Obviously, I'm missing something. Thanks!
Edit: I've updated my .zip folder so my rootfile is in the base file path. This the the root directory: