openapi: 3.2.0 info: title: wger Exerciseinfo API version: 2.7.0a2 description: "Self hosted FLOSS workout and fitness tracker.\n\n## Authentication\n\nSystem-wide data such as the exercise database, ingredients and units can be\nread without authenticating. Everything tied to a user account needs one of the\nfollowing, which are tried in this order:\n\n* `Authorization: Token ` with a personal API key. Users create one on the\n API key page of their profile, e.g. `/en/user/api-key`.\n* `Authorization: Bearer ` with a JWT access token.\n* The session cookie, which is what a logged-in browser uses.\n\n## Pagination\n\nList endpoints take `limit` and `offset`, and answer with `count`, `next`,\n`previous` and `results`. The default page size is 20 and `limit` is capped\nat 999.\n\n`/api/v2/ingredient-sync/` is the exception. It uses cursor pagination so that\nsyncing the catalogue stays fast no matter how far a client has paginated. That\nresponse carries no `count`, and clients follow `next` instead of picking an\noffset.\n\n## Filtering and ordering\n\nMost list endpoints accept filters on a subset of their fields, plus `ordering`\nwith a field name that can be prefixed with `-` to reverse it. Both are listed\nper endpoint.\n\n## Unknown fields are dropped on write\n\nA field that the endpoint does not declare is ignored instead of rejected. Such\na request still answers 200 or 201, and the unknown field simply has no effect,\nso check a write against the response body rather than the status code.\n\n## Rate limits\n\nThe ingredient endpoints are rate limited because the catalogue holds millions\nof rows, and creating exercises is capped as well. Limits count per user for\nauthenticated callers and per IP otherwise. Exceeding one answers 429.\n" license: name: AGPL-3.0-or-later url: https://www.gnu.org/licenses/agpl-3.0.html servers: - url: / description: This server - url: https://wger.de description: The "official" upstream wger instance tags: - name: exerciseinfo description: 'The same exercises read-only, with categories, muscles, equipment, images, videos and translations expanded inline. Meant for external tools and integrations: one request returns everything, with no IDs left to resolve.' paths: /api/v2/exerciseinfo/: get: operationId: exerciseinfo_list description: Serve the list from the per-exercise cache, hitting the DB only for misses. parameters: - in: query name: category schema: type: integer - in: query name: category__in schema: type: array items: type: integer description: Multiple values may be separated by commas. explode: false style: form - in: query name: equipment schema: type: array items: type: integer explode: true style: form - in: query name: equipment__in schema: type: array items: type: integer description: Multiple values may be separated by commas. explode: false style: form - in: query name: id schema: type: integer - in: query name: id__in schema: type: array items: type: integer description: Multiple values may be separated by commas. explode: false style: form - in: query name: language__code schema: type: string description: Filter by language code. Multiple values may be separated by commas. Unknown codes fall back to English. - name: limit required: false in: query description: Number of results to return per page. schema: type: integer - in: query name: muscles schema: type: array items: type: integer explode: true style: form - in: query name: muscles__in schema: type: array items: type: integer description: Multiple values may be separated by commas. explode: false style: form - in: query name: muscles_secondary schema: type: array items: type: integer explode: true style: form - in: query name: muscles_secondary__in schema: type: array items: type: integer description: Multiple values may be separated by commas. explode: false style: form - in: query name: name__exact schema: type: string - in: query name: name__search schema: type: string - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer - name: ordering required: false in: query description: Which field to use when ordering the results. schema: type: string - in: query name: uuid schema: type: string format: uuid - in: query name: variation_group schema: type: string format: uuid - in: query name: variation_group__in schema: type: array items: type: string format: uuid description: Multiple values may be separated by commas. explode: false style: form tags: - exerciseinfo security: - cookieAuth: [] - tokenAuth: [] - headlessJwtAuth: [] - oidcAuth: [] - jwtAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedExerciseInfoList' description: '' /api/v2/exerciseinfo/{id}/: get: operationId: exerciseinfo_retrieve description: 'Read-only info API endpoint for exercise objects, grouped by the exercise base. Returns nested data structures for more easy and faster parsing and is the recommended way to access the exercise data.' parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this exercise. required: true tags: - exerciseinfo security: - cookieAuth: [] - tokenAuth: [] - headlessJwtAuth: [] - oidcAuth: [] - jwtAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ExerciseInfo' description: '' components: schemas: ExerciseImage: type: object description: ExerciseImage serializer properties: id: type: integer readOnly: true uuid: type: string format: uuid readOnly: true exercise: type: integer exercise_uuid: type: string format: uuid readOnly: true image: type: string format: uri description: Only JPEG, PNG and WebP formats are supported thumbnails: allOf: - $ref: '#/components/schemas/Thumbnails' readOnly: true is_main: type: boolean title: Is main picture style: allOf: - $ref: '#/components/schemas/StyleEnum' description: 'The art style of your image * `1` - Line * `2` - 3D * `3` - Low-poly * `4` - Photo * `5` - Other' license: type: integer license_title: type: string title: The original title of this object, if available maxLength: 300 license_object_url: title: Link to original object, if available oneOf: - type: string format: uri maxLength: 200 - type: string maxLength: 0 license_author: type: string title: Author(s) description: If you are not the author, enter the name or source here. maxLength: 3500 license_author_url: title: Link to author profile, if available oneOf: - type: string format: uri maxLength: 200 - type: string maxLength: 0 license_derivative_source_url: title: Link to the original source, if this is a derivative work description: Note that a derivative work is one which is not only based on a previous work, but which also contains sufficient new, creative content to entitle it to its own copyright. oneOf: - type: string format: uri maxLength: 200 - type: string maxLength: 0 author_history: type: array items: type: string readOnly: true is_ai_generated: type: boolean title: AI Generated description: Check if this image was generated by AI required: - author_history - exercise - exercise_uuid - id - image - thumbnails - uuid ExerciseCategory: type: object description: ExerciseCategory serializer properties: id: type: integer readOnly: true name: type: string maxLength: 100 required: - id - name PaginatedExerciseInfoList: type: object required: - count - results properties: count: type: integer example: 123 next: type: - string - 'null' format: uri example: http://api.example.org/accounts/?offset=400&limit=100 previous: type: - string - 'null' format: uri example: http://api.example.org/accounts/?offset=200&limit=100 results: type: array items: $ref: '#/components/schemas/ExerciseInfo' ExerciseInfoAlias: type: object description: Exercise alias serializer for info endpoint properties: id: type: integer readOnly: true uuid: type: string format: uuid readOnly: true alias: type: string title: Alias for an exercise maxLength: 200 required: - alias - id - uuid ExerciseTranslationInfo: type: object description: Exercise translation serializer for the info endpoint properties: id: type: integer readOnly: true uuid: type: string format: uuid readOnly: true name: type: string maxLength: 200 exercise: type: integer description: type: string maxLength: 2000 description_source: type: string title: Description (Source) minLength: 40 created: type: string format: date-time readOnly: true title: Date language: type: integer aliases: type: array items: $ref: '#/components/schemas/ExerciseInfoAlias' readOnly: true notes: type: array items: $ref: '#/components/schemas/ExerciseComment' readOnly: true license: type: integer license_title: type: string title: The original title of this object, if available maxLength: 300 license_object_url: title: Link to original object, if available oneOf: - type: string format: uri maxLength: 200 - type: string maxLength: 0 license_author: type: string title: Author(s) description: If you are not the author, enter the name or source here. maxLength: 3500 license_author_url: title: Link to author profile, if available oneOf: - type: string format: uri maxLength: 200 - type: string maxLength: 0 license_derivative_source_url: title: Link to the original source, if this is a derivative work description: Note that a derivative work is one which is not only based on a previous work, but which also contains sufficient new, creative content to entitle it to its own copyright. oneOf: - type: string format: uri maxLength: 200 - type: string maxLength: 0 author_history: type: array items: type: string required: - aliases - author_history - created - description_source - exercise - id - language - name - notes - uuid Muscle: type: object description: Muscle serializer properties: id: type: integer readOnly: true name: type: string description: In latin, e.g. "Pectoralis major" maxLength: 50 name_en: type: string title: Alternative name description: A more basic name for the muscle maxLength: 50 is_front: type: boolean image_url_main: type: - string - 'null' description: Absolute URL to the main muscle image readOnly: true image_url_secondary: type: - string - 'null' description: Absolute URL to the secondary muscle image readOnly: true required: - id - image_url_main - image_url_secondary - name License: type: object description: License serializer properties: id: type: integer readOnly: true full_name: type: string description: If a license has been localized, e.g. the Creative Commons licenses for the different countries, add them as separate entries here. maxLength: 60 short_name: type: string title: Short name, e.g. CC-BY-SA 3 maxLength: 15 url: title: Link description: Link to license text or other information oneOf: - type: string format: uri maxLength: 200 - type: string maxLength: 0 required: - full_name - id - short_name Equipment: type: object description: Equipment serializer properties: id: type: integer readOnly: true name: type: string maxLength: 50 required: - id - name ExerciseComment: type: object description: ExerciseComment serializer properties: id: type: integer readOnly: true uuid: type: string format: uuid readOnly: true translation: type: integer title: Exercise comment: type: string description: A comment about how to correctly do this exercise. maxLength: 200 required: - comment - id - translation - uuid ExerciseVideoInfo: type: object description: ExerciseVideo serializer for the info endpoint properties: id: type: integer readOnly: true uuid: type: string format: uuid readOnly: true exercise: type: integer video: type: string format: uri is_main: type: boolean title: Is main video size: type: integer readOnly: true duration: type: string format: decimal pattern: ^-?\d{0,10}(?:\.\d{0,2})?$ readOnly: true width: type: integer readOnly: true height: type: integer readOnly: true codec: type: string readOnly: true codec_long: type: string readOnly: true title: Codec, long name license: type: integer license_title: type: string title: The original title of this object, if available maxLength: 300 license_object_url: title: Link to original object, if available oneOf: - type: string format: uri maxLength: 200 - type: string maxLength: 0 license_author: type: string title: Author(s) description: If you are not the author, enter the name or source here. maxLength: 3500 license_author_url: title: Link to author profile, if available oneOf: - type: string format: uri maxLength: 200 - type: string maxLength: 0 license_derivative_source_url: title: Link to the original source, if this is a derivative work description: Note that a derivative work is one which is not only based on a previous work, but which also contains sufficient new, creative content to entitle it to its own copyright. oneOf: - type: string format: uri maxLength: 200 - type: string maxLength: 0 author_history: type: array items: type: string readOnly: true required: - author_history - codec - codec_long - duration - exercise - height - id - size - uuid - video - width StyleEnum: enum: - '1' - '2' - '3' - '4' - '5' type: string description: '* `1` - Line * `2` - 3D * `3` - Low-poly * `4` - Photo * `5` - Other' ExerciseInfo: type: object description: Exercise info serializer properties: id: type: integer readOnly: true uuid: type: string format: uuid readOnly: true created: type: string format: date-time readOnly: true title: Creation date last_update: type: string format: date-time readOnly: true last_update_global: type: string format: date-time readOnly: true category: allOf: - $ref: '#/components/schemas/ExerciseCategory' readOnly: true muscles: type: array items: $ref: '#/components/schemas/Muscle' readOnly: true muscles_secondary: type: array items: $ref: '#/components/schemas/Muscle' readOnly: true equipment: type: array items: $ref: '#/components/schemas/Equipment' readOnly: true license: allOf: - $ref: '#/components/schemas/License' readOnly: true license_author: type: string title: Author(s) description: If you are not the author, enter the name or source here. maxLength: 3500 images: type: array items: $ref: '#/components/schemas/ExerciseImage' readOnly: true translations: type: array items: $ref: '#/components/schemas/ExerciseTranslationInfo' readOnly: true variation_group: type: - string - 'null' format: uuid videos: type: array items: $ref: '#/components/schemas/ExerciseVideoInfo' readOnly: true author_history: type: array items: type: string total_authors_history: type: array items: type: string required: - author_history - category - created - equipment - id - images - last_update - last_update_global - license - muscles - muscles_secondary - total_authors_history - translations - uuid - videos Thumbnails: type: object description: 'Shape of the ``thumbnails`` field, used for schema generation only. The aliases are read from settings.THUMBNAIL_ALIASES and are the same for every thumbnailed image in the API. Without this, the generated schema falls back to a plain string for the dict the method fields return.' properties: small: type: string format: uri medium: type: string format: uri required: - medium - small securitySchemes: cookieAuth: type: apiKey in: cookie name: sessionid headlessJwtAuth: type: http scheme: bearer bearerFormat: JWT description: Access token issued by the allauth headless endpoints jwtAuth: type: http scheme: bearer bearerFormat: JWT oidcAuth: type: oauth2 description: Access token issued by the OAuth2/OIDC provider flows: authorizationCode: authorizationUrl: https://wger.de/identity/o/authorize tokenUrl: https://wger.de/identity/o/api/token scopes: api:read: View your training, nutrition and body data api:write: Add and change your training, nutrition and body data tokenAuth: type: apiKey in: header name: Authorization description: Token-based authentication with required prefix "Token" externalDocs: url: https://wger.readthedocs.io description: wger documentation