Apply a workspace resource bundle
POST/v1/workspaces/{workspaceId}/bulk_workspace_applies
Asynchronously applies a declarative bundle of workspace resources. Returns the operation immediately in PENDING; clients poll Get to track progress.
Apply a workspace resource bundle
curl https://api.cadenya.com/v1/workspaces/$WORKSPACE_ID/bulk_workspace_applies \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CADENYA_API_KEY" \
-d '{
"data": {
"bundleKey": "bundleKey"
}
}'{
"data": {
"bundleKey": "bundleKey",
"agents": {
"foo": {
"name": "name",
"spec": {
"status": "AGENT_STATUS_UNSPECIFIED",
"variationSelectionMode": "VARIATION_SELECTION_MODE_UNSPECIFIED",
"description": "description",
"inputDataSchema": {
"foo": "bar"
},
"outputDefinition": {
"foo": "bar"
},
"webhookEventsUrl": "webhookEventsUrl"
},
"labels": {
"foo": "string"
},
"schedules": {
"foo": {
"name": "name",
"spec": {
"initialMessage": "initialMessage",
"schedule": {
"calendars": [
{
"comment": "comment",
"dayOfMonth": [
{
"end": 0,
"start": 0,
"step": 0
}
],
"dayOfWeek": [
{
"end": 0,
"start": 0,
"step": 0
}
],
"hour": [
{
"end": 0,
"start": 0,
"step": 0
}
],
"minute": [
{
"end": 0,
"start": 0,
"step": 0
}
],
"month": [
{
"end": 0,
"start": 0,
"step": 0
}
],
"second": [
{
"end": 0,
"start": 0,
"step": 0
}
]
}
],
"intervals": [
{
"every": "-160513s",
"offset": "-160513s"
}
],
"timezone": "timezone"
},
"data": {},
"overlapPolicy": "OVERLAP_POLICY_UNSPECIFIED",
"status": "AGENT_SCHEDULE_STATUS_UNSPECIFIED",
"variationId": "variationId"
},
"labels": {
"foo": "string"
}
}
},
"variations": {
"foo": {
"name": "name",
"spec": {
"compactionConfig": {
"summarization": {
"instructions": "instructions"
},
"toolResultClearing": {
"preserveRecentResults": 0
},
"triggerThreshold": 0
},
"constraints": {
"maxSubObjectives": 0,
"maxToolCalls": 0
},
"description": "description",
"enableEpisodicMemory": true,
"episodicMemoryTtl": 0,
"modelConfig": {
"modelId": "modelId",
"temperature": 0
},
"progressiveDiscovery": {
"hints": [
"string"
],
"maxTools": 0,
"rerankThreshold": 0
},
"prompt": "prompt",
"weight": 0
},
"assignments": [
{
"subAgentId": "subAgentId",
"toolId": "toolId",
"toolSetId": "toolSetId"
}
],
"labels": {
"foo": "string"
},
"memoryLayers": [
{
"memoryLayerId": "memoryLayerId",
"position": 0
}
]
}
}
}
},
"automaticallyPublishAgents": true,
"memoryLayers": {
"foo": {
"name": "name",
"spec": {
"type": "MEMORY_LAYER_TYPE_UNSPECIFIED",
"description": "description",
"expiresAt": "2019-12-27T18:11:19.117Z",
"systemManaged": true
},
"entries": {
"foo": {
"key": "key",
"content": "content",
"description": "description",
"uploadId": "uploadId"
}
},
"labels": {
"foo": "string"
}
}
},
"sourceUrl": "sourceUrl",
"toolSets": {
"foo": {
"name": "name",
"spec": {
"adapter": {
"http": {
"baseUrl": "baseUrl",
"headers": {
"foo": "string"
}
},
"mcp": {
"excludeTools": {
"operator": "OPERATOR_UNSPECIFIED",
"filters": [
{
"attribute": "ATTRIBUTE_UNSPECIFIED",
"matcher": {
"caseSensitive": true,
"contains": "contains",
"endsWith": "endsWith",
"exact": "exact",
"regex": "regex",
"startsWith": "startsWith"
}
}
]
},
"headers": {
"foo": "string"
},
"includeTools": {
"operator": "OPERATOR_UNSPECIFIED",
"filters": [
{
"attribute": "ATTRIBUTE_UNSPECIFIED",
"matcher": {
"caseSensitive": true,
"contains": "contains",
"endsWith": "endsWith",
"exact": "exact",
"regex": "regex",
"startsWith": "startsWith"
}
}
]
},
"toolApprovals": {
"always": true,
"only": {
"operator": "OPERATOR_UNSPECIFIED",
"filters": [
{
"attribute": "ATTRIBUTE_UNSPECIFIED",
"matcher": {
"caseSensitive": true,
"contains": "contains",
"endsWith": "endsWith",
"exact": "exact",
"regex": "regex",
"startsWith": "startsWith"
}
}
]
}
},
"url": "url"
},
"openapi": {
"baseUrl": "baseUrl",
"excludeTools": {
"operator": "OPERATOR_UNSPECIFIED",
"filters": [
{
"attribute": "ATTRIBUTE_UNSPECIFIED",
"matcher": {
"caseSensitive": true,
"contains": "contains",
"endsWith": "endsWith",
"exact": "exact",
"regex": "regex",
"startsWith": "startsWith"
}
}
]
},
"headers": {
"foo": "string"
},
"includeTools": {
"operator": "OPERATOR_UNSPECIFIED",
"filters": [
{
"attribute": "ATTRIBUTE_UNSPECIFIED",
"matcher": {
"caseSensitive": true,
"contains": "contains",
"endsWith": "endsWith",
"exact": "exact",
"regex": "regex",
"startsWith": "startsWith"
}
}
]
},
"serverName": "serverName",
"toolApprovals": {
"always": true,
"only": {
"operator": "OPERATOR_UNSPECIFIED",
"filters": [
{
"attribute": "ATTRIBUTE_UNSPECIFIED",
"matcher": {
"caseSensitive": true,
"contains": "contains",
"endsWith": "endsWith",
"exact": "exact",
"regex": "regex",
"startsWith": "startsWith"
}
}
]
}
},
"uploadId": "uploadId",
"url": "url"
}
},
"description": "description"
},
"labels": {
"foo": "string"
},
"tools": {
"foo": {
"name": "name",
"spec": {
"config": {
"http": {
"requestMethod": "HTTP_METHOD_UNSPECIFIED",
"headers": {
"foo": "string"
},
"path": "path",
"query": "query",
"requestBodyContentType": "requestBodyContentType",
"requestBodyTemplate": "requestBodyTemplate",
"toolName": "toolName"
},
"mcp": {
"toolDescription": "toolDescription",
"toolName": "toolName",
"toolTitle": "toolTitle"
},
"openapi": {
"method": "method",
"operationId": "operationId",
"path": "path"
}
},
"description": "description",
"parameters": {
"foo": "bar"
},
"status": "TOOL_STATUS_UNSPECIFIED",
"requiresApproval": true
},
"labels": {
"foo": "string"
}
}
}
}
}
},
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"status": {
"state": "STATE_UNSPECIFIED",
"message": "message",
"preflightError": {
"code": 0,
"details": [
{
"@type": "@type"
}
],
"message": "message"
}
},
"info": {
"completedAt": "2019-12-27T18:11:19.117Z",
"createdBy": {
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "PROFILE_TYPE_UNSPECIFIED",
"email": "email",
"name": "name"
}
},
"createdCount": 0,
"deletedCount": 0,
"failedCount": 0,
"startedAt": "2019-12-27T18:11:19.117Z",
"totalCount": 0,
"unchangedCount": 0,
"updatedCount": 0
}
}Returns Examples
{
"data": {
"bundleKey": "bundleKey",
"agents": {
"foo": {
"name": "name",
"spec": {
"status": "AGENT_STATUS_UNSPECIFIED",
"variationSelectionMode": "VARIATION_SELECTION_MODE_UNSPECIFIED",
"description": "description",
"inputDataSchema": {
"foo": "bar"
},
"outputDefinition": {
"foo": "bar"
},
"webhookEventsUrl": "webhookEventsUrl"
},
"labels": {
"foo": "string"
},
"schedules": {
"foo": {
"name": "name",
"spec": {
"initialMessage": "initialMessage",
"schedule": {
"calendars": [
{
"comment": "comment",
"dayOfMonth": [
{
"end": 0,
"start": 0,
"step": 0
}
],
"dayOfWeek": [
{
"end": 0,
"start": 0,
"step": 0
}
],
"hour": [
{
"end": 0,
"start": 0,
"step": 0
}
],
"minute": [
{
"end": 0,
"start": 0,
"step": 0
}
],
"month": [
{
"end": 0,
"start": 0,
"step": 0
}
],
"second": [
{
"end": 0,
"start": 0,
"step": 0
}
]
}
],
"intervals": [
{
"every": "-160513s",
"offset": "-160513s"
}
],
"timezone": "timezone"
},
"data": {},
"overlapPolicy": "OVERLAP_POLICY_UNSPECIFIED",
"status": "AGENT_SCHEDULE_STATUS_UNSPECIFIED",
"variationId": "variationId"
},
"labels": {
"foo": "string"
}
}
},
"variations": {
"foo": {
"name": "name",
"spec": {
"compactionConfig": {
"summarization": {
"instructions": "instructions"
},
"toolResultClearing": {
"preserveRecentResults": 0
},
"triggerThreshold": 0
},
"constraints": {
"maxSubObjectives": 0,
"maxToolCalls": 0
},
"description": "description",
"enableEpisodicMemory": true,
"episodicMemoryTtl": 0,
"modelConfig": {
"modelId": "modelId",
"temperature": 0
},
"progressiveDiscovery": {
"hints": [
"string"
],
"maxTools": 0,
"rerankThreshold": 0
},
"prompt": "prompt",
"weight": 0
},
"assignments": [
{
"subAgentId": "subAgentId",
"toolId": "toolId",
"toolSetId": "toolSetId"
}
],
"labels": {
"foo": "string"
},
"memoryLayers": [
{
"memoryLayerId": "memoryLayerId",
"position": 0
}
]
}
}
}
},
"automaticallyPublishAgents": true,
"memoryLayers": {
"foo": {
"name": "name",
"spec": {
"type": "MEMORY_LAYER_TYPE_UNSPECIFIED",
"description": "description",
"expiresAt": "2019-12-27T18:11:19.117Z",
"systemManaged": true
},
"entries": {
"foo": {
"key": "key",
"content": "content",
"description": "description",
"uploadId": "uploadId"
}
},
"labels": {
"foo": "string"
}
}
},
"sourceUrl": "sourceUrl",
"toolSets": {
"foo": {
"name": "name",
"spec": {
"adapter": {
"http": {
"baseUrl": "baseUrl",
"headers": {
"foo": "string"
}
},
"mcp": {
"excludeTools": {
"operator": "OPERATOR_UNSPECIFIED",
"filters": [
{
"attribute": "ATTRIBUTE_UNSPECIFIED",
"matcher": {
"caseSensitive": true,
"contains": "contains",
"endsWith": "endsWith",
"exact": "exact",
"regex": "regex",
"startsWith": "startsWith"
}
}
]
},
"headers": {
"foo": "string"
},
"includeTools": {
"operator": "OPERATOR_UNSPECIFIED",
"filters": [
{
"attribute": "ATTRIBUTE_UNSPECIFIED",
"matcher": {
"caseSensitive": true,
"contains": "contains",
"endsWith": "endsWith",
"exact": "exact",
"regex": "regex",
"startsWith": "startsWith"
}
}
]
},
"toolApprovals": {
"always": true,
"only": {
"operator": "OPERATOR_UNSPECIFIED",
"filters": [
{
"attribute": "ATTRIBUTE_UNSPECIFIED",
"matcher": {
"caseSensitive": true,
"contains": "contains",
"endsWith": "endsWith",
"exact": "exact",
"regex": "regex",
"startsWith": "startsWith"
}
}
]
}
},
"url": "url"
},
"openapi": {
"baseUrl": "baseUrl",
"excludeTools": {
"operator": "OPERATOR_UNSPECIFIED",
"filters": [
{
"attribute": "ATTRIBUTE_UNSPECIFIED",
"matcher": {
"caseSensitive": true,
"contains": "contains",
"endsWith": "endsWith",
"exact": "exact",
"regex": "regex",
"startsWith": "startsWith"
}
}
]
},
"headers": {
"foo": "string"
},
"includeTools": {
"operator": "OPERATOR_UNSPECIFIED",
"filters": [
{
"attribute": "ATTRIBUTE_UNSPECIFIED",
"matcher": {
"caseSensitive": true,
"contains": "contains",
"endsWith": "endsWith",
"exact": "exact",
"regex": "regex",
"startsWith": "startsWith"
}
}
]
},
"serverName": "serverName",
"toolApprovals": {
"always": true,
"only": {
"operator": "OPERATOR_UNSPECIFIED",
"filters": [
{
"attribute": "ATTRIBUTE_UNSPECIFIED",
"matcher": {
"caseSensitive": true,
"contains": "contains",
"endsWith": "endsWith",
"exact": "exact",
"regex": "regex",
"startsWith": "startsWith"
}
}
]
}
},
"uploadId": "uploadId",
"url": "url"
}
},
"description": "description"
},
"labels": {
"foo": "string"
},
"tools": {
"foo": {
"name": "name",
"spec": {
"config": {
"http": {
"requestMethod": "HTTP_METHOD_UNSPECIFIED",
"headers": {
"foo": "string"
},
"path": "path",
"query": "query",
"requestBodyContentType": "requestBodyContentType",
"requestBodyTemplate": "requestBodyTemplate",
"toolName": "toolName"
},
"mcp": {
"toolDescription": "toolDescription",
"toolName": "toolName",
"toolTitle": "toolTitle"
},
"openapi": {
"method": "method",
"operationId": "operationId",
"path": "path"
}
},
"description": "description",
"parameters": {
"foo": "bar"
},
"status": "TOOL_STATUS_UNSPECIFIED",
"requiresApproval": true
},
"labels": {
"foo": "string"
}
}
}
}
}
},
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"status": {
"state": "STATE_UNSPECIFIED",
"message": "message",
"preflightError": {
"code": 0,
"details": [
{
"@type": "@type"
}
],
"message": "message"
}
},
"info": {
"completedAt": "2019-12-27T18:11:19.117Z",
"createdBy": {
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "PROFILE_TYPE_UNSPECIFIED",
"email": "email",
"name": "name"
}
},
"createdCount": 0,
"deletedCount": 0,
"failedCount": 0,
"startedAt": "2019-12-27T18:11:19.117Z",
"totalCount": 0,
"unchangedCount": 0,
"updatedCount": 0
}
}