Exercises
Function-calling namespace: exercises
- Base URL:
https://api.aivida.in - Engine endpoint:
POST /api - Auth: Stack token middleware enabled in
optionalmode. - Send token in header:
x-stack-access-token: <access_token>(orAuthorization: Bearer <access_token>). - In
optionalmode: no token is allowed; invalid token is rejected with401.
create
Source: backend/endpoints/exercises/create
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | Yes | - |
category | string | No | - |
body_part | string | No | - |
equipment | string | No | - |
difficulty | string | No | - |
description | string | No | - |
steps | array<string> | Yes | min: 1 |
tips | array<string> | No | - |
image_url | string | No | - |
video_url | string | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "exercises",
"apiName": "create",
"data": {
"name": "value",
"steps": [
"value"
]
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/exercises/delete
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "exercises",
"apiName": "delete",
"data": {
"id": "id_123"
}
}'Example Response
{ "status": "ok", "data": {} }get
Source: backend/endpoints/exercises/get
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "exercises",
"apiName": "get",
"data": {
"id": "id_123"
}
}'Example Response
{ "status": "ok", "data": {} }list
Source: backend/endpoints/exercises/list
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
page | integer | No | - |
page_size | integer | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "exercises",
"apiName": "list",
"data": {
"page": 1,
"page_size": 1
}
}'Example Response
{ "status": "ok", "data": {} }search
Source: backend/endpoints/exercises/search
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
query | string | No | - |
category | string | No | - |
body_part | string | No | - |
equipment | string | No | - |
difficulty | string | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "exercises",
"apiName": "search",
"data": {
"query": "value",
"category": "value",
"body_part": "value",
"equipment": "value",
"difficulty": "value"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/exercises/update
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
name | string | No | nullable |
category | string | No | nullable |
body_part | string | No | nullable |
equipment | string | No | nullable |
difficulty | string | No | nullable |
description | string | No | nullable |
steps | array<string> | No | nullable |
tips | array<string> | No | nullable |
image_url | string | No | nullable |
video_url | string | No | nullable |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "exercises",
"apiName": "update",
"data": {
"id": "id_123"
}
}'Example Response
{ "status": "ok", "data": {} }