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

FieldTypeRequired
namestringYes
categorystringNo
body_partstringNo
equipmentstringNo
difficultystringNo
descriptionstringNo
steps[]stringYes
tips[]stringNo
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": []
  }
}'

Example Response

{ "status": "ok", "data": {} }

delete

Source: backend/endpoints/exercises/delete

Input Fields

FieldTypeRequired
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

FieldTypeRequired
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

FieldTypeRequired
pageintNo
page_sizeintNo

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

FieldTypeRequired
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

FieldTypeRequired
idstringYes
name*stringNo
category*stringNo
body_part*stringNo
equipment*stringNo
difficulty*stringNo
description*stringNo
steps*[]stringNo
tips*[]stringNo
image_url*stringNo
video_url*stringNo

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