Weblate schema API

The schema API from Weblate — 1 operation(s) for schema.

OpenAPI Specification

weblate-schema-api-openapi.yml Raw ↑
openapi: 3.1.1
info:
  title: Weblate's REST addons schema API
  version: ''
  x-logo:
    url: /static/weblate.svg
  description: "\nThe API is accessible on the ``/api/`` URL and it is based on [Django REST framework](https://www.django-rest-framework.org/).\n\nThe OpenAPI specification is available as feature preview, feedback welcome!\n\n## Authorization\n\n<!-- Redoc-Inject: <security-definitions> -->\n\n\n    "
  license:
    name: GNU General Public License v3 or later
    url: https://docs.weblate.org/en/latest/contributing/license.html
servers:
- url: 'http:'
  description: Weblate
tags:
- name: schema
paths:
  /api/schema/:
    get:
      operationId: api_schema_retrieve
      description: 'OpenApi3 schema for this API. Format can be selected via content negotiation.


        - YAML: application/vnd.oai.openapi

        - JSON: application/vnd.oai.openapi+json'
      parameters:
      - in: query
        name: lang
        schema:
          type: string
          enum:
          - ar
          - az
          - ba
          - be
          - be-latn
          - bg
          - br
          - ca
          - cs
          - cy
          - da
          - de
          - el
          - en
          - en-gb
          - es
          - fi
          - fr
          - ga
          - gl
          - he
          - hr
          - hu
          - id
          - is
          - it
          - ja
          - kab
          - kk
          - ko
          - nb
          - nl
          - pl
          - pt
          - pt-br
          - ro
          - ru
          - sk
          - sl
          - sq
          - sr
          - sr-latn
          - sv
          - ta
          - th
          - tr
          - uk
          - vi
          - zh-hans
          - zh-hant
      tags:
      - schema
      security:
      - tokenAuth: []
      - bearerAuth: []
      - cookieAuth: []
      - {}
      responses:
        '400':
          content:
            application/vnd.oai.openapi:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
            application/yaml:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
            application/vnd.oai.openapi+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: ''
        '401':
          content:
            application/vnd.oai.openapi:
              schema:
                $ref: '#/components/schemas/ErrorResponse401'
              examples:
                AuthenticationFailed:
                  value:
                    type: client_error
                    errors:
                    - code: authentication_failed
                      detail: Incorrect authentication credentials.
                      attr: null
                NotAuthenticated:
                  value:
                    type: client_error
                    errors:
                    - code: not_authenticated
                      detail: Authentication credentials were not provided.
                      attr: null
            application/yaml:
              schema:
                $ref: '#/components/schemas/ErrorResponse401'
              examples:
                AuthenticationFailed:
                  value:
                    type: client_error
                    errors:
                    - code: authentication_failed
                      detail: Incorrect authentication credentials.
                      attr: null
                NotAuthenticated:
                  value:
                    type: client_error
                    errors:
                    - code: not_authenticated
                      detail: Authentication credentials were not provided.
                      attr: null
            application/vnd.oai.openapi+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse401'
              examples:
                AuthenticationFailed:
                  value:
                    type: client_error
                    errors:
                    - code: authentication_failed
                      detail: Incorrect authentication credentials.
                      attr: null
                NotAuthenticated:
                  value:
                    type: client_error
                    errors:
                    - code: not_authenticated
                      detail: Authentication credentials were not provided.
                      attr: null
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse401'
              examples:
                AuthenticationFailed:
                  value:
                    type: client_error
                    errors:
                    - code: authentication_failed
                      detail: Incorrect authentication credentials.
                      attr: null
                NotAuthenticated:
                  value:
                    type: client_error
                    errors:
                    - code: not_authenticated
                      detail: Authentication credentials were not provided.
                      attr: null
          description: ''
        '404':
          content:
            application/vnd.oai.openapi:
              schema:
                $ref: '#/components/schemas/ErrorResponse404'
              examples:
                NotFound:
                  value:
                    type: client_error
                    errors:
                    - code: not_found
                      detail: Not found.
                      attr: null
            application/yaml:
              schema:
                $ref: '#/components/schemas/ErrorResponse404'
              examples:
                NotFound:
                  value:
                    type: client_error
                    errors:
                    - code: not_found
                      detail: Not found.
                      attr: null
            application/vnd.oai.openapi+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse404'
              examples:
                NotFound:
                  value:
                    type: client_error
                    errors:
                    - code: not_found
                      detail: Not found.
                      attr: null
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse404'
              examples:
                NotFound:
                  value:
                    type: client_error
                    errors:
                    - code: not_found
                      detail: Not found.
                      attr: null
          description: ''
        '405':
          content:
            application/vnd.oai.openapi:
              schema:
                $ref: '#/components/schemas/ErrorResponse405'
              examples:
                MethodNotAllowed:
                  value:
                    type: client_error
                    errors:
                    - code: method_not_allowed
                      detail: Method "get" not allowed.
                      attr: null
            application/yaml:
              schema:
                $ref: '#/components/schemas/ErrorResponse405'
              examples:
                MethodNotAllowed:
                  value:
                    type: client_error
                    errors:
                    - code: method_not_allowed
                      detail: Method "get" not allowed.
                      attr: null
            application/vnd.oai.openapi+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse405'
              examples:
                MethodNotAllowed:
                  value:
                    type: client_error
                    errors:
                    - code: method_not_allowed
                      detail: Method "get" not allowed.
                      attr: null
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse405'
              examples:
                MethodNotAllowed:
                  value:
                    type: client_error
                    errors:
                    - code: method_not_allowed
                      detail: Method "get" not allowed.
                      attr: null
          description: ''
        '406':
          content:
            application/vnd.oai.openapi:
              schema:
                $ref: '#/components/schemas/ErrorResponse406'
              examples:
                NotAcceptable:
                  value:
                    type: client_error
                    errors:
                    - code: not_acceptable
                      detail: Could not satisfy the request Accept header.
                      attr: null
            application/yaml:
              schema:
                $ref: '#/components/schemas/ErrorResponse406'
              examples:
                NotAcceptable:
                  value:
                    type: client_error
                    errors:
                    - code: not_acceptable
                      detail: Could not satisfy the request Accept header.
                      attr: null
            application/vnd.oai.openapi+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse406'
              examples:
                NotAcceptable:
                  value:
                    type: client_error
                    errors:
                    - code: not_acceptable
                      detail: Could not satisfy the request Accept header.
                      attr: null
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse406'
              examples:
                NotAcceptable:
                  value:
                    type: client_error
                    errors:
                    - code: not_acceptable
                      detail: Could not satisfy the request Accept header.
                      attr: null
          description: ''
        '423':
          content:
            application/vnd.oai.openapi:
              schema:
                $ref: '#/components/schemas/ErrorResponse423'
            application/yaml:
              schema:
                $ref: '#/components/schemas/ErrorResponse423'
            application/vnd.oai.openapi+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse423'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse423'
          description: ''
        '429':
          content:
            application/vnd.oai.openapi:
              schema:
                $ref: '#/components/schemas/ErrorResponse429'
              examples:
                Throttled:
                  value:
                    type: client_error
                    errors:
                    - code: throttled
                      detail: Request was throttled.
                      attr: null
            application/yaml:
              schema:
                $ref: '#/components/schemas/ErrorResponse429'
              examples:
                Throttled:
                  value:
                    type: client_error
                    errors:
                    - code: throttled
                      detail: Request was throttled.
                      attr: null
            application/vnd.oai.openapi+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse429'
              examples:
                Throttled:
                  value:
                    type: client_error
                    errors:
                    - code: throttled
                      detail: Request was throttled.
                      attr: null
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse429'
              examples:
                Throttled:
                  value:
                    type: client_error
                    errors:
                    - code: throttled
                      detail: Request was throttled.
                      attr: null
          description: ''
        '500':
          content:
            application/vnd.oai.openapi:
              schema:
                $ref: '#/components/schemas/ErrorResponse500'
              examples:
                APIException:
                  value:
                    type: server_error
                    errors:
                    - code: error
                      detail: A server error occurred.
                      attr: null
            application/yaml:
              schema:
                $ref: '#/components/schemas/ErrorResponse500'
              examples:
                APIException:
                  value:
                    type: server_error
                    errors:
                    - code: error
                      detail: A server error occurred.
                      attr: null
            application/vnd.oai.openapi+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse500'
              examples:
                APIException:
                  value:
                    type: server_error
                    errors:
                    - code: error
                      detail: A server error occurred.
                      attr: null
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse500'
              examples:
                APIException:
                  value:
                    type: server_error
                    errors:
                    - code: error
                      detail: A server error occurred.
                      attr: null
          description: ''
        '200':
          content:
            application/vnd.oai.openapi:
              schema:
                type: object
                additionalProperties: {}
            application/yaml:
              schema:
                type: object
                additionalProperties: {}
            application/vnd.oai.openapi+json:
              schema:
                type: object
                additionalProperties: {}
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
components:
  headers:
    X-RateLimit-Limit:
      schema:
        type: integer
      description: Allowed number of requests to perform
      required: true
    X-RateLimit-Remaining:
      schema:
        type: integer
      description: Remaining number of requests to perform
      required: true
    X-RateLimit-Reset:
      schema:
        type: integer
      description: Number of seconds until the rate-limit window resets
      required: true
  schemas:
    ErrorCode406Enum:
      enum:
      - not_acceptable
      type: string
      description: '* `not_acceptable` - Not Acceptable'
    Error423:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode423Enum'
        detail:
          type: string
        attr:
          type:
          - string
          - 'null'
      required:
      - attr
      - code
      - detail
    ErrorResponse404:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ClientErrorEnum'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error404'
      required:
      - errors
      - type
    ErrorCode429Enum:
      enum:
      - throttled
      type: string
      description: '* `throttled` - Throttled'
    ErrorCode401Enum:
      enum:
      - authentication_failed
      - not_authenticated
      type: string
      description: '* `authentication_failed` - Authentication Failed

        * `not_authenticated` - Not Authenticated'
    Error429:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode429Enum'
        detail:
          type: string
        attr:
          type:
          - string
          - 'null'
      required:
      - attr
      - code
      - detail
    Error406:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode406Enum'
        detail:
          type: string
        attr:
          type:
          - string
          - 'null'
      required:
      - attr
      - code
      - detail
    Error405:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode405Enum'
        detail:
          type: string
        attr:
          type:
          - string
          - 'null'
      required:
      - attr
      - code
      - detail
    Error400:
      type: object
      properties:
        code:
          type: string
          description: Error code. The examples list common validation and parse error codes.
          examples:
          - blank
          - date
          - datetime
          - does_not_exist
          - empty
          - incorrect_match
          - incorrect_type
          - invalid
          - invalid_choice
          - invalid_image
          - invalid_list
          - make_aware
          - max_length
          - max_string_length
          - max_value
          - min_value
          - no_match
          - no_name
          - not_a_list
          - 'null'
          - null_characters_not_allowed
          - overflow
          - parse_error
          - required
          - surrogate_characters_not_allowed
          - unique
        detail:
          type: string
        attr:
          type:
          - string
          - 'null'
      required:
      - attr
      - code
      - detail
    Error401:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode401Enum'
        detail:
          type: string
        attr:
          type:
          - string
          - 'null'
      required:
      - attr
      - code
      - detail
    ErrorResponse400TypeEnum:
      enum:
      - validation_error
      - client_error
      type: string
      description: '* `validation_error` - Validation Error

        * `client_error` - Client Error'
    Error500:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode500Enum'
        detail:
          type: string
        attr:
          type:
          - string
          - 'null'
      required:
      - attr
      - code
      - detail
    ErrorCode500Enum:
      enum:
      - error
      type: string
      description: '* `error` - Error'
    ServerErrorEnum:
      enum:
      - server_error
      type: string
      description: '* `server_error` - Server Error'
    Error404:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode404Enum'
        detail:
          type: string
        attr:
          type:
          - string
          - 'null'
      required:
      - attr
      - code
      - detail
    ErrorCode404Enum:
      enum:
      - not_found
      type: string
      description: '* `not_found` - Not Found'
    ErrorResponse500:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ServerErrorEnum'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error500'
      required:
      - errors
      - type
    ErrorResponse423:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ServerErrorEnum'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error423'
      required:
      - errors
      - type
    ErrorResponse401:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ClientErrorEnum'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error401'
      required:
      - errors
      - type
    ErrorResponse429:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ClientErrorEnum'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error429'
      required:
      - errors
      - type
    ErrorCode423Enum:
      enum:
      - repository-locked
      - component-locked
      - unknown-locked
      type: string
      description: '* `repository-locked` - Repository Locked

        * `component-locked` - Component Locked

        * `unknown-locked` - Unknown Locked'
    ErrorResponse400:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ErrorResponse400TypeEnum'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error400'
      required:
      - errors
      - type
    ErrorResponse406:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ClientErrorEnum'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error406'
      required:
      - errors
      - type
    ErrorResponse405:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ClientErrorEnum'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error405'
      required:
      - errors
      - type
    ErrorCode405Enum:
      enum:
      - method_not_allowed
      type: string
      description: '* `method_not_allowed` - Method Not Allowed'
    ClientErrorEnum:
      enum:
      - client_error
      type: string
      description: '* `client_error` - Client Error'
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Bearer
      description: "Token-based authentication with required prefix `Bearer`.\n\n- Each user has a personal access token which they can get from their respective user profile. These tokens have the `wlu_` prefix.\n- It is possible to create project tokens whose access to the API is limited to operations to their associated project. These tokens have the `wlp_` prefix.\n        "
    cookieAuth:
      type: apiKey
      in: cookie
      name: sessionid
      description: Session-based authentication used when user is signed in.
    tokenAuth:
      type: apiKey
      in: header
      name: Token
      description: "Token-based authentication with required prefix `Token`.\n\n- Each user has a personal access token which they can get from their respective user profile. These tokens have the `wlu_` prefix.\n- It is possible to create project tokens whose access to the API is limited to operations to their associated project. These tokens have the `wlp_` prefix.\n        "
externalDocs:
  url: https://docs.weblate.org/en/latest/index.html
  description: Official Weblate documentation