EndpointsExercises

Exercises

Function-calling namespace: exercises

  • Base URL: https://api.aivida.in
  • Engine endpoint: POST /api
  • Auth: Stack token middleware enabled in optional mode.
  • Send token in header: x-stack-access-token: <access_token> (or Authorization: Bearer <access_token>).
  • In optional mode: no token is allowed; invalid token is rejected with 401.

create

Source: backend/endpoints/exercises/create

Input Fields

FieldTypeRequiredConstraints
namestringYes-
categorystringNo-
body_partstringNo-
equipmentstringNo-
difficultystringNo-
descriptionstringNo-
stepsarray<string>Yesmin: 1
tipsarray<string>No-
image_urlstringNo-
video_urlstringNo-

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

FieldTypeRequiredConstraints
idstringYes-

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

FieldTypeRequiredConstraints
idstringYes-

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

FieldTypeRequiredConstraints
pageintegerNo-
page_sizeintegerNo-

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": {} }

Source: backend/endpoints/exercises/search

Input Fields

FieldTypeRequiredConstraints
querystringNo-
categorystringNo-
body_partstringNo-
equipmentstringNo-
difficultystringNo-

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

FieldTypeRequiredConstraints
idstringYes-
namestringNonullable
categorystringNonullable
body_partstringNonullable
equipmentstringNonullable
difficultystringNonullable
descriptionstringNonullable
stepsarray<string>Nonullable
tipsarray<string>Nonullable
image_urlstringNonullable
video_urlstringNonullable

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": {} }