Software team lead for Bechtel Center at Purdue here.
Problem: I was getting a "BAD_INPUT" error by utilizing the postItem() function.
Description: Consulted the api docs, and found this note on the data.attributes.displayName field:
Note that for A360 projects, this field is required.
Note that for BIM 360 projects, this field is reserved for future releases and should not be used. Use included[0].attributes.name for the file name.
The current version of postItem function utilizes the "CreateStorageDataAttributes" model within a "createItemData". A TypeScript compile error results from using "displayName" instead of "name" with this model, but using "name" results in a 400 error as shown below (1). By implementing a workaround and modifying by types file I could get it working (2).
It is quite possible I missed something, and I simply used something incorrectly.
Thank you for your work on this module, have a great day.
Supporting Docs:
1:
API ERROR CODE: 400
MESSAGE: BadRequest
BODY: {
jsonapi: { version: '1.0' },
errors: [
{
id: REDACTED,
status: '400',
code: 'BAD_INPUT',
title: 'One or more input values in the request were bad',
detail: 'Display name not found, should be in resource: "data.attributes.displayName".'
}
]
}
Howdy all,
Software team lead for Bechtel Center at Purdue here.
Problem: I was getting a "BAD_INPUT" error by utilizing the postItem() function.
Description: Consulted the api docs, and found this note on the data.attributes.displayName field:
The current version of postItem function utilizes the "CreateStorageDataAttributes" model within a "createItemData". A TypeScript compile error results from using "displayName" instead of "name" with this model, but using "name" results in a 400 error as shown below (1). By implementing a workaround and modifying by types file I could get it working (2).
It is quite possible I missed something, and I simply used something incorrectly.
Thank you for your work on this module, have a great day.
Supporting Docs: 1:
2: