@xano/developer-mcp 1.0.11 → 1.0.13
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/README.md +78 -60
- package/dist/api_docs/format.d.ts +5 -0
- package/dist/api_docs/format.js +168 -0
- package/dist/api_docs/index.d.ts +52 -0
- package/dist/api_docs/index.js +111 -0
- package/dist/api_docs/topics/agent.d.ts +2 -0
- package/dist/api_docs/topics/agent.js +142 -0
- package/dist/api_docs/topics/api.d.ts +2 -0
- package/dist/api_docs/topics/api.js +176 -0
- package/dist/api_docs/topics/apigroup.d.ts +2 -0
- package/dist/api_docs/topics/apigroup.js +124 -0
- package/dist/api_docs/topics/authentication.d.ts +2 -0
- package/dist/api_docs/topics/authentication.js +61 -0
- package/dist/api_docs/topics/branch.d.ts +2 -0
- package/dist/api_docs/topics/branch.js +73 -0
- package/dist/api_docs/topics/file.d.ts +2 -0
- package/dist/api_docs/topics/file.js +70 -0
- package/dist/api_docs/topics/function.d.ts +2 -0
- package/dist/api_docs/topics/function.js +164 -0
- package/dist/api_docs/topics/history.d.ts +2 -0
- package/dist/api_docs/topics/history.js +149 -0
- package/dist/api_docs/topics/mcp_server.d.ts +2 -0
- package/dist/api_docs/topics/mcp_server.js +139 -0
- package/dist/api_docs/topics/middleware.d.ts +2 -0
- package/dist/api_docs/topics/middleware.js +156 -0
- package/dist/api_docs/topics/realtime.d.ts +2 -0
- package/dist/api_docs/topics/realtime.js +112 -0
- package/dist/api_docs/topics/start.d.ts +2 -0
- package/dist/api_docs/topics/start.js +107 -0
- package/dist/api_docs/topics/table.d.ts +2 -0
- package/dist/api_docs/topics/table.js +195 -0
- package/dist/api_docs/topics/task.d.ts +2 -0
- package/dist/api_docs/topics/task.js +165 -0
- package/dist/api_docs/topics/tool.d.ts +2 -0
- package/dist/api_docs/topics/tool.js +150 -0
- package/dist/api_docs/topics/workflows.d.ts +2 -0
- package/dist/api_docs/topics/workflows.js +131 -0
- package/dist/api_docs/topics/workspace.d.ts +2 -0
- package/dist/api_docs/topics/workspace.js +153 -0
- package/dist/api_docs/types.d.ts +79 -0
- package/dist/api_docs/types.js +4 -0
- package/dist/index.js +46 -92
- package/dist/templates/init-workspace.js +2 -16
- package/package.json +4 -7
- package/api_docs/addon.md +0 -193
- package/api_docs/agent.md +0 -154
- package/api_docs/api_group.md +0 -236
- package/api_docs/authentication.md +0 -68
- package/api_docs/file.md +0 -190
- package/api_docs/function.md +0 -217
- package/api_docs/history.md +0 -263
- package/api_docs/index.md +0 -104
- package/api_docs/mcp_server.md +0 -139
- package/api_docs/middleware.md +0 -205
- package/api_docs/realtime.md +0 -153
- package/api_docs/table.md +0 -151
- package/api_docs/task.md +0 -191
- package/api_docs/tool.md +0 -216
- package/api_docs/triggers.md +0 -344
- package/api_docs/workspace.md +0 -246
- /package/{xanoscript_docs → dist/xanoscript_docs}/README.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/addons.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/agents.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/apis.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/database.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/debugging.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/ephemeral.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/frontend.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/functions.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/integrations.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/mcp-servers.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/performance.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/realtime.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/schema.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/security.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/streaming.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/syntax.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/tables.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/tasks.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/testing.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/tools.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/triggers.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/types.md +0 -0
- /package/{xanoscript_docs → dist/xanoscript_docs}/version.json +0 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
export const apiDoc = {
|
|
2
|
+
topic: "api",
|
|
3
|
+
title: "API Endpoint Management",
|
|
4
|
+
description: `API endpoints define individual HTTP routes within an API group. Each endpoint has a path, HTTP method, inputs, and XanoScript logic.
|
|
5
|
+
|
|
6
|
+
## Key Concepts
|
|
7
|
+
- Endpoints belong to API groups
|
|
8
|
+
- Each endpoint has: method (GET/POST/PUT/DELETE), path, inputs, and stack (logic)
|
|
9
|
+
- Supports path parameters like \`/users/{id}\`
|
|
10
|
+
- XanoScript defines the endpoint logic`,
|
|
11
|
+
ai_hints: `- Use \`include_xanoscript=true\` to see the endpoint's implementation
|
|
12
|
+
- Check existing endpoints before creating to avoid duplicates
|
|
13
|
+
- Path parameters use \`{param_name}\` syntax
|
|
14
|
+
- Common patterns: CRUD operations, search, authentication
|
|
15
|
+
- Security settings can override group-level settings`,
|
|
16
|
+
endpoints: [
|
|
17
|
+
{
|
|
18
|
+
method: "GET",
|
|
19
|
+
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/api",
|
|
20
|
+
tool_name: "listApis",
|
|
21
|
+
description: "List all API endpoints in an API group.",
|
|
22
|
+
parameters: [
|
|
23
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
24
|
+
{ name: "apigroup_id", type: "integer", required: true, in: "path", description: "API Group ID" },
|
|
25
|
+
{ name: "page", type: "integer", default: 1, description: "Page number" },
|
|
26
|
+
{ name: "per_page", type: "integer", default: 50, description: "Items per page" },
|
|
27
|
+
{ name: "search", type: "string", description: "Search by name or path" },
|
|
28
|
+
{ name: "include_xanoscript", type: "boolean", default: false, description: "Include XanoScript code in response" },
|
|
29
|
+
{ name: "include_draft", type: "boolean", default: false, description: "Include draft versions" },
|
|
30
|
+
{ name: "branch", type: "string", description: "Filter by branch name" }
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
method: "GET",
|
|
35
|
+
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}",
|
|
36
|
+
tool_name: "getApi",
|
|
37
|
+
description: "Get details of a specific API endpoint.",
|
|
38
|
+
parameters: [
|
|
39
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
40
|
+
{ name: "apigroup_id", type: "integer", required: true, in: "path", description: "API Group ID" },
|
|
41
|
+
{ name: "api_id", type: "integer", required: true, in: "path", description: "API ID" },
|
|
42
|
+
{ name: "include_xanoscript", type: "boolean", default: false, description: "Include XanoScript code" },
|
|
43
|
+
{ name: "include_draft", type: "boolean", default: false, description: "Include draft version" }
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
method: "POST",
|
|
48
|
+
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/api",
|
|
49
|
+
tool_name: "createApi",
|
|
50
|
+
description: "Create a new API endpoint with XanoScript logic.",
|
|
51
|
+
parameters: [
|
|
52
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
53
|
+
{ name: "apigroup_id", type: "integer", required: true, in: "path", description: "API Group ID" }
|
|
54
|
+
],
|
|
55
|
+
request_body: {
|
|
56
|
+
type: "application/json",
|
|
57
|
+
properties: {
|
|
58
|
+
name: { type: "string", description: "Endpoint name", required: true },
|
|
59
|
+
path: { type: "string", description: "URL path (e.g., /users/{id})", required: true },
|
|
60
|
+
verb: { type: "string", description: "HTTP method: GET, POST, PUT, DELETE", required: true },
|
|
61
|
+
description: { type: "string", description: "Endpoint description" },
|
|
62
|
+
xanoscript: { type: "string", description: "XanoScript code defining the endpoint logic" }
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
example: {
|
|
66
|
+
method: "POST",
|
|
67
|
+
path: "/workspace/1/apigroup/2/api",
|
|
68
|
+
body: {
|
|
69
|
+
name: "getUsers",
|
|
70
|
+
path: "/users",
|
|
71
|
+
verb: "GET",
|
|
72
|
+
xanoscript: "query getUsers {\n response = db.users.query().all()\n}"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
method: "PUT",
|
|
78
|
+
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}",
|
|
79
|
+
tool_name: "updateApi",
|
|
80
|
+
description: "Update an existing API endpoint.",
|
|
81
|
+
parameters: [
|
|
82
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
83
|
+
{ name: "apigroup_id", type: "integer", required: true, in: "path", description: "API Group ID" },
|
|
84
|
+
{ name: "api_id", type: "integer", required: true, in: "path", description: "API ID" },
|
|
85
|
+
{ name: "publish", type: "boolean", default: true, description: "Publish changes immediately" }
|
|
86
|
+
],
|
|
87
|
+
request_body: {
|
|
88
|
+
type: "application/json",
|
|
89
|
+
properties: {
|
|
90
|
+
name: { type: "string", description: "Endpoint name" },
|
|
91
|
+
path: { type: "string", description: "URL path" },
|
|
92
|
+
verb: { type: "string", description: "HTTP method" },
|
|
93
|
+
description: { type: "string", description: "Endpoint description" },
|
|
94
|
+
xanoscript: { type: "string", description: "XanoScript code" }
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
method: "DELETE",
|
|
100
|
+
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}",
|
|
101
|
+
tool_name: "deleteApi",
|
|
102
|
+
description: "Delete an API endpoint.",
|
|
103
|
+
parameters: [
|
|
104
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
105
|
+
{ name: "apigroup_id", type: "integer", required: true, in: "path", description: "API Group ID" },
|
|
106
|
+
{ name: "api_id", type: "integer", required: true, in: "path", description: "API ID" }
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
method: "PUT",
|
|
111
|
+
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}/security",
|
|
112
|
+
tool_name: "updateApiSecurity",
|
|
113
|
+
description: "Update security settings for a specific endpoint (overrides group settings).",
|
|
114
|
+
parameters: [
|
|
115
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
116
|
+
{ name: "apigroup_id", type: "integer", required: true, in: "path", description: "API Group ID" },
|
|
117
|
+
{ name: "api_id", type: "integer", required: true, in: "path", description: "API ID" }
|
|
118
|
+
],
|
|
119
|
+
request_body: {
|
|
120
|
+
type: "application/json",
|
|
121
|
+
properties: {
|
|
122
|
+
guid: { type: "string", description: "Security group GUID" }
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
schemas: {
|
|
128
|
+
Api: {
|
|
129
|
+
type: "object",
|
|
130
|
+
properties: {
|
|
131
|
+
id: { type: "integer" },
|
|
132
|
+
name: { type: "string" },
|
|
133
|
+
path: { type: "string" },
|
|
134
|
+
verb: { type: "string", enum: ["GET", "POST", "PUT", "DELETE"] },
|
|
135
|
+
description: { type: "string" },
|
|
136
|
+
xanoscript: { type: "string", description: "Only included if include_xanoscript=true" },
|
|
137
|
+
created_at: { type: "string", format: "date-time" },
|
|
138
|
+
updated_at: { type: "string", format: "date-time" }
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
examples: [
|
|
143
|
+
{
|
|
144
|
+
title: "Create a GET endpoint",
|
|
145
|
+
description: "Create a simple endpoint to list all users",
|
|
146
|
+
request: {
|
|
147
|
+
method: "POST",
|
|
148
|
+
path: "/workspace/1/apigroup/2/api",
|
|
149
|
+
body: {
|
|
150
|
+
name: "listUsers",
|
|
151
|
+
path: "/users",
|
|
152
|
+
verb: "GET",
|
|
153
|
+
xanoscript: `query listUsers {
|
|
154
|
+
input {
|
|
155
|
+
int page = 1
|
|
156
|
+
int per_page = 20
|
|
157
|
+
}
|
|
158
|
+
stack {
|
|
159
|
+
var $users {
|
|
160
|
+
value = db.users.query().paginate($input.page, $input.per_page)
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
response = $users
|
|
164
|
+
}`
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
response: {
|
|
168
|
+
id: 123,
|
|
169
|
+
name: "listUsers",
|
|
170
|
+
path: "/users",
|
|
171
|
+
verb: "GET"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
related_topics: ["apigroup", "function", "table"]
|
|
176
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
export const apigroupDoc = {
|
|
2
|
+
topic: "apigroup",
|
|
3
|
+
title: "API Group Management",
|
|
4
|
+
description: `API Groups are collections of related REST endpoints. They provide logical grouping, shared authentication, and generate Swagger/OpenAPI documentation.
|
|
5
|
+
|
|
6
|
+
## Key Concepts
|
|
7
|
+
- Each workspace has one or more API groups
|
|
8
|
+
- API groups contain individual API endpoints
|
|
9
|
+
- Groups can have shared authentication settings
|
|
10
|
+
- Each group generates its own OpenAPI/Swagger spec`,
|
|
11
|
+
ai_hints: `- List existing API groups before creating new ones
|
|
12
|
+
- Use meaningful names (e.g., "public", "admin", "webhooks")
|
|
13
|
+
- Security settings apply to all endpoints in the group
|
|
14
|
+
- Get OpenAPI spec to understand available endpoints in a group`,
|
|
15
|
+
endpoints: [
|
|
16
|
+
{
|
|
17
|
+
method: "GET",
|
|
18
|
+
path: "/workspace/{workspace_id}/apigroup",
|
|
19
|
+
tool_name: "listApiGroups",
|
|
20
|
+
description: "List all API groups in a workspace with filtering and sorting.",
|
|
21
|
+
parameters: [
|
|
22
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
23
|
+
{ name: "page", type: "integer", default: 1, description: "Page number" },
|
|
24
|
+
{ name: "per_page", type: "integer", default: 50, description: "Items per page" },
|
|
25
|
+
{ name: "search", type: "string", description: "Search by name" },
|
|
26
|
+
{ name: "sort", type: "string", enum: ["id", "name", "created_at"], default: "created_at", description: "Sort field" },
|
|
27
|
+
{ name: "order", type: "string", enum: ["asc", "desc"], default: "desc", description: "Sort direction" }
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
method: "GET",
|
|
32
|
+
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}",
|
|
33
|
+
tool_name: "getApiGroup",
|
|
34
|
+
description: "Get details of a specific API group.",
|
|
35
|
+
parameters: [
|
|
36
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
37
|
+
{ name: "apigroup_id", type: "integer", required: true, in: "path", description: "API Group ID" }
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
method: "POST",
|
|
42
|
+
path: "/workspace/{workspace_id}/apigroup",
|
|
43
|
+
tool_name: "createApiGroup",
|
|
44
|
+
description: "Create a new API group in the workspace.",
|
|
45
|
+
parameters: [
|
|
46
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
47
|
+
],
|
|
48
|
+
request_body: {
|
|
49
|
+
type: "application/json",
|
|
50
|
+
properties: {
|
|
51
|
+
name: { type: "string", description: "API group name", required: true },
|
|
52
|
+
description: { type: "string", description: "API group description" }
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
method: "PUT",
|
|
58
|
+
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}",
|
|
59
|
+
tool_name: "updateApiGroup",
|
|
60
|
+
description: "Update an existing API group.",
|
|
61
|
+
parameters: [
|
|
62
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
63
|
+
{ name: "apigroup_id", type: "integer", required: true, in: "path", description: "API Group ID" }
|
|
64
|
+
],
|
|
65
|
+
request_body: {
|
|
66
|
+
type: "application/json",
|
|
67
|
+
properties: {
|
|
68
|
+
name: { type: "string", description: "API group name" },
|
|
69
|
+
description: { type: "string", description: "API group description" }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
method: "DELETE",
|
|
75
|
+
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}",
|
|
76
|
+
tool_name: "deleteApiGroup",
|
|
77
|
+
description: "Delete an API group and all its endpoints.",
|
|
78
|
+
parameters: [
|
|
79
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
80
|
+
{ name: "apigroup_id", type: "integer", required: true, in: "path", description: "API Group ID" }
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
method: "GET",
|
|
85
|
+
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/openapi",
|
|
86
|
+
tool_name: "getApiGroupOpenAPI",
|
|
87
|
+
description: "Get OpenAPI v3 specification for this API group's endpoints.",
|
|
88
|
+
parameters: [
|
|
89
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
90
|
+
{ name: "apigroup_id", type: "integer", required: true, in: "path", description: "API Group ID" }
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
method: "PUT",
|
|
95
|
+
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/security",
|
|
96
|
+
tool_name: "updateApiGroupSecurity",
|
|
97
|
+
description: "Update security/authentication settings for the API group.",
|
|
98
|
+
parameters: [
|
|
99
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
100
|
+
{ name: "apigroup_id", type: "integer", required: true, in: "path", description: "API Group ID" }
|
|
101
|
+
],
|
|
102
|
+
request_body: {
|
|
103
|
+
type: "application/json",
|
|
104
|
+
properties: {
|
|
105
|
+
guid: { type: "string", description: "Security group GUID" }
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
schemas: {
|
|
111
|
+
ApiGroup: {
|
|
112
|
+
type: "object",
|
|
113
|
+
properties: {
|
|
114
|
+
id: { type: "integer" },
|
|
115
|
+
name: { type: "string" },
|
|
116
|
+
description: { type: "string" },
|
|
117
|
+
swagger: { type: "boolean", description: "Whether Swagger docs are enabled" },
|
|
118
|
+
created_at: { type: "string", format: "date-time" },
|
|
119
|
+
updated_at: { type: "string", format: "date-time" }
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
related_topics: ["api", "workspace", "authentication"]
|
|
124
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export const authenticationDoc = {
|
|
2
|
+
topic: "authentication",
|
|
3
|
+
title: "Authentication & Authorization",
|
|
4
|
+
description: `The Xano Meta API uses Access Tokens for authentication and a scope-based system for authorization.
|
|
5
|
+
|
|
6
|
+
## Access Tokens
|
|
7
|
+
Create access tokens in the Xano dashboard under Settings > Access Tokens.
|
|
8
|
+
|
|
9
|
+
Include the token in all requests:
|
|
10
|
+
\`\`\`
|
|
11
|
+
Authorization: Bearer <your-access-token>
|
|
12
|
+
\`\`\`
|
|
13
|
+
|
|
14
|
+
## Scope System
|
|
15
|
+
Access is controlled through hierarchical scopes:
|
|
16
|
+
|
|
17
|
+
| Scope | Values | Description |
|
|
18
|
+
|-------|--------|-------------|
|
|
19
|
+
| \`instance:workspace\` | read, update, create | Workspace-level permissions |
|
|
20
|
+
| \`workspace:api\` | read, create, update | API management |
|
|
21
|
+
| \`workspace:requesthistory\` | read | Audit/history access |
|
|
22
|
+
| \`workspace:file\` | read, create | File management |
|
|
23
|
+
| \`workspace:action:export\` | enabled | Export functionality |
|
|
24
|
+
|
|
25
|
+
## Role Types
|
|
26
|
+
- **explore**: Limited free/explore tier role
|
|
27
|
+
- **paid**: Full access to all features
|
|
28
|
+
|
|
29
|
+
## Current User
|
|
30
|
+
Get the authenticated user's info:
|
|
31
|
+
\`\`\`
|
|
32
|
+
GET /auth/me
|
|
33
|
+
\`\`\`
|
|
34
|
+
|
|
35
|
+
Returns: id, name, email, and extras (including role and workspace access).`,
|
|
36
|
+
ai_hints: `- Always include Authorization header with Bearer token
|
|
37
|
+
- Check user role before attempting paid-only operations (tasks, some exports)
|
|
38
|
+
- Scope errors return 403 - check if token has required permissions
|
|
39
|
+
- Use \`GET /auth/me\` to verify token and see accessible workspaces`,
|
|
40
|
+
endpoints: [
|
|
41
|
+
{
|
|
42
|
+
method: "GET",
|
|
43
|
+
path: "/auth/me",
|
|
44
|
+
tool_name: "getAuthMe",
|
|
45
|
+
description: "Get the authenticated user's information including ID, name, email, and role.",
|
|
46
|
+
response: {
|
|
47
|
+
type: "object",
|
|
48
|
+
properties: {
|
|
49
|
+
id: { type: "integer" },
|
|
50
|
+
name: { type: "string" },
|
|
51
|
+
email: { type: "string" },
|
|
52
|
+
extras: {
|
|
53
|
+
type: "object",
|
|
54
|
+
description: "Contains instance.membership with role and workspace access"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
related_topics: ["start", "workspace"]
|
|
61
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export const branchDoc = {
|
|
2
|
+
topic: "branch",
|
|
3
|
+
title: "Branch Management",
|
|
4
|
+
description: `Branches provide environment separation for your Xano workspace. Use branches for development, staging, and production environments.
|
|
5
|
+
|
|
6
|
+
## Key Concepts
|
|
7
|
+
- Default branch is "v1" (cannot be deleted)
|
|
8
|
+
- Branches contain separate databases and configurations
|
|
9
|
+
- One branch is designated as "live" (production)
|
|
10
|
+
- Useful for safe development without affecting production
|
|
11
|
+
- Import schema to create new branches from exports
|
|
12
|
+
|
|
13
|
+
## Common Workflow
|
|
14
|
+
1. Create a development branch
|
|
15
|
+
2. Make and test changes on dev branch
|
|
16
|
+
3. Export schema from dev
|
|
17
|
+
4. Import schema to production branch`,
|
|
18
|
+
ai_hints: `- Cannot delete the "v1" branch or the live branch
|
|
19
|
+
- Use branch parameter in list endpoints to filter by branch
|
|
20
|
+
- Import schema creates a new branch from export file
|
|
21
|
+
- Always verify branch before making changes (dev vs prod)
|
|
22
|
+
- Export before major changes for backup`,
|
|
23
|
+
endpoints: [
|
|
24
|
+
{
|
|
25
|
+
method: "GET",
|
|
26
|
+
path: "/workspace/{workspace_id}/branch",
|
|
27
|
+
tool_name: "listBranches",
|
|
28
|
+
description: "List all branches in a workspace including the default 'v1' branch.",
|
|
29
|
+
parameters: [
|
|
30
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
method: "DELETE",
|
|
35
|
+
path: "/workspace/{workspace_id}/branch/{branch_label}",
|
|
36
|
+
tool_name: "deleteBranch",
|
|
37
|
+
description: "Delete a branch. Cannot delete 'v1' or the live branch.",
|
|
38
|
+
parameters: [
|
|
39
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
40
|
+
{ name: "branch_label", type: "string", required: true, in: "path", description: "Branch label/name to delete" }
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
schemas: {
|
|
45
|
+
Branch: {
|
|
46
|
+
type: "object",
|
|
47
|
+
properties: {
|
|
48
|
+
label: { type: "string", description: "Branch identifier (e.g., 'v1', 'dev')" },
|
|
49
|
+
is_live: { type: "boolean", description: "Whether this is the live/production branch" },
|
|
50
|
+
created_at: { type: "string", format: "date-time" }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
examples: [
|
|
55
|
+
{
|
|
56
|
+
title: "List all branches",
|
|
57
|
+
description: "Get all branches in a workspace",
|
|
58
|
+
request: {
|
|
59
|
+
method: "GET",
|
|
60
|
+
path: "/workspace/1/branch",
|
|
61
|
+
headers: { "Authorization": "Bearer <token>" }
|
|
62
|
+
},
|
|
63
|
+
response: {
|
|
64
|
+
items: [
|
|
65
|
+
{ label: "v1", is_live: true },
|
|
66
|
+
{ label: "dev", is_live: false },
|
|
67
|
+
{ label: "staging", is_live: false }
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
related_topics: ["workspace", "table"]
|
|
73
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export const fileDoc = {
|
|
2
|
+
topic: "file",
|
|
3
|
+
title: "File Storage Management",
|
|
4
|
+
description: `Files in Xano provide storage for images, videos, audio, and other attachments used by your application.
|
|
5
|
+
|
|
6
|
+
## Key Concepts
|
|
7
|
+
- Files are stored in Xano's managed storage
|
|
8
|
+
- Support for images, videos, audio, and general attachments
|
|
9
|
+
- Files can be public or private access
|
|
10
|
+
- Use in database blob fields or API responses
|
|
11
|
+
- Search and filter by name, type
|
|
12
|
+
|
|
13
|
+
## File Types
|
|
14
|
+
- **image**: PNG, JPG, GIF, WebP, etc.
|
|
15
|
+
- **video**: MP4, WebM, MOV, etc.
|
|
16
|
+
- **audio**: MP3, WAV, OGG, etc.
|
|
17
|
+
- **attachment**: PDF, DOC, ZIP, and other files`,
|
|
18
|
+
ai_hints: `- Files must be uploaded via multipart/form-data
|
|
19
|
+
- Use public access for CDN-served static assets
|
|
20
|
+
- Use private access for sensitive documents
|
|
21
|
+
- Reference files in table blob fields by ID or path
|
|
22
|
+
- Large file uploads may need chunked upload strategy`,
|
|
23
|
+
endpoints: [
|
|
24
|
+
{
|
|
25
|
+
method: "GET",
|
|
26
|
+
path: "/workspace/{workspace_id}/file",
|
|
27
|
+
tool_name: "listFiles",
|
|
28
|
+
description: "List all files in a workspace with filtering.",
|
|
29
|
+
parameters: [
|
|
30
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
31
|
+
{ name: "page", type: "integer", default: 1, description: "Page number" },
|
|
32
|
+
{ name: "per_page", type: "integer", default: 50, description: "Items per page" },
|
|
33
|
+
{ name: "search", type: "string", description: "Search by filename" },
|
|
34
|
+
{ name: "type", type: "string", enum: ["image", "video", "audio", "attachment"], description: "Filter by file type" }
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
method: "POST",
|
|
39
|
+
path: "/workspace/{workspace_id}/file",
|
|
40
|
+
tool_name: "uploadFile",
|
|
41
|
+
description: "Upload a file to the workspace.",
|
|
42
|
+
parameters: [
|
|
43
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
44
|
+
],
|
|
45
|
+
request_body: {
|
|
46
|
+
type: "multipart/form-data",
|
|
47
|
+
properties: {
|
|
48
|
+
file: { type: "file", description: "File to upload", required: true },
|
|
49
|
+
access: { type: "string", description: "Access level: public or private" }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
schemas: {
|
|
55
|
+
File: {
|
|
56
|
+
type: "object",
|
|
57
|
+
properties: {
|
|
58
|
+
id: { type: "integer" },
|
|
59
|
+
name: { type: "string" },
|
|
60
|
+
path: { type: "string" },
|
|
61
|
+
type: { type: "string", enum: ["image", "video", "audio", "attachment"] },
|
|
62
|
+
size: { type: "integer", description: "File size in bytes" },
|
|
63
|
+
access: { type: "string", enum: ["public", "private"] },
|
|
64
|
+
url: { type: "string", description: "Public URL if accessible" },
|
|
65
|
+
created_at: { type: "string", format: "date-time" }
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
related_topics: ["table", "api"]
|
|
70
|
+
};
|