How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Cognite Documents API

A document is a file that has been indexed by the document search engine.Every time a file is uploaded, updated or deleted in the Files API, it will alsobe scheduled for processing by the document search engine. After some processing,it will be possible to search for the file in the document search API.The document search engine is able to extract content from a variety of documenttypes, and perform classification, contextualization and other operations on thefile. This extracted and derived information is made available in the form of a`Document` object.The document structure consists of a selection of derived fields, such as the`title`, `author` and `language` of the document, plus some of the original fieldsfrom the raw file. The fields from the raw file can be found in the`sourceFile` structure. The derived fields are described in more detail below.### Derived fields#### titleSome document types (such as PDFs) contain additional metadata fields. If thedocument contains its title as part of this metadata, this field will be populatedwith that title.Note that we do not currently extract the title from the document content itself.If there is a need for this, we may consider adding such functionality in the future.#### authorSimilar to the `title` field, the author field is another field that can often beextracted from the document's metadata.#### producerThe `producer` field also exists in the document metadata. It contains informationabout the software or the system that was used to create the document.#### createdTimeThe `createdTime` we assign to the document is not exactly the same as the one foundin the Files API. We first try to extract the created time from the document metadata.If the document does not contain such a timestamp, we fall back to the time set inthe Files API.#### mimeTypeIf there is a mime type set in on the file in the Files API, this field will be setto the same mime type. If there is no mime type set on the file, we will try toauto-detect it.#### extensionThis field contains the extension of the file, derived from the file name. Forinstance, if the file name is `My Document.docx`, the `extension` field will contain`docx`.#### pageCountContains the number of pages in the document, if possible to determine.#### typeThe `type` field contains a high level file type, derived from the mime type. Mimetypes are not that pleasant to look at, and not always easy to understand. That iswhy we map the mime types into more user-friendly types. Below is the list of typescurrently returned, but be aware that this list may be extended in the future.- `Document`: Document files from Microsoft Word or similar word processing software.- `PDF`: PDF files.- `Spreadsheet`: Files from Microsoft Excel or similar spreadsheet software.- `Presentation`: Slides from Microsoft Powerpoint or similar.- `Image`: Any kind of image such as PNG or JPG files.- `Video`: Any kind of video such as MOV or MP4 files.- `Tabular data`: Csv, tsv and other kinds of tabular data files.- `Plain text`: Plain text files.- `Compressed`: ZIP files and other kinds of compressed archive files.- `Script`: Program code such as python or matlab.- `Other`: Anything that doesn't fit in any of the above types.#### geoLocationIf there is a geolocation set on the file in the Files API, then this field will containthe same geolocation. If there is no explicitly assigned geolocation, the documentprocessing system will try to detect a location using two different techniques;1. We will extract locations from files that contain embedded GPS locations. Photos and videos often have this kind of metadata.2. We will look at related assets that have locations, and assign the same location(s) to the document.### File type supportWe create a document for each uploaded file, but only derive data from certain files.The following file types are eligible for further data extraction & enrichment:- PDF files- Spreadsheets, documents, and presentations from the Microsoft, Libre Office and macOS office suites- Plain text files- Images

Cognite Documents API is one of 90 APIs that Cognite publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Documents. The published artifact set on APIs.io includes an OpenAPI specification.

This API exposes 5 operations across 5 paths, and defines 87 schemas. It is described by OpenAPI 3.2.0, at version v1.

Requests are made against a single base URL, https://{cluster}.cognitedata.com/api/v1/projects/{project}.

5 operations 5 paths 87 schemas 5 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
API Version
v1
Base URL
https://api.cognitedata.com
Authentication
HTTP Bearer, OAuth 2.0, OAuth 2.0, OAuth 2.0, OpenID Connect
Resource Areas
1

Authentication & Security 5

