Skip to Content
REST APIComponent API

Component API

List all components in the environment

PathMethodProtected
/v1/envs/{environment_id}/componentsGETYes

Example Response JSON

{ "values": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "revision": 0, "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563", "componentName": "string", "hash": "string", "applicationId": "97ab27fa-30e2-43e3-92a3-160e80f4c0d5", "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "componentSize": 0, "metadata": { "exports": [ { "type": "Function", "name": "string", "parameters": [ { "name": "string", "typ": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } ], "result": { "typ": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } } ], "producers": [ { "fields": [ { "name": "string", "values": [ { "name": "string", "version": "string" } ] } ] } ], "memories": [ { "initial": 0, "maximum": 0 } ], "binaryWit": "", "rootPackageName": "string", "rootPackageVersion": "string", "agentTypes": [], "agentTypeProvisionConfigs": {} }, "createdAt": "2019-08-24T14:15:22Z", "wasmHash": "string" } ] }

Create a new component in the environment

PathMethodProtected
/v1/envs/{environment_id}/componentsPOSTYes

The request body is encoded as multipart/form-data containing metadata and the WASM binary.

Request Form: multipart/form-data

Make sure to include Content-Type: multipart/form-data Header

Field metadata: JSON

{ "componentName": "string", "agentTypes": [], "agentTypeProvisionConfigs": {} }

Field componentWasm: string binary

Field files: string binary

Example Response JSON

{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "revision": 0, "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563", "componentName": "string", "hash": "string", "applicationId": "97ab27fa-30e2-43e3-92a3-160e80f4c0d5", "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "componentSize": 0, "metadata": { "exports": [ { "type": "Function", "name": "string", "parameters": [ { "name": "string", "typ": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } ], "result": { "typ": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } } ], "producers": [ { "fields": [ { "name": "string", "values": [ { "name": "string", "version": "string" } ] } ] } ], "memories": [ { "initial": 0, "maximum": 0 } ], "binaryWit": "", "rootPackageName": "string", "rootPackageVersion": "string", "agentTypes": [], "agentTypeProvisionConfigs": {} }, "createdAt": "2019-08-24T14:15:22Z", "wasmHash": "string" }

Get a component in the environment by name

PathMethodProtected
/v1/envs/{environment_id}/components/{component_name}GETYes

Example Response JSON

{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "revision": 0, "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563", "componentName": "string", "hash": "string", "applicationId": "97ab27fa-30e2-43e3-92a3-160e80f4c0d5", "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "componentSize": 0, "metadata": { "exports": [ { "type": "Function", "name": "string", "parameters": [ { "name": "string", "typ": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } ], "result": { "typ": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } } ], "producers": [ { "fields": [ { "name": "string", "values": [ { "name": "string", "version": "string" } ] } ] } ], "memories": [ { "initial": 0, "maximum": 0 } ], "binaryWit": "", "rootPackageName": "string", "rootPackageVersion": "string", "agentTypes": [], "agentTypeProvisionConfigs": {} }, "createdAt": "2019-08-24T14:15:22Z", "wasmHash": "string" }

List all components in a specific deployment

PathMethodProtected
/v1/envs/{environment_id}/deployments/{deployment_revision}/componentsGETYes

Example Response JSON

{ "values": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "revision": 0, "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563", "componentName": "string", "hash": "string", "applicationId": "97ab27fa-30e2-43e3-92a3-160e80f4c0d5", "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "componentSize": 0, "metadata": { "exports": [ { "type": "Function", "name": "string", "parameters": [ { "name": "string", "typ": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } ], "result": { "typ": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } } ], "producers": [ { "fields": [ { "name": "string", "values": [ { "name": "string", "version": "string" } ] } ] } ], "memories": [ { "initial": 0, "maximum": 0 } ], "binaryWit": "", "rootPackageName": "string", "rootPackageVersion": "string", "agentTypes": [], "agentTypeProvisionConfigs": {} }, "createdAt": "2019-08-24T14:15:22Z", "wasmHash": "string" } ] }

Get component in a deployment by name

PathMethodProtected
/v1/envs/{environment_id}/deployments/{deployment_revision}/components/{component_name}GETYes

Example Response JSON

{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "revision": 0, "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563", "componentName": "string", "hash": "string", "applicationId": "97ab27fa-30e2-43e3-92a3-160e80f4c0d5", "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "componentSize": 0, "metadata": { "exports": [ { "type": "Function", "name": "string", "parameters": [ { "name": "string", "typ": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } ], "result": { "typ": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } } ], "producers": [ { "fields": [ { "name": "string", "values": [ { "name": "string", "version": "string" } ] } ] } ], "memories": [ { "initial": 0, "maximum": 0 } ], "binaryWit": "", "rootPackageName": "string", "rootPackageVersion": "string", "agentTypes": [], "agentTypeProvisionConfigs": {} }, "createdAt": "2019-08-24T14:15:22Z", "wasmHash": "string" }

Get a component by id

PathMethodProtected
/v1/components/{component_id}GETYes

Example Response JSON

{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "revision": 0, "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563", "componentName": "string", "hash": "string", "applicationId": "97ab27fa-30e2-43e3-92a3-160e80f4c0d5", "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "componentSize": 0, "metadata": { "exports": [ { "type": "Function", "name": "string", "parameters": [ { "name": "string", "typ": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } ], "result": { "typ": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } } ], "producers": [ { "fields": [ { "name": "string", "values": [ { "name": "string", "version": "string" } ] } ] } ], "memories": [ { "initial": 0, "maximum": 0 } ], "binaryWit": "", "rootPackageName": "string", "rootPackageVersion": "string", "agentTypes": [], "agentTypeProvisionConfigs": {} }, "createdAt": "2019-08-24T14:15:22Z", "wasmHash": "string" }

Delete the component

PathMethodProtected
/v1/components/{component_id}DELETEYes

Query Parameters

NameTypeRequiredDescription
current_revisionintegerYes-

Update a component

PathMethodProtected
/v1/components/{component_id}PATCHYes

The request body is encoded as multipart/form-data containing metadata and the WASM binary.

Request Form: multipart/form-data

Make sure to include Content-Type: multipart/form-data Header

Field metadata: JSON

{ "currentRevision": 0, "agentTypes": [ { "typeName": "string", "description": "string", "sourceLanguage": "string", "constructor": { "name": "string", "description": "string", "promptHint": "string", "inputSchema": { "type": "Multimodal", "elements": [ { "name": "string", "schema": { "type": "ComponentModel", "elementType": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } } ] } }, "methods": [ { "name": "string", "description": "string", "promptHint": "string", "inputSchema": { "type": "Multimodal", "elements": [ { "name": "string", "schema": { "type": "ComponentModel", "elementType": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } } ] }, "outputSchema": { "type": "Multimodal", "elements": [ { "name": "string", "schema": { "type": "ComponentModel", "elementType": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } } ] }, "httpEndpoint": [ { "httpMethod": { "type": "Patch" }, "pathSuffix": [ { "type": "Literal", "value": "string" } ], "headerVars": [ { "headerName": "string", "variableName": "string" } ], "queryVars": [ { "queryParamName": "string", "variableName": "string" } ], "authDetails": { "required": true }, "corsOptions": { "allowedPatterns": [ "string" ] } } ] } ], "dependencies": [ { "typeName": "string", "description": "string", "constructor": { "name": "string", "description": "string", "promptHint": "string", "inputSchema": { "type": "Multimodal", "elements": [ { "name": "string", "schema": { "type": "ComponentModel", "elementType": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } } ] } }, "methods": [ { "name": "string", "description": "string", "promptHint": "string", "inputSchema": { "type": "Multimodal", "elements": [ { "name": "string", "schema": { "type": "ComponentModel", "elementType": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } } ] }, "outputSchema": { "type": "Multimodal", "elements": [ { "name": "string", "schema": { "type": "ComponentModel", "elementType": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } } ] }, "httpEndpoint": [ { "httpMethod": { "type": "Patch" }, "pathSuffix": [ { "type": "Literal", "value": "string" } ], "headerVars": [ { "headerName": "string", "variableName": "string" } ], "queryVars": [ { "queryParamName": "string", "variableName": "string" } ], "authDetails": { "required": true }, "corsOptions": { "allowedPatterns": [ "string" ] } } ] } ] } ], "mode": "Durable", "httpMount": { "pathPrefix": [ { "type": "Literal", "value": "string" } ], "authDetails": { "required": true }, "phantomAgent": true, "corsOptions": { "allowedPatterns": [ "string" ] }, "webhookSuffix": [ { "type": "Literal", "value": "string" } ] }, "snapshotting": { "type": "Disabled" }, "config": [ { "source": "Local", "path": [ "string" ], "valueType": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } ] } ], "agentTypeProvisionConfigUpdates": { "property1": { "env": { "property1": "string", "property2": "string" }, "wasiConfig": { "property1": "string", "property2": "string" }, "config": [ { "path": [ "string" ], "value": {} } ], "pluginUpdates": [], "filesToAddOrUpdate": {}, "filesToRemove": [], "filePermissionUpdates": {} }, "property2": { "env": { "property1": "string", "property2": "string" }, "wasiConfig": { "property1": "string", "property2": "string" }, "config": [ { "path": [ "string" ], "value": {} } ], "pluginUpdates": [], "filesToAddOrUpdate": {}, "filesToRemove": [], "filePermissionUpdates": {} } } }

Field newComponentWasm: string binary

Field newFiles: string binary

Example Response JSON

{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "revision": 0, "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563", "componentName": "string", "hash": "string", "applicationId": "97ab27fa-30e2-43e3-92a3-160e80f4c0d5", "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "componentSize": 0, "metadata": { "exports": [ { "type": "Function", "name": "string", "parameters": [ { "name": "string", "typ": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } ], "result": { "typ": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } } ], "producers": [ { "fields": [ { "name": "string", "values": [ { "name": "string", "version": "string" } ] } ] } ], "memories": [ { "initial": 0, "maximum": 0 } ], "binaryWit": "", "rootPackageName": "string", "rootPackageVersion": "string", "agentTypes": [], "agentTypeProvisionConfigs": {} }, "createdAt": "2019-08-24T14:15:22Z", "wasmHash": "string" }

Get specific revision of a component

PathMethodProtected
/v1/components/{component_id}/revisions/{revision}GETYes

Example Response JSON

{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "revision": 0, "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563", "componentName": "string", "hash": "string", "applicationId": "97ab27fa-30e2-43e3-92a3-160e80f4c0d5", "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "componentSize": 0, "metadata": { "exports": [ { "type": "Function", "name": "string", "parameters": [ { "name": "string", "typ": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } ], "result": { "typ": { "type": "Variant", "name": "string", "owner": "string", "cases": [ { "name": "string", "typ": {} } ] } } } ], "producers": [ { "fields": [ { "name": "string", "values": [ { "name": "string", "version": "string" } ] } ] } ], "memories": [ { "initial": 0, "maximum": 0 } ], "binaryWit": "", "rootPackageName": "string", "rootPackageVersion": "string", "agentTypes": [], "agentTypeProvisionConfigs": {} }, "createdAt": "2019-08-24T14:15:22Z", "wasmHash": "string" }

Get the component wasm binary of a specific revision

PathMethodProtected
/v1/components/{component_id}/revisions/{revision}/wasmGETYes

Response Body: WASM Binary File

Component API Errors

Status CodeDescriptionBody
400Invalid request, returning with a list of issues detected in the request{"code":"string","errors":["string"]}
401Unauthorized request{"code":"string","error":"string"}
403Forbidden Request{"code":"string","error":"string"}
404Entity not found{"code":"string","error":"string"}
409{"code":"string","error":"string"}
422Limits of the plan exceeded{"code":"string","error":"string"}
500Internal server error{"code":"string","error":"string"}
Last updated on