AlphaAlphaExperimental, requires experimental: { functions: true } in the client options.
const schedules = await client.functions.schedules.list();
Activate Cognite Functions for the project. This will create the necessary backend infrastructure.
const status = await client.functions.activate();
Call a function asynchronously
Starts a call and returns it without waiting for it to finish. Use
client.functions.calls.retrieve to follow its status.
const [session] = await client.sessions.create([{ tokenExchange: true }]);
const call = await client.functions.call(123, {
nonce: session.nonce,
data: { assetId: 456 },
});
const functions = await client.functions.create([{
name: 'My awesome function',
fileId: 5467347282343
}]);
await client.functions.delete([{id: 123}, {externalId: 'abc'}]);
Returns the service limits for Cognite Functions.
const limits = await client.functions.limits();
const functions = await client.functions.list();
Optionalscope: FunctionListScopeconst func = await client.functions.retrieve([{id: 123}, {externalId: 'abc'}]);
Get the activation status of Cognite Functions for the project.
const status = await client.functions.status();
Function calls
Experimental, requires
experimental: { functions: true }in the client options.