You can only create one function per request.
required | Array of objects (Function) = 1 items Array of functions to create. |
List of functions.
The response for a failed request.
{- "items": [
- {
- "name": "My awesome function",
- "fileId": 5467347282343
}
]
}
{- "items": [
- {
- "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.11.10",
- "error": {
- "code": 400,
- "message": "Could not build function."
}
}
]
}