Cognite Documents API declares 5 security schemes for authenticating requests. It accepts HTTP bearer tokens (OpenID Connect or OAuth2 token) (oidc-token). It supports OAuth 2.0 (oauth2-client-credentials) using the clientCredentials flow, exposing 1 scope. It supports OAuth 2.0 (oauth2-auth-code) using the authorizationCode flow, exposing 1 scope. It supports OAuth 2.0 (oauth2-open-industrial-data) using the clientCredentials flow, exposing 1 scope. It supports OpenID Connect (org-oidc-token) discovered at https://auth.cognite.com/.well-known/openid-configuration. By default, every request must be authenticated.

  • oidc-token — 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 acce…
  • oauth2-client-credentials — 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 acce…
  • oauth2-auth-code — 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 acce…
  • oauth2-open-industrial-data — Auth flow for Open Industrial Data. Get your client secret from https://hub.cognite.com/open-industrial-data-211.
  • org-oidc-token — Access token issued by the Cognite authorization server, and valid for the target organization. The token must be an OpenID Connect token, and it can be obtain…

Paths & Operations 5

Across 5 paths, the API surfaces 5 operations — 5 POST. Each is listed below with its method, path, parameters, and response codes.

Documents 5

A document is a file that has been indexed by the document search engine. Every time a file is uploaded, updated or deleted in the Files API, it will also be scheduled for process…

POST
/documents/search
Search for documents
documentsSearch body → 200400
POST
/documents/passages/search
Semantic search for passages
documentsPassagesSearch body → 200400
POST
/documents/aggregate
Aggregate documents
documentsAggregate body → 200400
POST
/documents/list
List documents
documentsList body → 200400
POST
/documents/content
Retrieve document content
documentsContentPost body → 200400

Schemas 87

The contract defines 87 schemas that model the data the API accepts and returns. The most detailed are Document (19 properties), DocumentSourceFile (12 properties), DocumentPassageLocation (5 properties), Error (4 properties). Each schema is shown below with its type and property counts.

Label
object
A label assigned to a resource.
1 property 1 required
DocumentPassagesSearchItem
object
Each item contains the semantic match and the relevant document it belongs to.
3 properties 3 required
DocumentSearchHighlight
object
1 property
DocumentSearchRequest
DocumentsAggregateCardinalityPropertiesItem
object
1 property 1 required
DocumentsAggregateUniqueValuesResponse
object
Response for uniqueValues aggregate.
1 property 1 required
DocumentFilterGeoJsonDisjoint
object
1 property 1 required
DocumentAggregateFilterBool
object
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
DocumentFilterContainsAll
object
1 property 1 required
DocumentFilterValueList
array
One or more values you wish to find in the provided property.
DocumentContentExternalId
object
1 property 1 required
DocumentFilterGeoJsonWithin
object
1 property 1 required
CogniteInternalId
integer
A server-generated ID for the object.
DocumentPassagesFilter
object
A JSON based filtering language. See detailed documentation above.
DocumentSearch
object
1 property
DocumentFilterProperty
array
Property you wish to filter. It's a list of strings to allow specifying nested properties. For example, If you have the object {"foo": {"../bar": "baz"}, "bar"…
DocumentFilterInAssetSubtree
object
1 property 1 required
DocumentFilterIn
object
1 property 1 required
DocumentsAggregateCardinalityValuesResponse
object
Response for cardinalityValues aggregate.
1 property 1 required
DocumentsAggregateCardinalityValuesRequest
object
Find approximate number of unique values.
DocumentsAggregateAllUniquePropertiesItem
object
2 properties 2 required
DocumentFilterValue
Value you wish to find in the provided property.
DocumentFilterGeoJsonIntersects
object
1 property 1 required
DocumentSearchLimit
object
1 property
DocumentFilterSemanticSearch
object
1 property 1 required
DocumentsAggregateUniquePropertiesRequest
object
Top unique metadata property names
DocumentsAggregateUniqueValuesRequest
object
Top unique values for given properties.
2 required
DocumentCursor
object
1 property
DocumentsAggregateAllUniquePropertiesRequest
object
Find all metadata property names
DocumentListLimit
object
1 property
DocumentGeoJsonGeometry
object
GeoJSON Geometry.
3 properties 1 required
DocumentPassagesSearchPassageExpansionSymmetric
object
2 properties 2 required
DocumentsAggregateUniquePropertiesResponse
object
Response for the uniqueProperties aggregate.
1 property 1 required
EpochTimestamp
integer
The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
DocumentHighlight
object
Highlighted snippets from name and content fields which show where the query matches are. The matched terms will be placed inside tags
2 properties 2 required
DocumentFilterLexicalSearch
object
1 property 1 required
CogniteExternalId
string
The external ID provided by the client. Must be unique for the resource type.
DocumentListRequest
DocumentsAggregateAllUniqueValuesResponse
object
Response for allUniqueValues aggregate.
2 properties 1 required
DocumentFilterContainsAny
object
1 property 1 required
DocumentAggregateFilterPrefix
object
1 property 1 required
DocumentSearchItem
object
2 properties 1 required
DocumentFilterEquals
object
1 property 1 required
DocumentFilterRange
object
1 property 1 required
DocumentPassagesSearchFilter
object
Narrow down search results. You must specify atleast one filter of type semanticSearch, lexicalSearch or both.
1 property 1 required
DocumentFilterPrefix
object
1 property 1 required
DocumentContentInstanceId
object
1 property 1 required
LabelList
array
A list of the labels associated with this resource item.
PassageDocument
object
A document
4 properties 2 required
DocumentSearchFilter
object
Filter with exact match
1 property
CogniteInstanceId
object
The ID of an [instance in Cognite Data Models](https://docs.cognite.com/cdf/dm/dmconcepts/dmspacesinstancesinstance).
2 properties 2 required
DocumentsAggregateCountResponse
object
Response for count aggregate.
1 property 1 required
DocumentSearchInAggregate
object
1 property
DocumentAggregateFilter
object
A JSON based filtering language. See detailed documentation above.
DocumentPassagesSearchPassageExpansion
object
1 property 1 required
Document
object
A document
19 properties 3 required
DocumentsAggregateCardinalityValuesItem
object
1 property 1 required
DocumentsAggregateAllUniqueValuesItem
object
2 properties 2 required
DocumentPassagesFilterLeaf
object
Leaf filter
DocumentsAggregateAllUniquePropertiesResponse
object
Response for the allUniqueProperties aggregate.
2 properties 1 required
DocumentFilterRangeValue
number
Value you wish to find in the provided property using a range clause.
DocumentFilterExists
object
1 property 1 required
DocumentSort
object
1 property
DocumentsAggregateCountRequest
object
Count of documents.
DocumentPassagesFilterBool
object
A query that matches items matching boolean combinations of other queries. Currently only supports and clause.
DocumentsAggregateUniqueValuesItem
object
2 properties 2 required
PassageSourceFile
object
The source file that this document is derived from.
2 properties 1 required
DocumentPassageLocation
object
Insight about a search result
5 properties
DocumentAggregateFilterLeaf
object
Leaf filter
DocumentsAggregateCardinalityPropertiesRequest
object
Find approximate number of unique properties.
DocumentContentInternalId
object
1 property 1 required
DocumentPassagesSearchRequest
DocumentsAggregateCountItem
object
1 property 1 required
DocumentSourceFile
object
The source file that this document is derived from.
12 properties 1 required
DocumentFilterLeaf
object
Leaf filter
DocumentFilter
object
A JSON based filtering language. See detailed documentation above.
DocumentsAggregateAllUniqueValuesRequest
object
Paginated list of all unique values for given properties.
2 required
DocumentsAggregateUniquePropertiesItem
object
2 properties 2 required
DocumentContentRequest
DocumentsAggregateCardinalityPropertiesResponse
object
Response for cardinalityProperties aggregate.
1 property 1 required
DocumentPassagesSearchLimit
object
1 property
DocumentListFilter
object
Filter with exact match
1 property
DocumentFilterBool
object
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
DocumentSortItem
object
2 properties 1 required
DocumentFilterSearch
object
1 property 1 required
Error
object
Cognite API error.
4 properties 2 required
DocumentAggregateValue

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

cognite-documents-api-openapi.yml Raw ↑

Other APIs Cognite publishes across the network.

Cognite Data Fusion API
Cognite 3D Asset Mapping API
Cognite 3D Files API
Cognite 3D Jobs API
Cognite 3D Model Revisions API
Cognite 3D Models API
Cognite Annotations API
Cognite Assets API
Cognite Connections API
Cognite Containers API
Cognite Data models API
Cognite Data point subscriptions API
Where this information came from

This is an independent, third-party profile of Cognite Documents API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.