Weblate languages API

The languages API from Weblate — 3 operation(s) for languages.

OpenAPI Specification

weblate-languages-api-openapi.yml Raw ↑
openapi: 3.1.1
info:
  title: Weblate's REST addons languages 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: languages
paths:
  /api/languages/:
    get:
      operationId: api_languages_list
      description: Return a list of all languages the user has access to.
      parameters:
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      tags:
      - languages
      security:
      - tokenAuth: []
      - bearerAuth: []
      - cookieAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: ''
        '401':
          content:
            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: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse403'
              examples:
                PermissionDenied:
                  value:
                    type: client_error
                    errors:
                    - code: permission_denied
                      detail: You do not have permission to perform this action.
                      attr: null
          description: ''
        '404':
          content:
            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/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/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/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse423'
          description: ''
        '429':
          content:
            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/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/json:
              schema:
                $ref: '#/components/schemas/PaginatedLanguageList'
          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'
    post:
      operationId: api_languages_create
      description: Create a new language.
      tags:
      - languages
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Language'
        required: true
      security:
      - tokenAuth: []
      - bearerAuth: []
      - cookieAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: ''
        '401':
          content:
            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: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse403'
              examples:
                PermissionDenied:
                  value:
                    type: client_error
                    errors:
                    - code: permission_denied
                      detail: You do not have permission to perform this action.
                      attr: null
          description: ''
        '404':
          content:
            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/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/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: ''
        '415':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse415'
              examples:
                UnsupportedMediaType:
                  value:
                    type: client_error
                    errors:
                    - code: unsupported_media_type
                      detail: Unsupported media type "application/json" in request.
                      attr: null
          description: ''
        '423':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse423'
          description: ''
        '429':
          content:
            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/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse500'
              examples:
                APIException:
                  value:
                    type: server_error
                    errors:
                    - code: error
                      detail: A server error occurred.
                      attr: null
          description: ''
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Language'
          description: ''
  /api/languages/{code}/:
    get:
      operationId: api_languages_retrieve
      description: Return information about a language.
      parameters:
      - in: path
        name: code
        schema:
          type: string
          pattern: ^[^/]+$
        required: true
      tags:
      - languages
      security:
      - tokenAuth: []
      - bearerAuth: []
      - cookieAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: ''
        '401':
          content:
            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: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse403'
              examples:
                PermissionDenied:
                  value:
                    type: client_error
                    errors:
                    - code: permission_denied
                      detail: You do not have permission to perform this action.
                      attr: null
          description: ''
        '404':
          content:
            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/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/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/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse423'
          description: ''
        '429':
          content:
            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/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/json:
              schema:
                $ref: '#/components/schemas/Language'
          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'
    put:
      operationId: api_languages_update
      description: Change the language parameters.
      parameters:
      - in: path
        name: code
        schema:
          type: string
          pattern: ^[^/]+$
        required: true
      tags:
      - languages
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Language'
        required: true
      security:
      - tokenAuth: []
      - bearerAuth: []
      - cookieAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: ''
        '401':
          content:
            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: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse403'
              examples:
                PermissionDenied:
                  value:
                    type: client_error
                    errors:
                    - code: permission_denied
                      detail: You do not have permission to perform this action.
                      attr: null
          description: ''
        '404':
          content:
            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/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/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: ''
        '415':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse415'
              examples:
                UnsupportedMediaType:
                  value:
                    type: client_error
                    errors:
                    - code: unsupported_media_type
                      detail: Unsupported media type "application/json" in request.
                      attr: null
          description: ''
        '423':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse423'
          description: ''
        '429':
          content:
            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/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/json:
              schema:
                $ref: '#/components/schemas/Language'
          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'
    patch:
      operationId: api_languages_partial_update
      description: Change the language parameters.
      parameters:
      - in: path
        name: code
        schema:
          type: string
          pattern: ^[^/]+$
        required: true
      tags:
      - languages
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedLanguage'
      security:
      - tokenAuth: []
      - bearerAuth: []
      - cookieAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: ''
        '401':
          content:
            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: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse403'
              examples:
                PermissionDenied:
                  value:
                    type: client_error
                    errors:
                    - code: permission_denied
                      detail: You do not have permission to perform this action.
                      attr: null
          description: ''
        '404':
          content:
            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/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/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: ''
        '415':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse415'
              examples:
                UnsupportedMediaType:
                  value:
                    type: client_error
                    errors:
                    - code: unsupported_media_type
                      detail: Unsupported media type "application/json" in request.
                      attr: null
          description: ''
        '423':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse423'
          description: ''
        '429':
          content:
            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/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/json:
              schema:
                $ref: '#/components/schemas/Language'
          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'
    delete:
      operationId: api_languages_destroy
      description: Delete the language.
      parameters:
      - in: path
        name: code
        schema:
          type: string
          pattern: ^[^/]+$
        required: true
      tags:
      - languages
      security:
      - tokenAuth: []
      - bearerAuth: []
      - cookieAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: ''
        '401':
          content:
            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: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse403'
              examples:
                PermissionDenied:
                  value:
                    type: client_error
                    errors:
                    - code: permission_denied
                      detail: You do not have permission to perform this action.
                      attr: null
          description: ''
        '404':
          content:
            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/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/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/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse423'
          description: ''
        '429':
          content:
            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/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse500'
              examples:
                APIException:
                  value:
                    type: server_error
                    errors:
                    - code: error
                      detail: A server error occurred.
                      attr: null
          description: ''
        '204':
          description: No response body
  /api/languages/{code}/statistics/:
    get:
      operationId: api_languages_statistics_retrieve
      description: Return statistics for a language.
      parameters:
      - in: path
        name: code
        schema:
          type: string
          pattern: ^[^/]+$
        required: true
      tags:
      - languages
      security:
      - tokenAuth: []
      - bearerAuth: []
      - cookieAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: ''
        '401':
          content:
            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: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse403'
              examples:
                PermissionDenied:
                  value:
                    type: client_error
                    errors:
                    - code: permission_denied
                      detail: You do not have permission to perform this action.
                      attr: null
          description: ''
        '404':
          content:
            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/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse405'
              examples:
                MethodNotAllowed:
                  value:
                    type: client_error
                    errors:
                    - code: method_not_allowed
                      detail: Method "g

# --- truncated at 32 KB (50 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/weblate/refs/heads/main/openapi/weblate-languages-api-openapi.yml