@xano/developer-mcp 1.0.3 → 1.0.4
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/package.json +1 -1
- package/xanoscript_docs/apis.md +15 -1
package/package.json
CHANGED
package/xanoscript_docs/apis.md
CHANGED
|
@@ -10,6 +10,7 @@ HTTP endpoint definitions in XanoScript.
|
|
|
10
10
|
|
|
11
11
|
```xs
|
|
12
12
|
query "<path>" verb=<METHOD> {
|
|
13
|
+
api_group = "<GroupName>" # Required: API group for organization
|
|
13
14
|
description = "What this endpoint does"
|
|
14
15
|
auth = "<table>" # Optional: require authentication
|
|
15
16
|
input { ... }
|
|
@@ -23,7 +24,11 @@ query "<path>" verb=<METHOD> {
|
|
|
23
24
|
|
|
24
25
|
### API Groups (Required)
|
|
25
26
|
|
|
26
|
-
Every API endpoint **must** belong to an API group.
|
|
27
|
+
Every API endpoint **must** belong to an API group. API groups organize related endpoints together.
|
|
28
|
+
|
|
29
|
+
**Two requirements for API groups:**
|
|
30
|
+
1. Each `query` definition **must** include an `api_group` property specifying which group it belongs to
|
|
31
|
+
2. API groups are organized as folders within `apis/`, each with an `api_group.xs` file
|
|
27
32
|
|
|
28
33
|
- API groups appear as top-level folders under `apis/`
|
|
29
34
|
- Each group **must** have an `api_group.xs` file that defines the group
|
|
@@ -75,6 +80,7 @@ apis/
|
|
|
75
80
|
|
|
76
81
|
```xs
|
|
77
82
|
query "products" verb=GET {
|
|
83
|
+
api_group = "Products"
|
|
78
84
|
description = "List all products"
|
|
79
85
|
input {
|
|
80
86
|
int page?=1 filters=min:1
|
|
@@ -96,6 +102,7 @@ query "products" verb=GET {
|
|
|
96
102
|
### Public Endpoint (default)
|
|
97
103
|
```xs
|
|
98
104
|
query "status" verb=GET {
|
|
105
|
+
api_group = "System"
|
|
99
106
|
stack { }
|
|
100
107
|
response = { status: "ok" }
|
|
101
108
|
}
|
|
@@ -104,6 +111,7 @@ query "status" verb=GET {
|
|
|
104
111
|
### Authenticated Endpoint
|
|
105
112
|
```xs
|
|
106
113
|
query "profile" verb=GET {
|
|
114
|
+
api_group = "Users"
|
|
107
115
|
auth = "user" # Requires valid JWT
|
|
108
116
|
stack {
|
|
109
117
|
db.get "user" {
|
|
@@ -128,6 +136,7 @@ Use `{param}` in the path:
|
|
|
128
136
|
|
|
129
137
|
```xs
|
|
130
138
|
query "users/{user_id}" verb=GET {
|
|
139
|
+
api_group = "Users"
|
|
131
140
|
auth = "user"
|
|
132
141
|
input {
|
|
133
142
|
int user_id { table = "user" }
|
|
@@ -149,6 +158,7 @@ query "users/{user_id}" verb=GET {
|
|
|
149
158
|
### List (GET)
|
|
150
159
|
```xs
|
|
151
160
|
query "products" verb=GET {
|
|
161
|
+
api_group = "Products"
|
|
152
162
|
input {
|
|
153
163
|
text category? filters=trim|lower
|
|
154
164
|
int page?=1
|
|
@@ -168,6 +178,7 @@ query "products" verb=GET {
|
|
|
168
178
|
### Create (POST)
|
|
169
179
|
```xs
|
|
170
180
|
query "products" verb=POST {
|
|
181
|
+
api_group = "Products"
|
|
171
182
|
auth = "user"
|
|
172
183
|
input {
|
|
173
184
|
text name filters=trim
|
|
@@ -193,6 +204,7 @@ query "products" verb=POST {
|
|
|
193
204
|
### Read (GET with ID)
|
|
194
205
|
```xs
|
|
195
206
|
query "products/{product_id}" verb=GET {
|
|
207
|
+
api_group = "Products"
|
|
196
208
|
input {
|
|
197
209
|
int product_id { table = "product" }
|
|
198
210
|
}
|
|
@@ -214,6 +226,7 @@ query "products/{product_id}" verb=GET {
|
|
|
214
226
|
### Update (PATCH)
|
|
215
227
|
```xs
|
|
216
228
|
query "products/{product_id}" verb=PATCH {
|
|
229
|
+
api_group = "Products"
|
|
217
230
|
auth = "user"
|
|
218
231
|
input {
|
|
219
232
|
int product_id { table = "product" }
|
|
@@ -248,6 +261,7 @@ query "products/{product_id}" verb=PATCH {
|
|
|
248
261
|
### Delete (DELETE)
|
|
249
262
|
```xs
|
|
250
263
|
query "products/{product_id}" verb=DELETE {
|
|
264
|
+
api_group = "Products"
|
|
251
265
|
auth = "user"
|
|
252
266
|
input {
|
|
253
267
|
int product_id { table = "product" }
|