add workspace addons
Authentication: required
curl --request POST \
--url https://your-xano-instance.xano.io/api:meta/workspace/{workspace_id}/addon \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: text/x-xanoscript' \
--data 'addon foo {
input {
int foo_id {
dbtable = "foo"
}
}
stack {
db.query foo {
where = $db.foo.id == $input.foo_id
return = {type: "single"}
}
}
}
'{
"id": 1,
"created_at": "2023-04-19 21:01:32+0000",
"updated_at": "2023-04-19 21:01:32+0000",
"name": "Addon Test",
"description": "My addons description",
"guid": "YE1fwVhQ-enRlc6Sb42Gqru58-0",
"branch": "v1",
"tag": [
"example tag"
],
"xanoscript": {
"status": "ok",
"value": "<string>",
"message": "<string>"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The body is of type string.
"addon foo {\n input {\n int foo_id {\n dbtable = \"foo\"\n }\n }\n stack {\n db.query foo {\n where = $db.foo.id == $input.foo_id\n return = {type: \"single\"}\n }\n }\n}\n"
Success!
Show child attributes
Was this page helpful?
curl --request POST \
--url https://your-xano-instance.xano.io/api:meta/workspace/{workspace_id}/addon \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: text/x-xanoscript' \
--data 'addon foo {
input {
int foo_id {
dbtable = "foo"
}
}
stack {
db.query foo {
where = $db.foo.id == $input.foo_id
return = {type: "single"}
}
}
}
'{
"id": 1,
"created_at": "2023-04-19 21:01:32+0000",
"updated_at": "2023-04-19 21:01:32+0000",
"name": "Addon Test",
"description": "My addons description",
"guid": "YE1fwVhQ-enRlc6Sb42Gqru58-0",
"branch": "v1",
"tag": [
"example tag"
],
"xanoscript": {
"status": "ok",
"value": "<string>",
"message": "<string>"
}
}