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 Functions API

Functions enables Python code to be hosted and executed in the cloud, on demand or by using a schedule. Execution, status and logs are available through the API. A function is uploaded to the Files API as a zip file with at least a Python file called `handler.py` (unless specified otherwise through the `functionPath`-argument) that must contain a function named `handle` with any of the following arguments: `data`, `client`, `secrets`, or 'function_call_info', which are passed into the function. The latest version of Cognite SDK's are available, and additional python packages and version specifications can be defined in a `requirements.txt` in the root of the zip.

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

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

This API exposes 9 operations across 7 paths, and defines 24 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}.

9 operations 7 paths 24 schemas 4 GET5 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 Functions 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 9

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

Functions 9

Functions enables Python code to be hosted and executed in the cloud, on demand or by using a schedule. Execution, status and logs are available through the API. A function is upl…

GET
/functions
List functions
getFunctions 1 param → 200400
POST
/functions
Create functions
postFunctions body → 201400
GET
/functions/limits
Functions limits
functionsLimits → 200400
POST
/functions/list
Filter functions
listFunctions body → 200400
POST
/functions/delete
Delete functions
deleteFunctions body → 200400
GET
/functions/{functionId}
Retrieve a function by its id
getFunction 1 param → 200400
POST
/functions/byids
Retrieve functions
byIdsFunctions body → 200400
POST
/functions/status
Activate Functions
postFunctionsStatus → 202400
GET
/functions/status
Get activation status
getFunctionsStatus → 200400

Schemas 24

The contract defines 24 schemas that model the data the API accepts and returns. The most detailed are Function (21 properties), Error (4 properties), MemoryRange (3 properties), CPURange (3 properties). Each schema is shown below with its type and property counts.

MemoryRange
object
The amount of available memory in GB per function execution (i.e. function call).
3 properties 3 required
FunctionBuildError
object
Cognite Function API error.
2 properties 2 required
FunctionName
string
The name of the function.
FunctionType
string
Type of the function. Determines whether the function is a classic function with basic capabilities or a function app.
FunctionIdEither
MetaData
object
Custom, application specific metadata. String key - String value. Limits: Maximum length of key is 32, value 512 characters, up to 16 key-value pairs. Maximum…
EpochTimestamp
integer
The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
FunctionId
object
The ID of the function.
1 property 1 required
FunctionDeleteRequest
object
CPURange
object
The number of CPU cores per function exectuion (i.e. function call).
3 properties 3 required
CogniteInternalId
integer
A server-generated ID for the object.
Function
object
21 properties 6 required
FunctionFileId
The file ID to a file uploaded to Cognite's Files API. This file must be a zip file and contain a file called handler.py in the root folder (unless otherwise s…
FunctionFilter
object
1 property
LimitList
object
1 property
FunctionOwner
string
Owner of this function. Typically used to know who created it. If omitted or blank on creation, the server automatically sets this field to useridentifier: der…
CogniteExternalId
string
The external ID provided by the client. Must be unique for the resource type.
FunctionIdEitherList
object
FunctionListScope
FunctionStatus
string
Status of the function. It starts in a Queued state, is then Deploying before it is either Ready or Failed. If the function is Ready, it can be called.
Error
object
Cognite API error.
4 properties 2 required
EpochTimestampRange
object
Range between two timestamps (inclusive).
2 properties
FunctionExternalId
object
The external ID of the function. Should be unique for the project.
1 property 1 required
IgnoreUnknownIdsField
object
1 property

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

cognite-functions-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 Functions 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.