We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug When calling document.list() and specifying instanceId as a filter, a 500 error is returned.
document.list()
instanceId
To Reproduce Execute the following code:
client.documents.list({ filter: { equals: { property: ["instanceId"], value: { externalId: "377471e4-c9cf-4a3b-9e35-49981c8b576a", }, }, }, limit: 1000, });
You will see an 500 error Internal server error. Please contact Cognite.
Internal server error. Please contact Cognite.
DocumentFilterValue
Label
{externalId: "your externalId"}
Expected behavior I was able to get a valid response with this request:
client.post( `/api/v1/projects/${PROJECT}/documents/list`, { data: { filter: { equals: { property: ["instanceId"], value: { space: "File_Search", externalId: "377471e4-c9cf-4a3b-9e35-49981c8b576a", }, }, }, limit: 1000, }, } );
In my humble opinion, we should modify the Label interface for example:
cognite-sdk-js/packages/stable/src/api/documents/types.gen.ts
Line 761 in c278e56
export type CogniteExternalId = string; export type CogniteSpace = string; export interface Label { externalId: CogniteExternalId; space: CogniteSpace; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
When calling
document.list()
and specifyinginstanceId
as a filter, a 500 error is returned.To Reproduce
Execute the following code:
You will see an 500 error
Internal server error. Please contact Cognite.
DocumentFilterValue
follows theLabel
interface, which results in{externalId: "your externalId"}
based on its definition.https://github.com/cognitedata/cognite-sdk-js/blob/c278e56ae3/packages/stable/src/api/documents/types.gen.ts#L317
Expected behavior
I was able to get a valid response with this request:
In my humble opinion, we should modify the
Label
interface for example:cognite-sdk-js/packages/stable/src/api/documents/types.gen.ts
Line 761 in c278e56
The text was updated successfully, but these errors were encountered: