@xano/developer-mcp 1.0.10 → 1.0.12

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.
Files changed (84) hide show
  1. package/README.md +83 -70
  2. package/dist/api_docs/format.d.ts +5 -0
  3. package/dist/api_docs/format.js +158 -0
  4. package/dist/api_docs/index.d.ts +52 -0
  5. package/dist/api_docs/index.js +111 -0
  6. package/dist/api_docs/topics/agent.d.ts +2 -0
  7. package/dist/api_docs/topics/agent.js +142 -0
  8. package/dist/api_docs/topics/api.d.ts +2 -0
  9. package/dist/api_docs/topics/api.js +176 -0
  10. package/dist/api_docs/topics/apigroup.d.ts +2 -0
  11. package/dist/api_docs/topics/apigroup.js +124 -0
  12. package/dist/api_docs/topics/authentication.d.ts +2 -0
  13. package/dist/api_docs/topics/authentication.js +61 -0
  14. package/dist/api_docs/topics/branch.d.ts +2 -0
  15. package/dist/api_docs/topics/branch.js +73 -0
  16. package/dist/api_docs/topics/file.d.ts +2 -0
  17. package/dist/api_docs/topics/file.js +70 -0
  18. package/dist/api_docs/topics/function.d.ts +2 -0
  19. package/dist/api_docs/topics/function.js +164 -0
  20. package/dist/api_docs/topics/history.d.ts +2 -0
  21. package/dist/api_docs/topics/history.js +149 -0
  22. package/dist/api_docs/topics/mcp_server.d.ts +2 -0
  23. package/dist/api_docs/topics/mcp_server.js +139 -0
  24. package/dist/api_docs/topics/middleware.d.ts +2 -0
  25. package/dist/api_docs/topics/middleware.js +156 -0
  26. package/dist/api_docs/topics/realtime.d.ts +2 -0
  27. package/dist/api_docs/topics/realtime.js +112 -0
  28. package/dist/api_docs/topics/start.d.ts +2 -0
  29. package/dist/api_docs/topics/start.js +107 -0
  30. package/dist/api_docs/topics/table.d.ts +2 -0
  31. package/dist/api_docs/topics/table.js +195 -0
  32. package/dist/api_docs/topics/task.d.ts +2 -0
  33. package/dist/api_docs/topics/task.js +165 -0
  34. package/dist/api_docs/topics/tool.d.ts +2 -0
  35. package/dist/api_docs/topics/tool.js +150 -0
  36. package/dist/api_docs/topics/workflows.d.ts +2 -0
  37. package/dist/api_docs/topics/workflows.js +131 -0
  38. package/dist/api_docs/topics/workspace.d.ts +2 -0
  39. package/dist/api_docs/topics/workspace.js +153 -0
  40. package/dist/api_docs/types.d.ts +79 -0
  41. package/dist/api_docs/types.js +4 -0
  42. package/dist/index.js +51 -175
  43. package/dist/templates/init-workspace.js +2 -16
  44. package/package.json +4 -7
  45. package/api_docs/addon.md +0 -193
  46. package/api_docs/agent.md +0 -154
  47. package/api_docs/api_group.md +0 -236
  48. package/api_docs/authentication.md +0 -68
  49. package/api_docs/file.md +0 -190
  50. package/api_docs/function.md +0 -217
  51. package/api_docs/history.md +0 -263
  52. package/api_docs/index.md +0 -104
  53. package/api_docs/mcp_server.md +0 -139
  54. package/api_docs/middleware.md +0 -205
  55. package/api_docs/realtime.md +0 -153
  56. package/api_docs/table.md +0 -151
  57. package/api_docs/task.md +0 -191
  58. package/api_docs/tool.md +0 -216
  59. package/api_docs/triggers.md +0 -344
  60. package/api_docs/workspace.md +0 -246
  61. /package/{xanoscript_docs → dist/xanoscript_docs}/README.md +0 -0
  62. /package/{xanoscript_docs → dist/xanoscript_docs}/addons.md +0 -0
  63. /package/{xanoscript_docs → dist/xanoscript_docs}/agents.md +0 -0
  64. /package/{xanoscript_docs → dist/xanoscript_docs}/apis.md +0 -0
  65. /package/{xanoscript_docs → dist/xanoscript_docs}/database.md +0 -0
  66. /package/{xanoscript_docs → dist/xanoscript_docs}/debugging.md +0 -0
  67. /package/{xanoscript_docs → dist/xanoscript_docs}/ephemeral.md +0 -0
  68. /package/{xanoscript_docs → dist/xanoscript_docs}/frontend.md +0 -0
  69. /package/{xanoscript_docs → dist/xanoscript_docs}/functions.md +0 -0
  70. /package/{xanoscript_docs → dist/xanoscript_docs}/integrations.md +0 -0
  71. /package/{xanoscript_docs → dist/xanoscript_docs}/mcp-servers.md +0 -0
  72. /package/{xanoscript_docs → dist/xanoscript_docs}/performance.md +0 -0
  73. /package/{xanoscript_docs → dist/xanoscript_docs}/realtime.md +0 -0
  74. /package/{xanoscript_docs → dist/xanoscript_docs}/schema.md +0 -0
  75. /package/{xanoscript_docs → dist/xanoscript_docs}/security.md +0 -0
  76. /package/{xanoscript_docs → dist/xanoscript_docs}/streaming.md +0 -0
  77. /package/{xanoscript_docs → dist/xanoscript_docs}/syntax.md +0 -0
  78. /package/{xanoscript_docs → dist/xanoscript_docs}/tables.md +0 -0
  79. /package/{xanoscript_docs → dist/xanoscript_docs}/tasks.md +0 -0
  80. /package/{xanoscript_docs → dist/xanoscript_docs}/testing.md +0 -0
  81. /package/{xanoscript_docs → dist/xanoscript_docs}/tools.md +0 -0
  82. /package/{xanoscript_docs → dist/xanoscript_docs}/triggers.md +0 -0
  83. /package/{xanoscript_docs → dist/xanoscript_docs}/types.md +0 -0
  84. /package/{xanoscript_docs → dist/xanoscript_docs}/version.json +0 -0
