Retrieve a function by its id

Retrieve a function by its id. If you want to retrieve functions by names, use Retrieve functions instead.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
path Parameters
functionId
required
integer

The function id.

Responses
200

OK

400

The response for a failed request.

get/functions/{functionId}
Request samples
Response samples
application/json
{
  • "id": 1,
  • "createdTime": 123455234,
  • "status": "Queued",
  • "name": "myfunction",
  • "externalId": "my.known.id",
  • "fileId": 1,
  • "owner": "user@cognite.com",
  • "description": "My fantastic function with advanced ML",
  • "metadata": {
    • "property1": "string",
    • "property2": "string"
    },
  • "secrets": {
    • "MySecret": "***"
    },
  • "functionPath": "myfunction/handler.py",
  • "envVars": {
    • "MyKey": "MyValue"
    },
  • "cpu": 1,
  • "memory": 1.5,
  • "runtime": "py311",
  • "runtimeVersion": "Python 3.8.13",
  • "error": {
    • "code": 400,
    • "message": "Could not build function."
    }
}