Component API
List all components in the environment
| Path | Method | Protected |
|---|---|---|
/v1/envs/{environment_id}/components | GET | Yes |
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
| Path | Method | Protected |
|---|---|---|
/v1/envs/{environment_id}/components | POST | Yes |
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-dataHeader
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
| Path | Method | Protected |
|---|---|---|
/v1/envs/{environment_id}/components/{component_name} | GET | Yes |
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
| Path | Method | Protected |
|---|---|---|
/v1/envs/{environment_id}/deployments/{deployment_revision}/components | GET | Yes |
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
| Path | Method | Protected |
|---|---|---|
/v1/envs/{environment_id}/deployments/{deployment_revision}/components/{component_name} | GET | Yes |
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
| Path | Method | Protected |
|---|---|---|
/v1/components/{component_id} | GET | Yes |
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
| Path | Method | Protected |
|---|---|---|
/v1/components/{component_id} | DELETE | Yes |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| current_revision | integer | Yes | - |
Update a component
| Path | Method | Protected |
|---|---|---|
/v1/components/{component_id} | PATCH | Yes |
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-dataHeader
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
| Path | Method | Protected |
|---|---|---|
/v1/components/{component_id}/revisions/{revision} | GET | Yes |
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
| Path | Method | Protected |
|---|---|---|
/v1/components/{component_id}/revisions/{revision}/wasm | GET | Yes |
Response Body: WASM Binary File
Component API Errors
| Status Code | Description | Body |
|---|---|---|
| 400 | Invalid request, returning with a list of issues detected in the request | {"code":"string","errors":["string"]} |
| 401 | Unauthorized request | {"code":"string","error":"string"} |
| 403 | Forbidden Request | {"code":"string","error":"string"} |
| 404 | Entity not found | {"code":"string","error":"string"} |
| 409 | {"code":"string","error":"string"} | |
| 422 | Limits of the plan exceeded | {"code":"string","error":"string"} |
| 500 | Internal server error | {"code":"string","error":"string"} |