@elevasis/sdk 0.5.12 → 0.5.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +144 -118
- package/dist/index.d.ts +19 -253
- package/dist/index.js +20 -9
- package/dist/templates.js +62 -59
- package/dist/types/worker/adapters/index.d.ts +0 -1
- package/dist/worker/index.js +47 -53
- package/package.json +1 -1
- package/reference/_navigation.md +13 -57
- package/reference/{cli/index.mdx → cli.mdx} +568 -505
- package/reference/concepts.mdx +164 -0
- package/reference/deployment/api.mdx +297 -297
- package/reference/deployment/command-center.mdx +226 -0
- package/reference/deployment/index.mdx +158 -153
- package/reference/framework/agent.mdx +156 -151
- package/reference/framework/index.mdx +182 -103
- package/reference/{developer → framework}/interaction-guidance.mdx +182 -182
- package/reference/framework/memory.mdx +326 -347
- package/reference/framework/project-structure.mdx +277 -298
- package/reference/framework/tutorial-system.mdx +222 -0
- package/reference/{getting-started/index.mdx → getting-started.mdx} +152 -148
- package/reference/index.mdx +131 -114
- package/reference/platform-tools/adapters.mdx +868 -929
- package/reference/platform-tools/index.mdx +354 -195
- package/reference/resources/index.mdx +339 -336
- package/reference/resources/patterns.mdx +355 -354
- package/reference/resources/types.mdx +207 -207
- package/reference/{roadmap/index.mdx → roadmap.mdx} +163 -147
- package/reference/{runtime/index.mdx → runtime.mdx} +173 -141
- package/reference/{troubleshooting/common-errors.mdx → troubleshooting.mdx} +223 -210
- package/dist/types/worker/adapters/trello.d.ts +0 -14
- package/reference/concepts/index.mdx +0 -203
- package/reference/deployment/command-center-ui.mdx +0 -151
- package/reference/deployment/command-view.mdx +0 -154
- package/reference/framework/documentation.mdx +0 -92
- package/reference/platform-tools/examples.mdx +0 -170
- package/reference/runtime/limits.mdx +0 -75
- package/reference/security/credentials.mdx +0 -141
|
@@ -1,297 +1,297 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Execution API
|
|
3
|
-
description: REST endpoints for executing resources, querying execution history, and managing deployments via the Elevasis external API
|
|
4
|
-
loadWhen: "Calling the API directly or debugging API responses"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
The Elevasis external API exposes REST endpoints under `/api/external/` for executing your deployed resources and inspecting results. All endpoints require your `
|
|
8
|
-
|
|
9
|
-
**Authentication header:**
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
Authorization: Bearer sk_...
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## API Base URL
|
|
18
|
-
|
|
19
|
-
| Environment | Base URL
|
|
20
|
-
| ----------- |
|
|
21
|
-
| Production
|
|
22
|
-
| Development | `http://localhost:<port>` |
|
|
23
|
-
|
|
24
|
-
Override the base URL by setting `ELEVASIS_API_URL` in your environment or passing `--api-url` to any CLI command.
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Endpoints
|
|
29
|
-
|
|
30
|
-
| Method | Path
|
|
31
|
-
| ------ |
|
|
32
|
-
| `GET`
|
|
33
|
-
| `GET`
|
|
34
|
-
| `POST` | `/api/external/execute`
|
|
35
|
-
| `POST` | `/api/external/execute-async`
|
|
36
|
-
| `POST` | `/api/external/executions/:resourceId/:executionId/cancel` | Cancel a running execution
|
|
37
|
-
| `GET`
|
|
38
|
-
| `GET`
|
|
39
|
-
| `POST` | `/api/external/deploy`
|
|
40
|
-
| `GET`
|
|
41
|
-
| `GET`
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Execution Endpoints
|
|
46
|
-
|
|
47
|
-
### POST /api/external/execute
|
|
48
|
-
|
|
49
|
-
Execute a resource synchronously. The request waits for the resource to complete and returns the full result.
|
|
50
|
-
|
|
51
|
-
**Request body:**
|
|
52
|
-
|
|
53
|
-
```json
|
|
54
|
-
{
|
|
55
|
-
"resourceId": "onboard-client",
|
|
56
|
-
"input": {
|
|
57
|
-
"clientName": "Jane",
|
|
58
|
-
"email": "jane@example.com"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
**Response:**
|
|
64
|
-
|
|
65
|
-
```json
|
|
66
|
-
{
|
|
67
|
-
"executionId": "550e8400-e29b-41d4-a716-446655440000",
|
|
68
|
-
"success": true,
|
|
69
|
-
"data": {
|
|
70
|
-
"success": true,
|
|
71
|
-
"clientId": "client_1708521600000",
|
|
72
|
-
"welcomeEmailSent": true
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### POST /api/external/execute-async
|
|
78
|
-
|
|
79
|
-
Execute a resource asynchronously. Returns immediately with an `executionId`. Poll `GET /executions/:resourceId/:executionId` to check status and retrieve output.
|
|
80
|
-
|
|
81
|
-
**Request body:**
|
|
82
|
-
|
|
83
|
-
```json
|
|
84
|
-
{
|
|
85
|
-
"resourceId": "onboard-client",
|
|
86
|
-
"input": { "clientName": "Jane" }
|
|
87
|
-
}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
**Response:**
|
|
91
|
-
|
|
92
|
-
```json
|
|
93
|
-
{
|
|
94
|
-
"executionId": "550e8400-e29b-41d4-a716-446655440000",
|
|
95
|
-
"status": "running"
|
|
96
|
-
}
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### POST /api/external/executions/:resourceId/:executionId/cancel
|
|
100
|
-
|
|
101
|
-
Cancel a running execution. If the execution is found in memory, sends a cancellation signal immediately. Falls back to a database status update if no in-memory signal is found.
|
|
102
|
-
|
|
103
|
-
**Response:**
|
|
104
|
-
|
|
105
|
-
```json
|
|
106
|
-
{
|
|
107
|
-
"success": true
|
|
108
|
-
}
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
## Resource Endpoints
|
|
114
|
-
|
|
115
|
-
### GET /api/external/resources
|
|
116
|
-
|
|
117
|
-
List all resources registered to your organization. In production, only `status: 'prod'` resources are returned.
|
|
118
|
-
|
|
119
|
-
**Response:**
|
|
120
|
-
|
|
121
|
-
```json
|
|
122
|
-
[
|
|
123
|
-
{
|
|
124
|
-
"resourceId": "onboard-client",
|
|
125
|
-
"resourceType": "workflow",
|
|
126
|
-
"name": "Onboard Client",
|
|
127
|
-
"status": "prod"
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"resourceId": "email-assistant",
|
|
131
|
-
"resourceType": "agent",
|
|
132
|
-
"name": "Email Assistant",
|
|
133
|
-
"status": "prod"
|
|
134
|
-
}
|
|
135
|
-
]
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### GET /api/external/resources/:resourceId/definition
|
|
139
|
-
|
|
140
|
-
Get the full definition for a single resource: metadata, input schema, and output schema.
|
|
141
|
-
|
|
142
|
-
**Response:**
|
|
143
|
-
|
|
144
|
-
```json
|
|
145
|
-
{
|
|
146
|
-
"resourceId": "onboard-client",
|
|
147
|
-
"resourceType": "workflow",
|
|
148
|
-
"name": "Onboard Client",
|
|
149
|
-
"description": "Creates a client record and sends a welcome email",
|
|
150
|
-
"status": "prod",
|
|
151
|
-
"inputSchema": {
|
|
152
|
-
"type": "object",
|
|
153
|
-
"properties": {
|
|
154
|
-
"clientName": { "type": "string" },
|
|
155
|
-
"email": { "type": "string", "format": "email" }
|
|
156
|
-
},
|
|
157
|
-
"required": ["clientName", "email"]
|
|
158
|
-
},
|
|
159
|
-
"outputSchema": {
|
|
160
|
-
"type": "object",
|
|
161
|
-
"properties": {
|
|
162
|
-
"success": { "type": "boolean" },
|
|
163
|
-
"clientId": { "type": "string" }
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
Returns `404` if the resource is not found.
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
## Execution History Endpoints
|
|
174
|
-
|
|
175
|
-
### GET /api/external/executions/:resourceId
|
|
176
|
-
|
|
177
|
-
List execution history for a resource.
|
|
178
|
-
|
|
179
|
-
**Query parameters:**
|
|
180
|
-
|
|
181
|
-
| Parameter | Description
|
|
182
|
-
| --------- |
|
|
183
|
-
| `limit`
|
|
184
|
-
| `status`
|
|
185
|
-
|
|
186
|
-
**Response:**
|
|
187
|
-
|
|
188
|
-
```json
|
|
189
|
-
[
|
|
190
|
-
{
|
|
191
|
-
"executionId": "550e8400-e29b-41d4-a716-446655440000",
|
|
192
|
-
"resourceId": "onboard-client",
|
|
193
|
-
"status": "completed",
|
|
194
|
-
"createdAt": "2026-02-25T14:32:01Z",
|
|
195
|
-
"durationMs": 1234
|
|
196
|
-
}
|
|
197
|
-
]
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### GET /api/external/executions/:resourceId/:executionId
|
|
201
|
-
|
|
202
|
-
Get the full detail for a single execution including input, output, logs, and error.
|
|
203
|
-
|
|
204
|
-
**Response:**
|
|
205
|
-
|
|
206
|
-
```json
|
|
207
|
-
{
|
|
208
|
-
"executionId": "550e8400-e29b-41d4-a716-446655440000",
|
|
209
|
-
"resourceId": "onboard-client",
|
|
210
|
-
"status": "completed",
|
|
211
|
-
"createdAt": "2026-02-25T14:32:01Z",
|
|
212
|
-
"durationMs": 1234,
|
|
213
|
-
"input": {
|
|
214
|
-
"clientName": "Jane",
|
|
215
|
-
"email": "jane@example.com"
|
|
216
|
-
},
|
|
217
|
-
"output": {
|
|
218
|
-
"success": true,
|
|
219
|
-
"clientId": "client_1708521600000",
|
|
220
|
-
"welcomeEmailSent": true
|
|
221
|
-
},
|
|
222
|
-
"logs": [
|
|
223
|
-
{ "timestamp": "2026-02-25T14:32:01.123Z", "message": "Starting onboard-client workflow" },
|
|
224
|
-
{ "timestamp": "2026-02-25T14:32:01.456Z", "message": "Created client record" }
|
|
225
|
-
],
|
|
226
|
-
"error": null
|
|
227
|
-
}
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
## Deployment Endpoints
|
|
233
|
-
|
|
234
|
-
### POST /api/external/deploy
|
|
235
|
-
|
|
236
|
-
Upload a resource bundle and deploy it. Accepts a multipart request with the compiled bundle and resource metadata.
|
|
237
|
-
|
|
238
|
-
**Response:**
|
|
239
|
-
|
|
240
|
-
```json
|
|
241
|
-
{
|
|
242
|
-
"deployId": "deploy_abc123",
|
|
243
|
-
"status": "active",
|
|
244
|
-
"resources": 4
|
|
245
|
-
}
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
Use `elevasis-sdk deploy` from the CLI rather than calling this endpoint directly -- the CLI handles bundling, metadata generation, and status streaming automatically.
|
|
249
|
-
|
|
250
|
-
### GET /api/external/deployments
|
|
251
|
-
|
|
252
|
-
List all deployments for your organization.
|
|
253
|
-
|
|
254
|
-
**Response:**
|
|
255
|
-
|
|
256
|
-
```json
|
|
257
|
-
[
|
|
258
|
-
{
|
|
259
|
-
"id": "deploy_abc123",
|
|
260
|
-
"status": "active",
|
|
261
|
-
"createdAt": "2026-02-25T14:00:00Z",
|
|
262
|
-
"resources": 4
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
"id": "deploy_abc122",
|
|
266
|
-
"status": "stopped",
|
|
267
|
-
"createdAt": "2026-02-24T09:30:00Z",
|
|
268
|
-
"resources": 3
|
|
269
|
-
}
|
|
270
|
-
]
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
### GET /api/external/deployments/:id
|
|
274
|
-
|
|
275
|
-
Get a single deployment by ID.
|
|
276
|
-
|
|
277
|
-
**Response shape:** Same as a single item from `GET /deployments`.
|
|
278
|
-
|
|
279
|
-
---
|
|
280
|
-
|
|
281
|
-
## CLI Execution Commands
|
|
282
|
-
|
|
283
|
-
The SDK CLI wraps all execution endpoints. Use these commands instead of calling the API directly during development:
|
|
284
|
-
|
|
285
|
-
| Command
|
|
286
|
-
|
|
|
287
|
-
| `elevasis-sdk resources`
|
|
288
|
-
| `elevasis-sdk describe <resource>`
|
|
289
|
-
| `elevasis-sdk exec <resource> --input '...'`
|
|
290
|
-
| `elevasis-sdk exec <resource> --input '...' --async` | `POST /api/external/execute-async`
|
|
291
|
-
| `elevasis-sdk executions <resource>`
|
|
292
|
-
| `elevasis-sdk execution <resource> <id>`
|
|
293
|
-
| `elevasis-sdk deployments`
|
|
294
|
-
|
|
295
|
-
---
|
|
296
|
-
|
|
297
|
-
**Last Updated:** 2026-02-25
|
|
1
|
+
---
|
|
2
|
+
title: Execution API
|
|
3
|
+
description: REST endpoints for executing resources, querying execution history, and managing deployments via the Elevasis external API
|
|
4
|
+
loadWhen: "Calling the API directly or debugging API responses"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The Elevasis external API exposes REST endpoints under `/api/external/` for executing your deployed resources and inspecting results. All endpoints require your `ELEVASIS_PLATFORM_KEY` sent as a Bearer token. Organization is resolved server-side from the API key -- you never pass an org identifier in requests.
|
|
8
|
+
|
|
9
|
+
**Authentication header:**
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
Authorization: Bearer sk_...
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## API Base URL
|
|
18
|
+
|
|
19
|
+
| Environment | Base URL |
|
|
20
|
+
| ----------- | --------------------------- |
|
|
21
|
+
| Production | `https://api.elevasis.io` |
|
|
22
|
+
| Development | `http://localhost:<port>` |
|
|
23
|
+
|
|
24
|
+
Override the base URL by setting `ELEVASIS_API_URL` in your environment or passing `--api-url` to any CLI command.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Endpoints
|
|
29
|
+
|
|
30
|
+
| Method | Path | Purpose |
|
|
31
|
+
| ------ | ---------------------------------------------------------- | ---------------------------------------- |
|
|
32
|
+
| `GET` | `/api/external/resources` | List all resources for your organization |
|
|
33
|
+
| `GET` | `/api/external/resources/:resourceId/definition` | Get resource metadata and schemas |
|
|
34
|
+
| `POST` | `/api/external/execute` | Execute a resource synchronously |
|
|
35
|
+
| `POST` | `/api/external/execute-async` | Execute a resource asynchronously |
|
|
36
|
+
| `POST` | `/api/external/executions/:resourceId/:executionId/cancel` | Cancel a running execution |
|
|
37
|
+
| `GET` | `/api/external/executions/:resourceId` | List execution history for a resource |
|
|
38
|
+
| `GET` | `/api/external/executions/:resourceId/:executionId` | Get full execution detail |
|
|
39
|
+
| `POST` | `/api/external/deploy` | Upload bundle and deploy resources |
|
|
40
|
+
| `GET` | `/api/external/deployments` | List all deployments |
|
|
41
|
+
| `GET` | `/api/external/deployments/:id` | Get a deployment by ID |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Execution Endpoints
|
|
46
|
+
|
|
47
|
+
### POST /api/external/execute
|
|
48
|
+
|
|
49
|
+
Execute a resource synchronously. The request waits for the resource to complete and returns the full result.
|
|
50
|
+
|
|
51
|
+
**Request body:**
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"resourceId": "onboard-client",
|
|
56
|
+
"input": {
|
|
57
|
+
"clientName": "Jane",
|
|
58
|
+
"email": "jane@example.com"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Response:**
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"executionId": "550e8400-e29b-41d4-a716-446655440000",
|
|
68
|
+
"success": true,
|
|
69
|
+
"data": {
|
|
70
|
+
"success": true,
|
|
71
|
+
"clientId": "client_1708521600000",
|
|
72
|
+
"welcomeEmailSent": true
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### POST /api/external/execute-async
|
|
78
|
+
|
|
79
|
+
Execute a resource asynchronously. Returns immediately with an `executionId`. Poll `GET /executions/:resourceId/:executionId` to check status and retrieve output.
|
|
80
|
+
|
|
81
|
+
**Request body:**
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"resourceId": "onboard-client",
|
|
86
|
+
"input": { "clientName": "Jane" }
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Response:**
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"executionId": "550e8400-e29b-41d4-a716-446655440000",
|
|
95
|
+
"status": "running"
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### POST /api/external/executions/:resourceId/:executionId/cancel
|
|
100
|
+
|
|
101
|
+
Cancel a running execution. If the execution is found in memory, sends a cancellation signal immediately. Falls back to a database status update if no in-memory signal is found.
|
|
102
|
+
|
|
103
|
+
**Response:**
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"success": true
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Resource Endpoints
|
|
114
|
+
|
|
115
|
+
### GET /api/external/resources
|
|
116
|
+
|
|
117
|
+
List all resources registered to your organization. In production, only `status: 'prod'` resources are returned.
|
|
118
|
+
|
|
119
|
+
**Response:**
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
[
|
|
123
|
+
{
|
|
124
|
+
"resourceId": "onboard-client",
|
|
125
|
+
"resourceType": "workflow",
|
|
126
|
+
"name": "Onboard Client",
|
|
127
|
+
"status": "prod"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"resourceId": "email-assistant",
|
|
131
|
+
"resourceType": "agent",
|
|
132
|
+
"name": "Email Assistant",
|
|
133
|
+
"status": "prod"
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### GET /api/external/resources/:resourceId/definition
|
|
139
|
+
|
|
140
|
+
Get the full definition for a single resource: metadata, input schema, and output schema.
|
|
141
|
+
|
|
142
|
+
**Response:**
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"resourceId": "onboard-client",
|
|
147
|
+
"resourceType": "workflow",
|
|
148
|
+
"name": "Onboard Client",
|
|
149
|
+
"description": "Creates a client record and sends a welcome email",
|
|
150
|
+
"status": "prod",
|
|
151
|
+
"inputSchema": {
|
|
152
|
+
"type": "object",
|
|
153
|
+
"properties": {
|
|
154
|
+
"clientName": { "type": "string" },
|
|
155
|
+
"email": { "type": "string", "format": "email" }
|
|
156
|
+
},
|
|
157
|
+
"required": ["clientName", "email"]
|
|
158
|
+
},
|
|
159
|
+
"outputSchema": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"properties": {
|
|
162
|
+
"success": { "type": "boolean" },
|
|
163
|
+
"clientId": { "type": "string" }
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Returns `404` if the resource is not found.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Execution History Endpoints
|
|
174
|
+
|
|
175
|
+
### GET /api/external/executions/:resourceId
|
|
176
|
+
|
|
177
|
+
List execution history for a resource.
|
|
178
|
+
|
|
179
|
+
**Query parameters:**
|
|
180
|
+
|
|
181
|
+
| Parameter | Description |
|
|
182
|
+
| --------- | --------------------------------------------------------------- |
|
|
183
|
+
| `limit` | Maximum number of results (default: 20) |
|
|
184
|
+
| `status` | Filter by status: `running`, `completed`, `failed`, `cancelled` |
|
|
185
|
+
|
|
186
|
+
**Response:**
|
|
187
|
+
|
|
188
|
+
```json
|
|
189
|
+
[
|
|
190
|
+
{
|
|
191
|
+
"executionId": "550e8400-e29b-41d4-a716-446655440000",
|
|
192
|
+
"resourceId": "onboard-client",
|
|
193
|
+
"status": "completed",
|
|
194
|
+
"createdAt": "2026-02-25T14:32:01Z",
|
|
195
|
+
"durationMs": 1234
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### GET /api/external/executions/:resourceId/:executionId
|
|
201
|
+
|
|
202
|
+
Get the full detail for a single execution including input, output, logs, and error.
|
|
203
|
+
|
|
204
|
+
**Response:**
|
|
205
|
+
|
|
206
|
+
```json
|
|
207
|
+
{
|
|
208
|
+
"executionId": "550e8400-e29b-41d4-a716-446655440000",
|
|
209
|
+
"resourceId": "onboard-client",
|
|
210
|
+
"status": "completed",
|
|
211
|
+
"createdAt": "2026-02-25T14:32:01Z",
|
|
212
|
+
"durationMs": 1234,
|
|
213
|
+
"input": {
|
|
214
|
+
"clientName": "Jane",
|
|
215
|
+
"email": "jane@example.com"
|
|
216
|
+
},
|
|
217
|
+
"output": {
|
|
218
|
+
"success": true,
|
|
219
|
+
"clientId": "client_1708521600000",
|
|
220
|
+
"welcomeEmailSent": true
|
|
221
|
+
},
|
|
222
|
+
"logs": [
|
|
223
|
+
{ "timestamp": "2026-02-25T14:32:01.123Z", "message": "Starting onboard-client workflow" },
|
|
224
|
+
{ "timestamp": "2026-02-25T14:32:01.456Z", "message": "Created client record" }
|
|
225
|
+
],
|
|
226
|
+
"error": null
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## Deployment Endpoints
|
|
233
|
+
|
|
234
|
+
### POST /api/external/deploy
|
|
235
|
+
|
|
236
|
+
Upload a resource bundle and deploy it. Accepts a multipart request with the compiled bundle and resource metadata.
|
|
237
|
+
|
|
238
|
+
**Response:**
|
|
239
|
+
|
|
240
|
+
```json
|
|
241
|
+
{
|
|
242
|
+
"deployId": "deploy_abc123",
|
|
243
|
+
"status": "active",
|
|
244
|
+
"resources": 4
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Use `elevasis-sdk deploy` from the CLI rather than calling this endpoint directly -- the CLI handles bundling, metadata generation, and status streaming automatically.
|
|
249
|
+
|
|
250
|
+
### GET /api/external/deployments
|
|
251
|
+
|
|
252
|
+
List all deployments for your organization.
|
|
253
|
+
|
|
254
|
+
**Response:**
|
|
255
|
+
|
|
256
|
+
```json
|
|
257
|
+
[
|
|
258
|
+
{
|
|
259
|
+
"id": "deploy_abc123",
|
|
260
|
+
"status": "active",
|
|
261
|
+
"createdAt": "2026-02-25T14:00:00Z",
|
|
262
|
+
"resources": 4
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"id": "deploy_abc122",
|
|
266
|
+
"status": "stopped",
|
|
267
|
+
"createdAt": "2026-02-24T09:30:00Z",
|
|
268
|
+
"resources": 3
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### GET /api/external/deployments/:id
|
|
274
|
+
|
|
275
|
+
Get a single deployment by ID.
|
|
276
|
+
|
|
277
|
+
**Response shape:** Same as a single item from `GET /deployments`.
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## CLI Execution Commands
|
|
282
|
+
|
|
283
|
+
The SDK CLI wraps all execution endpoints. Use these commands instead of calling the API directly during development:
|
|
284
|
+
|
|
285
|
+
| Command | API call | Purpose |
|
|
286
|
+
| ------------------------------------------------------ | -------------------------------------------- | ------------------------ |
|
|
287
|
+
| `elevasis-sdk resources` | `GET /api/external/resources` | List all resources |
|
|
288
|
+
| `elevasis-sdk describe <resource>` | `GET /api/external/resources/:id/definition` | Show resource definition |
|
|
289
|
+
| `elevasis-sdk exec <resource> --input '...'` | `POST /api/external/execute` | Execute synchronously |
|
|
290
|
+
| `elevasis-sdk exec <resource> --input '...' --async` | `POST /api/external/execute-async` | Execute asynchronously |
|
|
291
|
+
| `elevasis-sdk executions <resource>` | `GET /api/external/executions/:id` | List execution history |
|
|
292
|
+
| `elevasis-sdk execution <resource> <id>` | `GET /api/external/executions/:id/:execId` | Get execution detail |
|
|
293
|
+
| `elevasis-sdk deployments` | `GET /api/external/deployments` | List deployments |
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
**Last Updated:** 2026-02-25
|