package/api_docs/agent.md DELETED
@@ -1,154 +0,0 @@
1
- # Agent API
2
-
3
- Agents are AI-powered assistants that can use tools to accomplish tasks. They are configured with an LLM provider, system prompt, and available tools.
4
-
5
- ## Endpoints Overview
6
-
7
- | Method | Endpoint | Description |
8
- |--------|----------|-------------|
9
- | GET | `/workspace/{workspace_id}/agent` | List agents |
10
- | GET | `/workspace/{workspace_id}/agent/{agent_id}` | Get agent |
11
- | POST | `/workspace/{workspace_id}/agent` | Create agent |
12
- | PUT | `/workspace/{workspace_id}/agent/{agent_id}` | Update agent |
13
- | DELETE | `/workspace/{workspace_id}/agent/{agent_id}` | Delete agent |
14
-
15
- ---
16
-
17
- ## List Agents
18
-
19
- ```
20
- GET /workspace/{workspace_id}/agent
21
- ```
22
-
23
- **Query Parameters:**
24
- | Parameter | Type | Default | Description |
25
- |-----------|------|---------|-------------|
26
- | `branch` | text | "" | Branch label |
27
- | `page` | int | 1 | Page number |
28
- | `per_page` | int | 50 | Items per page (1-10000) |
29
- | `search` | text | "" | Search filter |
30
- | `sort` | enum | "created_at" | Sort field |
31
- | `order` | enum | "desc" | Sort order |
32
- | `tools` | bool | true | Include tool information |
33
-
34
- ---
35
-
36
- ## Get Agent
37
-
38
- ```
39
- GET /workspace/{workspace_id}/agent/{agent_id}
40
- ```
41
-
42
- **Query Parameters:**
43
- - `tools` (bool, default: true): Include tool information
44
-
45
- Returns agent definition including LLM configuration and XanoScript.
46
-
47
- ---
48
-
49
- ## Create Agent
50
-
51
- ```
52
- POST /workspace/{workspace_id}/agent
53
- ```
54
-
55
- **Content-Type:** `text/x-xanoscript`
56
-
57
- **Query Parameters:**
58
- - `branch` (text): Target branch label
59
- - `tools` (bool): Include tool information in response
60
-
61
- ### XanoScript Agent Syntax
62
-
63
- ```xanoscript
64
- agent foo {
65
- canonical = "custom"
66
- llm = {
67
- type : "anthropic"
68
- system_prompt: "You are a helpful AI Agent."
69
- max_steps : 5
70
- prompt : ""
71
- model : "claude-4-sonnet-20250514"
72
- temperature : 1
73
- reasoning : true
74
- baseURL : ""
75
- headers : ""
76
- }
77
- }
78
- ```
79
-
80
- ### LLM Configuration
81
-
82
- | Field | Type | Description |
83
- |-------|------|-------------|
84
- | `type` | text | LLM provider: "anthropic", "openai", etc. |
85
- | `system_prompt` | text | Instructions for agent behavior |
86
- | `max_steps` | int | Maximum tool calls per request |
87
- | `model` | text | Model identifier |
88
- | `temperature` | float | Response randomness (0-2) |
89
- | `reasoning` | bool | Enable extended thinking |
90
- | `baseURL` | text | Custom API endpoint (optional) |
91
- | `headers` | text | Custom headers (optional) |
92
-
93
- ### Available LLM Providers
94
-
95
- | Provider | Type Value |
96
- |----------|------------|
97
- | Anthropic | `"anthropic"` |
98
- | OpenAI | `"openai"` |
99
-
100
- ### Example: Customer Support Agent
101
-
102
- ```xanoscript
103
- agent support_bot {
104
- canonical = "support"
105
- llm = {
106
- type : "anthropic"
107
- system_prompt: "You are a customer support agent. Help users with their questions about our products. Be friendly and professional."
108
- max_steps : 10
109
- model : "claude-4-sonnet-20250514"
110
- temperature : 0.7
111
- reasoning : true
112
- }
113
- }
114
- ```
115
-
116
- ### Example: Data Analysis Agent
117
-
118
- ```xanoscript
119
- agent data_analyst {
120
- canonical = "analyst"
121
- llm = {
122
- type : "anthropic"
123
- system_prompt: "You are a data analyst. Help users understand their data by running queries and providing insights. Always explain your findings clearly."
124
- max_steps : 15
125
- model : "claude-4-sonnet-20250514"
126
- temperature : 0.3
127
- reasoning : true
128
- }
129
- }
130
- ```
131
-
132
- ---
133
-
134
- ## Update Agent
135
-
136
- ```
137
- PUT /workspace/{workspace_id}/agent/{agent_id}
138
- ```
139
-
140
- **Query Parameters:**
141
- - `publish` (bool, default: true): Publish changes immediately
142
- - `tools` (bool, default: true): Include tool information in response
143
-
144
- **Content-Type:** `text/x-xanoscript`
145
-
146
- ---
147
-
148
- ## Delete Agent
149
-
150
- ```
151
- DELETE /workspace/{workspace_id}/agent/{agent_id}
152
- ```
153
-
154
- **Warning:** This action cannot be undone.
@@ -1,236 +0,0 @@
1
- # API Group & Endpoints
2
-
3
- API Groups are containers for related API endpoints. Each API group has its own base URL and can contain multiple API endpoints.
4
-
5
- ## API Group Endpoints
6
-
7
- | Method | Endpoint | Description |
8
- |--------|----------|-------------|
9
- | GET | `/workspace/{workspace_id}/apigroup` | List API groups |
10
- | GET | `/workspace/{workspace_id}/apigroup/{apigroup_id}` | Get API group |
11
- | POST | `/workspace/{workspace_id}/apigroup` | Create API group |
12
- | PUT | `/workspace/{workspace_id}/apigroup/{apigroup_id}` | Update API group |
13
- | DELETE | `/workspace/{workspace_id}/apigroup/{apigroup_id}` | Delete API group |
14
- | PUT | `/workspace/{workspace_id}/apigroup/{apigroup_id}/security` | Update security |
15
- | GET | `/workspace/{workspace_id}/apigroup/{apigroup_id}/openapi` | Get OpenAPI spec |
16
-
17
- ## API Endpoint Endpoints
18
-
19
- | Method | Endpoint | Description |
20
- |--------|----------|-------------|
21
- | GET | `/workspace/{workspace_id}/apigroup/{apigroup_id}/api` | List endpoints |
22
- | GET | `/workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}` | Get endpoint |
23
- | POST | `/workspace/{workspace_id}/apigroup/{apigroup_id}/api` | Create endpoint |
24
- | PUT | `/workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}` | Update endpoint |
25
- | DELETE | `/workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}` | Delete endpoint |
26
- | PUT | `/workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}/security` | Update security |
27
- | GET | `/workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}/openapi` | Get OpenAPI spec |
28
-
29
- ---
30
-
31
- ## List API Groups
32
-
33
- ```
34
- GET /workspace/{workspace_id}/apigroup
35
- ```
36
-
37
- **Query Parameters:**
38
- | Parameter | Type | Default | Description |
39
- |-----------|------|---------|-------------|
40
- | `branch` | text | "" | Branch label |
41
- | `page` | int | 1 | Page number |
42
- | `per_page` | int | 50 | Items per page |
43
- | `search` | text | "" | Search filter |
44
- | `sort` | enum | "created_at" | Sort field |
45
- | `order` | enum | "desc" | Sort order |
46
- | `middleware` | bool | true | Include middleware info |
47
-
48
- ---
49
-
50
- ## Create API Group
51
-
52
- ```
53
- POST /workspace/{workspace_id}/apigroup
54
- ```
55
-
56
- **Content-Type:** `text/x-xanoscript`
57
-
58
- ```xanoscript
59
- api_group foo {
60
- canonical = "custom"
61
- swagger = {active: true}
62
- }
63
- ```
64
-
65
- **Query Parameters:**
66
- - `branch` (text): Target branch label
67
- - `middleware` (bool): Include middleware in response
68
-
69
- ---
70
-
71
- ## Update API Group
72
-
73
- ```
74
- PUT /workspace/{workspace_id}/apigroup/{apigroup_id}
75
- ```
76
-
77
- **Content-Type:** `text/x-xanoscript`
78
-
79
- ---
80
-
81
- ## Delete API Group
82
-
83
- ```
84
- DELETE /workspace/{workspace_id}/apigroup/{apigroup_id}
85
- ```
86
-
87
- Deletes the API group and all its endpoints. Cannot be undone.
88
-
89
- ---
90
-
91
- ## Update API Group Security
92
-
93
- ```
94
- PUT /workspace/{workspace_id}/apigroup/{apigroup_id}/security
95
- ```
96
-
97
- **Parameters:**
98
- | Parameter | Type | Required | Description |
99
- |-----------|------|----------|-------------|
100
- | `guid` | text | Yes | New security GUID |
101
- | `canonical` | text | Yes | Canonical URL path |
102
-
103
- ---
104
-
105
- ## Get API Group OpenAPI Spec
106
-
107
- ```
108
- GET /workspace/{workspace_id}/apigroup/{apigroup_id}/openapi
109
- ```
110
-
111
- Returns OpenAPI specification as JSON.
112
-
113
- ---
114
-
115
- # API Endpoints
116
-
117
- ## List API Endpoints
118
-
119
- ```
120
- GET /workspace/{workspace_id}/apigroup/{apigroup_id}/api
121
- ```
122
-
123
- **Query Parameters:**
124
- | Parameter | Type | Default | Description |
125
- |-----------|------|---------|-------------|
126
- | `page` | int | 1 | Page number |
127
- | `per_page` | int | 50 | Items per page |
128
- | `search` | text | "" | Search filter |
129
- | `sort` | enum | "created_at" | Sort field |
130
- | `order` | enum | "desc" | Sort order |
131
-
132
- ---
133
-
134
- ## Create API Endpoint
135
-
136
- ```
137
- POST /workspace/{workspace_id}/apigroup/{apigroup_id}/api
138
- ```
139
-
140
- **Content-Type:** `text/x-xanoscript`
141
-
142
- ### XanoScript API Endpoint Syntax
143
-
144
- ```xanoscript
145
- query foo verb=GET {
146
- input {
147
- int score
148
- }
149
-
150
- stack {
151
- var $x1 {
152
- value = $input.score + 1
153
- }
154
- }
155
-
156
- response = $x1
157
- }
158
- ```
159
-
160
- ### HTTP Verbs
161
- Use `verb=` to specify: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`
162
-
163
- ### Input Section
164
- Define request parameters:
165
-
166
- ```xanoscript
167
- input {
168
- int required_param
169
- text optional_param?
170
- bool param_with_default? default = true
171
- }
172
- ```
173
-
174
- ### Stack Section
175
- The API logic using XanoScript:
176
-
177
- ```xanoscript
178
- stack {
179
- // Variable assignment
180
- var $result {
181
- value = $input.score * 2
182
- }
183
-
184
- // Database queries
185
- db.query user {
186
- where = $db.user.id == $input.user_id
187
- return = {type: "single"}
188
- }
189
-
190
- // Conditional logic
191
- if $input.score > 10 {
192
- var $bonus { value = 100 }
193
- }
194
- }
195
- ```
196
-
197
- ### Response
198
- Define what the endpoint returns:
199
-
200
- ```xanoscript
201
- response = $result
202
- ```
203
-
204
- ---
205
-
206
- ## Update API Endpoint
207
-
208
- ```
209
- PUT /workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}
210
- ```
211
-
212
- **Query Parameters:**
213
- - `publish` (bool, default: true): Publish changes immediately
214
-
215
- **Content-Type:** `text/x-xanoscript`
216
-
217
- ---
218
-
219
- ## Delete API Endpoint
220
-
221
- ```
222
- DELETE /workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}
223
- ```
224
-
225
- ---
226
-
227
- ## Update API Endpoint Security
228
-
229
- ```
230
- PUT /workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}/security
231
- ```
232
-
233
- **Parameters:**
234
- | Parameter | Type | Required | Description |
235
- |-----------|------|----------|-------------|
236
- | `guid` | text | Yes | New security GUID |
@@ -1,68 +0,0 @@
1
- # Authentication API
2
-
3
- The Headless API requires authentication for all endpoints. This document covers the authentication endpoint.
4
-
5
- ## Endpoints
6
-
7
- | Method | Endpoint | Description |
8
- |--------|----------|-------------|
9
- | GET | `/auth/me` | Get current user info |
10
-
11
- ---
12
-
13
- ## Get Current User
14
-
15
- ```
16
- GET /auth/me
17
- ```
18
-
19
- Retrieve information about the authenticated user.
20
-
21
- **Response Example:**
22
- ```json
23
- {
24
- "id": 123,
25
- "name": "User Name",
26
- "email": "user@example.com",
27
- "extras": {
28
- "instance": {
29
- "membership": {
30
- "role": "admin",
31
- "workspace": {
32
- "id": [1, 2, 3]
33
- }
34
- }
35
- }
36
- }
37
- }
38
- ```
39
-
40
- **Response Fields:**
41
- | Field | Type | Description |
42
- |-------|------|-------------|
43
- | `id` | int | User's unique identifier |
44
- | `name` | text | User's display name |
45
- | `email` | text | User's email address |
46
- | `extras` | object | Additional authentication context |
47
-
48
- ### Extras Object
49
-
50
- The `extras` object contains instance membership information:
51
-
52
- | Path | Description |
53
- |------|-------------|
54
- | `extras.instance.membership.role` | User's role |
55
- | `extras.instance.membership.workspace.id` | Accessible workspace IDs (for free tier) |
56
-
57
- ### User Roles
58
-
59
- | Role | Description |
60
- |------|-------------|
61
- | `explore` | Free tier - limited workspace access |
62
- | `admin` | Full access to all workspaces |
63
-
64
- ### Notes
65
-
66
- - The `workspace.id` array is used for free tier users to restrict access
67
- - Paid users can access all workspaces not in the disabled list
68
- - The role determines what operations the user can perform
package/api_docs/file.md DELETED
@@ -1,190 +0,0 @@
1
- # File & Static Hosting API
2
-
3
- File management endpoints allow you to upload, list, and delete files in a workspace. Static hosting allows you to deploy static websites.
4
-
5
- ## File Endpoints
6
-
7
- | Method | Endpoint | Description |
8
- |--------|----------|-------------|
9
- | GET | `/workspace/{workspace_id}/file` | List files |
10
- | POST | `/workspace/{workspace_id}/file` | Upload file |
11
- | DELETE | `/workspace/{workspace_id}/file/{file_id}` | Delete file |
12
- | DELETE | `/workspace/{workspace_id}/file/bulk_delete` | Bulk delete files |
13
-
14
- ## Static Host Endpoints
15
-
16
- | Method | Endpoint | Description |
17
- |--------|----------|-------------|
18
- | GET | `/workspace/{workspace_id}/static_host` | List static hosts |
19
- | GET | `/workspace/{workspace_id}/static_host/{static_host}/build` | List builds |
20
- | POST | `/workspace/{workspace_id}/static_host/{static_host}/build` | Create build |
21
- | GET | `/workspace/{workspace_id}/static_host/{static_host}/build/{build_id}` | Get build |
22
- | POST | `/workspace/{workspace_id}/static_host/{static_host}/build/{build_id}/env` | Deploy to environment |
23
- | DELETE | `/workspace/{workspace_id}/static_host/{static_host}/build/{build_id}` | Delete build |
24
-
25
- ---
26
-
27
- # Files
28
-
29
- ## List Files
30
-
31
- ```
32
- GET /workspace/{workspace_id}/file
33
- ```
34
-
35
- **Query Parameters:**
36
- | Parameter | Type | Default | Description |
37
- |-----------|------|---------|-------------|
38
- | `page` | int | 1 | Page number |
39
- | `per_page` | int | 50 | Items per page (1-10000) |
40
- | `search` | text | "" | Search by filename or MIME type |
41
- | `access` | enum | "public" | Access level: "public", "private" |
42
- | `sort` | enum | "created_at" | Sort: "created_at", "name", "size", "mime" |
43
- | `order` | enum | "desc" | Sort order |
44
-
45
- **Response Fields:**
46
- | Field | Type | Description |
47
- |-------|------|-------------|
48
- | `id` | int | File unique identifier |
49
- | `name` | text | Original filename |
50
- | `size` | int | File size in bytes |
51
- | `mime` | text | MIME type |
52
- | `path` | text | Public URL path |
53
- | `access` | enum | Access level |
54
- | `created_at` | timestamp | Upload timestamp |
55
-
56
- ---
57
-
58
- ## Upload File
59
-
60
- ```
61
- POST /workspace/{workspace_id}/file
62
- ```
63
-
64
- **Content-Type:** `multipart/form-data`
65
-
66
- **Parameters:**
67
- | Parameter | Type | Required | Default | Description |
68
- |-----------|------|----------|---------|-------------|
69
- | `content` | file | Yes | - | File to upload |
70
- | `type` | enum | No | "" | Type hint: "image", "video", "audio" |
71
- | `access` | enum | No | "public" | Access: "public", "private" |
72
-
73
- **Notes:**
74
- - Free tier users are restricted to image uploads only
75
- - File size limits may apply based on plan
76
-
77
- ---
78
-
79
- ## Delete File
80
-
81
- ```
82
- DELETE /workspace/{workspace_id}/file/{file_id}
83
- ```
84
-
85
- **Warning:** Cannot be undone.
86
-
87
- ---
88
-
89
- ## Bulk Delete Files
90
-
91
- ```
92
- DELETE /workspace/{workspace_id}/file/bulk_delete
93
- ```
94
-
95
- **Parameters:**
96
- | Parameter | Type | Required | Description |
97
- |-----------|------|----------|-------------|
98
- | `ids[]` | int[] | Yes | Array of file IDs to delete |
99
-
100
- **Warning:** Cannot be undone.
101
-
102
- ---
103
-
104
- # Static Hosting
105
-
106
- ## List Static Hosts
107
-
108
- ```
109
- GET /workspace/{workspace_id}/static_host
110
- ```
111
-
112
- **Query Parameters:**
113
- - `page` (int, default: 1): Page number
114
-
115
- ---
116
-
117
- ## List Builds
118
-
119
- ```
120
- GET /workspace/{workspace_id}/static_host/{static_host}/build
121
- ```
122
-
123
- **Path Parameters:**
124
- - `static_host` (text): Static host name
125
-
126
- **Query Parameters:**
127
- - `page` (int, default: 1): Page number
128
-
129
- ---
130
-
131
- ## Create Build
132
-
133
- ```
134
- POST /workspace/{workspace_id}/static_host/{static_host}/build
135
- ```
136
-
137
- Upload a zip file to create a new build.
138
-
139
- **Content-Type:** `multipart/form-data`
140
-
141
- **Parameters:**
142
- | Parameter | Type | Required | Default | Description |
143
- |-----------|------|----------|---------|-------------|
144
- | `file` | file | Yes | - | Zip archive of static site |
145
- | `name` | text | Yes | - | Build name/version |
146
- | `description` | text | No | "" | Build description |
147
-
148
- **Response:**
149
- Returns created build object with dev environment URL.
150
-
151
- **Notes:**
152
- - New builds are automatically deployed to `dev` environment
153
- - Upload a zip file containing your static site files
154
- - If `static_host` is "default" and doesn't exist, it will be created
155
-
156
- ---
157
-
158
- ## Get Build
159
-
160
- ```
161
- GET /workspace/{workspace_id}/static_host/{static_host}/build/{build_id}
162
- ```
163
-
164
- ---
165
-
166
- ## Deploy Build to Environment
167
-
168
- ```
169
- POST /workspace/{workspace_id}/static_host/{static_host}/build/{build_id}/env
170
- ```
171
-
172
- Deploy a build to a specific environment.
173
-
174
- **Parameters:**
175
- | Parameter | Type | Required | Description |
176
- |-----------|------|----------|-------------|
177
- | `env` | enum | Yes | Environment: "prod", "dev" |
178
-
179
- **Response:**
180
- Returns the environment URL for the deployed build.
181
-
182
- ---
183
-
184
- ## Delete Build
185
-
186
- ```
187
- DELETE /workspace/{workspace_id}/static_host/{static_host}/build/{build_id}
188
- ```
189
-
190
- **Warning:** Cannot be undone.