New: build custom CDF applications with Cognite Flows. Documentation · What's new.
const documents = await client.documents.search({
search: {
query: 'Stuck pipe'
},
filter: {
in: {
property: ['type'],
values: ['Document', 'PDF']
}
},
limit: 5
});{
"items": [
{
"item": {
"id": 2384,
"createdTime": 1519862400000,
"sourceFile": {
"name": "hamlet.txt",
"directory": "plays/shakespeare",
"source": "SubsurfaceConnectors",
"mimeType": "application/octet-stream",
"size": 1000,
"hash": "23203f9264161714cdb8d2f474b9b641e6a735f8cea4098c40a3cab8743bd749",
"assetIds": [],
"labels": [
{
"externalId": "play"
},
{
"externalId": "tragedy"
}
],
"geoLocation": {
"type": "Point",
"coordinates": [
10.74609,
59.91273
]
},
"datasetId": 4503599627370496,
"securityCategories": [],
"metadata": {}
},
"externalId": "haml001",
"instanceId": {
"space": "<string>",
"externalId": "<string>"
},
"title": "Hamlet",
"author": "William Shakespeare",
"producer": "<string>",
"modifiedTime": 1519958703000,
"lastIndexedTime": 1521062805000,
"mimeType": "text/plain",
"extension": "pdf",
"pageCount": 2,
"type": "Document",
"language": "en",
"truncatedContent": "ACT I\nSCENE I. Elsinore. A platform before the castle.\n FRANCISCO at his post. Enter to him BERNARDO\nBERNARDO\n Who's there?\n",
"assetIds": [
42,
101
],
"labels": [
{
"externalId": "my.known.id"
}
],
"geoLocation": {
"type": "Point",
"coordinates": [
10.74609,
59.91273
]
}
},
"highlight": {
"name": [
"amet elit <em>non diam</em> aliquam suscipit"
],
"content": [
"Nunc <em>vulputate erat</em> ipsum, at aliquet ligula vestibulum at",
"<em>Quisque</em> lectus ex, fringilla aliquet <em>eleifend</em> nec, laoreet a velit.\n\nPhasellus <em>faucibus</em> risus arcu"
]
}
}
],
"nextCursor": "<string>"
}const documents = await client.documents.search({
search: {
query: 'Stuck pipe'
},
filter: {
in: {
property: ['type'],
values: ['Document', 'PDF']
}
},
limit: 5
});{
"items": [
{
"item": {
"id": 2384,
"createdTime": 1519862400000,
"sourceFile": {
"name": "hamlet.txt",
"directory": "plays/shakespeare",
"source": "SubsurfaceConnectors",
"mimeType": "application/octet-stream",
"size": 1000,
"hash": "23203f9264161714cdb8d2f474b9b641e6a735f8cea4098c40a3cab8743bd749",
"assetIds": [],
"labels": [
{
"externalId": "play"
},
{
"externalId": "tragedy"
}
],
"geoLocation": {
"type": "Point",
"coordinates": [
10.74609,
59.91273
]
},
"datasetId": 4503599627370496,
"securityCategories": [],
"metadata": {}
},
"externalId": "haml001",
"instanceId": {
"space": "<string>",
"externalId": "<string>"
},
"title": "Hamlet",
"author": "William Shakespeare",
"producer": "<string>",
"modifiedTime": 1519958703000,
"lastIndexedTime": 1521062805000,
"mimeType": "text/plain",
"extension": "pdf",
"pageCount": 2,
"type": "Document",
"language": "en",
"truncatedContent": "ACT I\nSCENE I. Elsinore. A platform before the castle.\n FRANCISCO at his post. Enter to him BERNARDO\nBERNARDO\n Who's there?\n",
"assetIds": [
42,
101
],
"labels": [
{
"externalId": "my.known.id"
}
],
"geoLocation": {
"type": "Point",
"coordinates": [
10.74609,
59.91273
]
}
},
"highlight": {
"name": [
"amet elit <em>non diam</em> aliquam suscipit"
],
"content": [
"Nunc <em>vulputate erat</em> ipsum, at aliquet ligula vestibulum at",
"<em>Quisque</em> lectus ex, fringilla aliquet <em>eleifend</em> nec, laoreet a velit.\n\nPhasellus <em>faucibus</em> risus arcu"
]
}
}
],
"nextCursor": "<string>"
}Documentation Index
Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
Use this file to discover all available pages before exploring further.
Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.
Fields to be set for the search request.
Filter with exact match
Show child attributes
A query that matches items matching boolean combinations of other queries.
It is built using one or more boolean clauses, which can be of types: and, or or not
Show child attributes
List of properties to sort by. Currently only supports 1 property.
1 elementShow child attributes
Maximum number of items. When using highlights the maximum value is reduced to 20.
0 <= x <= 1000Cursor for paging through results.
Whether or not matches in search results should be highlighted.
Was this page helpful?