Skip to main content
Glama
openapi-spec.json43.8 kB
{ "openapi": "3.0.0", "info": { "title": "Hevy API Docs", "description": "\n Welcome to Hevy's public API! We're just starting to roll this out and depending on your\n feedback, we'll be adding more features and endpoints. Also, we make no guarantees that \n we won't completely change the structure or abandon the project entirely so use it at\n your own risk. Currently, this API is only available to Hevy Pro users. You can get your \n key on our web app at https://hevy.com/settings?developer. If you have any questions,\n please reach out to pedro@hevyapp.com 🤝.\n ", "version": "0.0.1" }, "paths": { "/v1/workouts": { "get": { "summary": "Get a paginated list of workouts", "tags": ["Workouts"], "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true }, { "in": "query", "name": "page", "schema": { "type": "integer", "default": 1 }, "description": "Page number (Must be 1 or greater)" }, { "in": "query", "name": "pageSize", "schema": { "type": "integer", "default": 5 }, "description": "Number of items on the requested page (Max 10)" } ], "responses": { "200": { "description": "A paginated list of workouts", "content": { "application/json": { "schema": { "type": "object", "properties": { "page": { "type": "integer", "example": 1, "description": "Current page number" }, "page_count": { "type": "integer", "example": 5, "description": "Total number of pages" }, "workouts": { "type": "array", "items": { "$ref": "#/components/schemas/Workout" } } } } } } }, "400": { "description": "Invalid page size" } } }, "post": { "summary": "Create a new workout", "tags": ["Workouts"], "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PostWorkoutsRequestBody" } } } }, "responses": { "201": { "description": "The workout was successfully created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Workout" } } } }, "400": { "description": "Invalid request body", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "Error message" } } } } } } } } }, "/v1/workouts/count": { "get": { "summary": "Get the total number of workouts on the account", "tags": ["Workouts"], "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true } ], "responses": { "200": { "description": "The total count of workouts", "content": { "application/json": { "schema": { "type": "object", "properties": { "workout_count": { "type": "integer", "default": 42, "description": "The total number of workouts" } } } } } } } } }, "/v1/workouts/events": { "get": { "summary": "Retrieve a paged list of workout events (updates or deletes) since a given date. Events are ordered from newest to oldest. The intention is to allow clients to keep their local cache of workouts up to date without having to fetch the entire list of workouts.", "tags": ["Workouts"], "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true }, { "in": "query", "name": "page", "schema": { "type": "integer", "default": 1 }, "description": "Page number (Must be 1 or greater)" }, { "in": "query", "name": "pageSize", "schema": { "type": "integer", "default": 5 }, "description": "Number of items on the requested page (Max 10)" }, { "in": "query", "name": "since", "schema": { "type": "string", "default": "1970-01-01T00:00:00Z" } } ], "description": "Returns a paginated array of workout events, indicating updates or deletions.", "responses": { "200": { "description": "A paginated list of workout events", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedWorkoutEvents" } } } }, "500": { "description": "Internal Server Error" } } } }, "/v1/workouts/{workoutId}": { "get": { "tags": ["Workouts"], "summary": "Get a single workout’s complete details by the workoutId", "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true }, { "name": "workoutId", "in": "path", "description": "The id of the workout", "required": true } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Workout" } } } }, "404": { "description": "Workout not found" } } }, "put": { "summary": "Update an existing workout", "tags": ["Workouts"], "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true }, { "in": "path", "name": "workoutId", "description": "The id of the workout", "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PostWorkoutsRequestBody" } } } }, "responses": { "200": { "description": "The workout was successfully updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Workout" } } } }, "400": { "description": "Invalid request body", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "Error message" } } } } } } } } }, "/v1/routines": { "get": { "summary": "Get a paginated list of routines", "tags": ["Routines"], "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true }, { "in": "query", "name": "page", "schema": { "type": "integer", "default": 1 }, "description": "Page number (Must be 1 or greater)" }, { "in": "query", "name": "pageSize", "schema": { "type": "integer", "default": 5 }, "description": "Number of items on the requested page (Max 10)" } ], "responses": { "200": { "description": "A paginated list of routines", "content": { "application/json": { "schema": { "type": "object", "properties": { "page": { "type": "integer", "example": 1, "description": "Current page number" }, "page_count": { "type": "integer", "example": 5, "description": "Total number of pages" }, "routines": { "type": "array", "items": { "$ref": "#/components/schemas/Routine" } } } } } } }, "400": { "description": "Invalid page size" } } }, "post": { "summary": "Create a new routine", "tags": ["Routines"], "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PostRoutinesRequestBody" } } } }, "responses": { "201": { "description": "The routine was successfully created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Routine" } } } }, "400": { "description": "Invalid request body", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "Error message" } } } } } }, "403": { "description": "Routine limit exceeded", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "Error message" } } } } } } } } }, "/v1/routines/{routineId}": { "get": { "summary": "Get a routine by its Id", "tags": ["Routines"], "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true }, { "in": "path", "name": "routineId", "description": "The id of the routine", "required": true } ], "responses": { "200": { "description": "The routine with the provided id", "content": { "application/json": { "schema": { "type": "object", "properties": { "routine": { "$ref": "#/components/schemas/Routine" } } } } } }, "400": { "description": "Invalid request body", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "Error message" } } } } } } } }, "put": { "summary": "Update an existing routine", "tags": ["Routines"], "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true }, { "in": "path", "name": "routineId", "description": "The id of the routine", "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PutRoutinesRequestBody" } } } }, "responses": { "200": { "description": "The routine was successfully updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Routine" } } } }, "400": { "description": "Invalid request body", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "Error message" } } } } } }, "404": { "description": "Routine doesn't exist or doesn't belong to the user", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "Error message" } } } } } } } } }, "/v1/exercise_templates": { "get": { "summary": "Get a paginated list of exercise templates available on the account.", "tags": ["ExerciseTemplates"], "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true }, { "in": "query", "name": "page", "schema": { "type": "integer", "default": 1 }, "description": "Page number (Must be 1 or greater)" }, { "in": "query", "name": "pageSize", "schema": { "type": "integer", "default": 5 }, "description": "Number of items on the requested page (Max 100)" } ], "responses": { "200": { "description": "A paginated list of exercise templates", "content": { "application/json": { "schema": { "type": "object", "properties": { "page": { "type": "integer", "default": 1, "description": "Current page number" }, "page_count": { "type": "integer", "default": 5, "description": "Total number of pages" }, "exercise_templates": { "type": "array", "items": { "$ref": "#/components/schemas/ExerciseTemplate" } } } } } } }, "400": { "description": "Invalid page size" } } } }, "/v1/exercise_templates/{exerciseTemplateId}": { "get": { "tags": ["ExerciseTemplates"], "summary": "Get a single exercise template by id.", "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true }, { "name": "exerciseTemplateId", "in": "path", "description": "The id of the exercise template", "required": true } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExerciseTemplate" } } } }, "404": { "description": "Exercise template not found" } } } }, "/v1/routine_folders": { "get": { "summary": "Get a paginated list of routine folders available on the account.", "tags": ["RoutineFolders"], "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true }, { "in": "query", "name": "page", "schema": { "type": "integer", "default": 1 }, "description": "Page number (Must be 1 or greater)" }, { "in": "query", "name": "pageSize", "schema": { "type": "integer", "default": 5 }, "description": "Number of items on the requested page (Max 10)" } ], "responses": { "200": { "description": "A paginated list of routine folders", "content": { "application/json": { "schema": { "type": "object", "properties": { "page": { "type": "integer", "default": 1, "description": "Current page number" }, "page_count": { "type": "integer", "default": 5, "description": "Total number of pages" }, "routine_folders": { "type": "array", "items": { "$ref": "#/components/schemas/RoutineFolder" } } } } } } }, "400": { "description": "Invalid page size" } } }, "post": { "summary": "Create a new routine folder. The folder will be created at index 0, and all other folders will have their indexes incremented.", "tags": ["RoutineFolders"], "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PostRoutineFolderRequestBody" } } } }, "responses": { "201": { "description": "The routine folder was successfully created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RoutineFolder" } } } }, "400": { "description": "Invalid request body", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "Error message" } } } } } } } } }, "/v1/routine_folders/{folderId}": { "get": { "tags": ["RoutineFolders"], "summary": "Get a single routine folder by id.", "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true }, { "name": "folderId", "in": "path", "description": "The id of the routine folder", "required": true } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RoutineFolder" } } } }, "404": { "description": "Routine folder not found" } } } }, "/v1/webhook-subscription": { "post": { "summary": "Create a new webhook subscription.", "description": "This endpoint allows you to create a webhook subscription that will notify your application when a workout is created.\n\n Your endpoint must respond with a `200 OK` status within **5 seconds**, otherwise the delivery will be retried.\n\nWhen a new workout is created, we will send a POST request to your provided URL with the following JSON payload:\n```json {\n \"id\": \"00000000-0000-0000-0000-000000000001\",\n \"payload\": {\n \"workoutId\": \"f1085cdb-32b2-4003-967d-53a3af8eaecb\"\n }\n}\n", "tags": ["Webhook"], "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookRequestBody" } } } }, "responses": { "201": { "description": "The webhook subscription was successfully created" }, "400": { "description": "Invalid request body", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "Error message" } } } } } } } }, "delete": { "summary": "Delete a webhook subscription.", "tags": ["Webhook"], "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true, "description": "Your API key" } ], "responses": { "200": { "description": "The webhook subscription was successfully deleted" } } }, "get": { "summary": "Get the current webhook subscription.", "tags": ["Webhook"], "parameters": [ { "in": "header", "name": "api-key", "schema": { "type": "string", "format": "uuid" }, "required": true, "description": "Your API key" } ], "responses": { "200": { "description": "The current webhook subscription", "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string", "description": "The webhook URL", "example": "https://example.com/hevy-webhook" }, "auth_token": { "type": "string", "description": "The auth token for the webhook", "example": "Bearer mytoken" } } } } } }, "404": { "description": "No webhook subscription found" } } } } }, "components": { "schemas": { "PostWorkoutsRequestSet": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of the set.", "enum": ["warmup", "normal", "failure", "dropset"], "example": "normal" }, "weight_kg": { "type": "number", "nullable": true, "description": "The weight in kilograms.", "example": 100 }, "reps": { "type": "integer", "nullable": true, "description": "The number of repetitions.", "example": 10 }, "distance_meters": { "type": "integer", "nullable": true, "description": "The distance in meters.", "example": null }, "duration_seconds": { "type": "integer", "nullable": true, "description": "The duration in seconds.", "example": null }, "custom_metric": { "type": "number", "nullable": true, "description": "A custom metric for the set. Currently used for steps and floors.", "example": null }, "rpe": { "type": "number", "nullable": true, "description": "The Rating of Perceived Exertion (RPE).", "enum": [6, 7, 7.5, 8, 8.5, 9, 9.5, 10], "example": null } } }, "PostWorkoutsRequestExercise": { "type": "object", "properties": { "exercise_template_id": { "type": "string", "description": "The ID of the exercise template.", "example": "D04AC939" }, "superset_id": { "type": "integer", "nullable": true, "description": "The ID of the superset.", "example": null }, "notes": { "type": "string", "nullable": true, "description": "Additional notes for the exercise.", "example": "Felt good today. Form was on point." }, "sets": { "type": "array", "items": { "$ref": "#/components/schemas/PostWorkoutsRequestSet" } } } }, "PostWorkoutsRequestBody": { "type": "object", "properties": { "workout": { "type": "object", "properties": { "title": { "type": "string", "description": "The title of the workout.", "example": "Friday Leg Day 🔥" }, "description": { "type": "string", "nullable": true, "description": "A description for the workout workout.", "example": "Medium intensity leg day focusing on quads." }, "start_time": { "type": "string", "description": "The time the workout started.", "example": "2024-08-14T12:00:00Z" }, "end_time": { "type": "string", "description": "The time the workout ended.", "example": "2024-08-14T12:30:00Z" }, "is_private": { "type": "boolean", "description": "A boolean indicating if the workout is private.", "example": false }, "exercises": { "type": "array", "items": { "$ref": "#/components/schemas/PostWorkoutsRequestExercise" } } } } } }, "PostRoutinesRequestSet": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of the set.", "enum": ["warmup", "normal", "failure", "dropset"], "example": "normal" }, "weight_kg": { "type": "number", "nullable": true, "description": "The weight in kilograms.", "example": 100 }, "reps": { "type": "integer", "nullable": true, "description": "The number of repetitions.", "example": 10 }, "distance_meters": { "type": "integer", "nullable": true, "description": "The distance in meters.", "example": null }, "duration_seconds": { "type": "integer", "nullable": true, "description": "The duration in seconds.", "example": null }, "custom_metric": { "type": "number", "nullable": true, "description": "A custom metric for the set. Currently used for steps and floors.", "example": null }, "rep_range": { "type": "object", "nullable": true, "description": "Range of reps for the set, if applicable", "properties": { "start": { "type": "number", "nullable": true, "description": "Starting rep count for the range", "example": 8 }, "end": { "type": "number", "nullable": true, "description": "Ending rep count for the range", "example": 12 } } } } }, "PostRoutinesRequestExercise": { "type": "object", "properties": { "exercise_template_id": { "type": "string", "description": "The ID of the exercise template.", "example": "D04AC939" }, "superset_id": { "type": "integer", "nullable": true, "description": "The ID of the superset.", "example": null }, "rest_seconds": { "type": "integer", "nullable": true, "description": "The rest time in seconds.", "example": 90 }, "notes": { "type": "string", "nullable": true, "description": "Additional notes for the exercise.", "example": "Stay slow and controlled." }, "sets": { "type": "array", "items": { "$ref": "#/components/schemas/PostRoutinesRequestSet" } } } }, "PostRoutinesRequestBody": { "type": "object", "properties": { "routine": { "type": "object", "properties": { "title": { "type": "string", "description": "The title of the routine.", "example": "April Leg Day 🔥" }, "folder_id": { "type": "number", "nullable": true, "description": "The folder id the routine should be added to. Pass null to insert the routine into default \"My Routines\" folder", "example": null }, "notes": { "type": "string", "description": "Additional notes for the routine.", "example": "Focus on form over weight. Remember to stretch." }, "exercises": { "type": "array", "items": { "$ref": "#/components/schemas/PostRoutinesRequestExercise" } } } } } }, "PutRoutinesRequestSet": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of the set.", "enum": ["warmup", "normal", "failure", "dropset"], "example": "normal" }, "weight_kg": { "type": "number", "nullable": true, "description": "The weight in kilograms.", "example": 100 }, "reps": { "type": "integer", "nullable": true, "description": "The number of repetitions.", "example": 10 }, "distance_meters": { "type": "integer", "nullable": true, "description": "The distance in meters.", "example": null }, "duration_seconds": { "type": "integer", "nullable": true, "description": "The duration in seconds.", "example": null }, "custom_metric": { "type": "number", "nullable": true, "description": "A custom metric for the set. Currently used for steps and floors.", "example": null }, "rep_range": { "type": "object", "nullable": true, "description": "Range of reps for the set, if applicable", "properties": { "start": { "type": "number", "nullable": true, "description": "Starting rep count for the range", "example": 8 }, "end": { "type": "number", "nullable": true, "description": "Ending rep count for the range", "example": 12 } } } } }, "PutRoutinesRequestExercise": { "type": "object", "properties": { "exercise_template_id": { "type": "string", "description": "The ID of the exercise template.", "example": "D04AC939" }, "superset_id": { "type": "integer", "nullable": true, "description": "The ID of the superset.", "example": null }, "rest_seconds": { "type": "integer", "nullable": true, "description": "The rest time in seconds.", "example": 90 }, "notes": { "type": "string", "nullable": true, "description": "Additional notes for the exercise.", "example": "Stay slow and controlled." }, "sets": { "type": "array", "items": { "$ref": "#/components/schemas/PutRoutinesRequestSet" } } } }, "PutRoutinesRequestBody": { "type": "object", "properties": { "routine": { "type": "object", "properties": { "title": { "type": "string", "description": "The title of the routine.", "example": "April Leg Day 🔥" }, "notes": { "type": "string", "nullable": true, "description": "Additional notes for the routine.", "example": "Focus on form over weight. Remember to stretch." }, "exercises": { "type": "array", "items": { "$ref": "#/components/schemas/PutRoutinesRequestExercise" } } } } } }, "PostRoutineFolderRequestBody": { "type": "object", "properties": { "routine_folder": { "type": "object", "properties": { "title": { "type": "string", "description": "The title of the routine folder.", "example": "Push Pull 🏋️‍♂️" } } } } }, "WebhookRequestBody": { "type": "object", "properties": { "authToken": { "type": "string", "description": "The auth token that will be send as Authorization header in the webhook.", "example": "Bearer mytoken" }, "url": { "type": "string", "description": "The webhook URL.", "example": "https://example.com/hevy-webhook" } } }, "ExerciseTemplate": { "type": "object", "properties": { "id": { "type": "string", "description": "The exercise template ID.", "example": "b459cba5-cd6d-463c-abd6-54f8eafcadcb" }, "title": { "type": "string", "description": "The exercise title.", "example": "Bench Press (Barbell)" }, "type": { "type": "string", "description": "The exercise type.", "example": "weight_reps" }, "primary_muscle_group": { "type": "string", "description": "The primary muscle group of the exercise.", "example": "weight_reps" }, "secondary_muscle_groups": { "type": "array", "description": "The secondary muscle groups of the exercise.", "items": { "type": "string" } }, "is_custom": { "type": "boolean", "description": "A boolean indicating whether the exercise is a custom exercise.", "example": false } } }, "RoutineFolder": { "type": "object", "properties": { "id": { "type": "number", "description": "The routine folder ID.", "example": 42 }, "index": { "type": "number", "description": "The routine folder index. Describes the order of the folder in the list.", "example": 1 }, "title": { "type": "string", "description": "The routine folder title.", "example": "Push Pull 🏋️‍♂️" }, "updated_at": { "type": "string", "description": "ISO 8601 timestamp of when the folder was last updated.", "example": "2021-09-14T12:00:00Z" }, "created_at": { "type": "string", "description": "ISO 8601 timestamp of when the folder was created.", "example": "2021-09-14T12:00:00Z" } } }, "Routine": { "type": "object", "properties": { "id": { "type": "string", "description": "The routine ID.", "example": "b459cba5-cd6d-463c-abd6-54f8eafcadcb" }, "title": { "type": "string", "description": "The routine title.", "example": "Upper Body 💪" }, "folder_id": { "type": "number", "nullable": true, "description": "The routine folder ID.", "example": 42 }, "updated_at": { "type": "string", "description": "ISO 8601 timestamp of when the routine was last updated.", "example": "2021-09-14T12:00:00Z" }, "created_at": { "type": "string", "description": "ISO 8601 timestamp of when the routine was created.", "example": "2021-09-14T12:00:00Z" }, "exercises": { "type": "array", "items": { "type": "object", "properties": { "index": { "type": "number", "description": "Index indicating the order of the exercise in the routine.", "example": 0 }, "title": { "type": "string", "description": "Title of the exercise", "example": "Bench Press (Barbell)" }, "rest_seconds": { "type": "string", "description": "The rest time in seconds between sets of the exercise", "example": 60 }, "notes": { "type": "string", "description": "Routine notes on the exercise", "example": "Focus on form. Go down to 90 degrees." }, "exercise_template_id": { "type": "string", "description": "The id of the exercise template. This can be used to fetch the exercise template.", "example": "05293BCA" }, "supersets_id": { "type": "number", "nullable": true, "description": "The id of the superset that the exercise belongs to. A value of null indicates the exercise is not part of a superset.", "example": 0 }, "sets": { "type": "array", "items": { "type": "object", "properties": { "index": { "type": "number", "description": "Index indicating the order of the set in the routine.", "example": 0 }, "type": { "type": "string", "description": "The type of set. This can be one of 'normal', 'warmup', 'dropset', 'failure'", "example": "normal" }, "weight_kg": { "type": "number", "nullable": true, "description": "Weight lifted in kilograms.", "example": 100 }, "reps": { "type": "number", "nullable": true, "description": "Number of reps logged for the set", "example": 10 }, "rep_range": { "type": "object", "nullable": true, "description": "Range of reps for the set, if applicable", "properties": { "start": { "type": "number", "nullable": true, "description": "Starting rep count for the range", "example": 8 }, "end": { "type": "number", "nullable": true, "description": "Ending rep count for the range", "example": 12 } } }, "distance_meters": { "type": "number", "nullable": true, "description": "Number of meters logged for the set", "example": null }, "duration_seconds": { "type": "number", "nullable": true, "description": "Number of seconds logged for the set", "example": null }, "rpe": { "type": "number", "nullable": true, "description": "RPE (Relative perceived exertion) value logged for the set", "example": 9.5 }, "custom_metric": { "type": "number", "nullable": true, "description": "Custom metric logged for the set (Currently only used to log floors or steps for stair machine exercises)", "example": 50 } } } } } } } } }, "Workout": { "type": "object", "properties": { "id": { "type": "string", "description": "The workout ID.", "example": "b459cba5-cd6d-463c-abd6-54f8eafcadcb" }, "title": { "type": "string", "description": "The workout title.", "example": "Morning Workout 💪" }, "description": { "type": "string", "description": "The workout description.", "example": "Pushed myself to the limit today!" }, "start_time": { "type": "number", "description": "ISO 8601 timestamp of when the workout was recorded to have started.", "example": "2021-09-14T12:00:00Z" }, "end_time": { "type": "number", "description": "ISO 8601 timestamp of when the workout was recorded to have ended.", "example": "2021-09-14T12:00:00Z" }, "updated_at": { "type": "string", "description": "ISO 8601 timestamp of when the workout was last updated.", "example": "2021-09-14T12:00:00Z" }, "created_at": { "type": "string", "description": "ISO 8601 timestamp of when the workout was created.", "example": "2021-09-14T12:00:00Z" }, "exercises": { "type": "array", "items": { "type": "object", "properties": { "index": { "type": "number", "description": "Index indicating the order of the exercise in the workout.", "example": 0 }, "title": { "type": "string", "description": "Title of the exercise", "example": "Bench Press (Barbell)" }, "notes": { "type": "string", "description": "Notes on the exercise", "example": "Paid closer attention to form today. Felt great!" }, "exercise_template_id": { "type": "string", "description": "The id of the exercise template. This can be used to fetch the exercise template.", "example": "05293BCA" }, "supersets_id": { "type": "number", "nullable": true, "description": "The id of the superset that the exercise belongs to. A value of null indicates the exercise is not part of a superset.", "example": 0 }, "sets": { "type": "array", "items": { "type": "object", "properties": { "index": { "type": "number", "description": "Index indicating the order of the set in the workout.", "example": 0 }, "type": { "type": "string", "description": "The type of set. This can be one of 'normal', 'warmup', 'dropset', 'failure'", "example": "normal" }, "weight_kg": { "type": "number", "nullable": true, "description": "Weight lifted in kilograms.", "example": 100 }, "reps": { "type": "number", "nullable": true, "description": "Number of reps logged for the set", "example": 10 }, "distance_meters": { "type": "number", "nullable": true, "description": "Number of meters logged for the set", "example": null }, "duration_seconds": { "type": "number", "nullable": true, "description": "Number of seconds logged for the set", "example": null }, "rpe": { "type": "number", "nullable": true, "description": "RPE (Relative perceived exertion) value logged for the set", "example": 9.5 }, "custom_metric": { "type": "number", "nullable": true, "description": "Custom metric logged for the set (Currently only used to log floors or steps for stair machine exercises)", "example": 50 } } } } } } } } }, "UpdatedWorkout": { "type": "object", "required": ["type", "workout"], "properties": { "type": { "type": "string", "description": "Indicates the type of the event (updated)", "example": "updated" }, "workout": { "$ref": "#/components/schemas/Workout" } } }, "DeletedWorkout": { "type": "object", "required": ["type", "id"], "properties": { "type": { "type": "string", "description": "Indicates the type of the event (deleted)", "example": "deleted" }, "id": { "type": "string", "description": "The unique identifier of the deleted workout", "example": "efe6801c-4aee-4959-bcdd-fca3f272821b" }, "deleted_at": { "type": "string", "description": "A date string indicating when the workout was deleted", "example": "2021-09-13T12:00:00Z" } } }, "PaginatedWorkoutEvents": { "type": "object", "required": ["page", "page_count", "events"], "properties": { "page": { "type": "integer", "description": "The current page number", "example": 1 }, "page_count": { "type": "integer", "description": "The total number of pages available", "example": 5 }, "events": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/UpdatedWorkout" }, { "$ref": "#/components/schemas/DeletedWorkout" } ] }, "description": "An array of workout events (either updated or deleted)" } } } } }, "tags": [] }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chrisdoc/hevy-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server