Retrieve a function by its id
Required capabilities:
functionsAcl:READ
Retrieve a function by its id. If you want to retrieve functions by names, use Retrieve functions instead.
Authorizations
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.
Scopes
Response
OK
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 specified in the functionPath argument). This file must contain a function named handle with any of the following arguments: data, client, secrets and function_call_info, which are passed into the function. The zip file can contain other files as well (model binary data, libraries etc).
Custom packages can be pip installed by providing a requirements.txt file in the root of the zip file. The latest version of the Cognite Python SDK is automatically installed. If a specific version is needed, please specify this in the requirements.txt file.
1 <= x <= 9007199254740991Owner of this function. Typically used to know who created it. If omitted or blank on creation, the server automatically sets this field to user_identifier:<hash> derived from the caller's authentication token. A client-supplied value that does not start with the reserved prefix user_identifier: is always preserved as-is. Values that start with user_identifier: are overwritten by the server to prevent spoofing. The hash can be resolved to a display name via the IAM Principals API.
128"user@cognite.com"
Object with additional secrets as key/value pairs. These can e.g. password to simulators or other data sources. Keys must be lowercase characters, numbers or dashes (-) and at most 15 characters. You can create at most 30 secrets, all keys must be unique, and cannot be token, indexUrl, or extraIndexUrls. For each secret, the combined size of the secret name and secret value is limited by 25 kB. The secrets are returned scrambled if set.
Number of CPU cores per function. Allowed range and default value are given by the limits endpoint. On Azure, only the default value is used.
1
Memory per function measured in GB. Allowed range and default value are given by the limits endpoint. On Azure, only the default value is used.
1.5