openapi: 3.0.0
servers:
  - url: /
info:
  contact:
    name: Open Build Service
    url: https://openbuildservice.org/
  description: |
    The _Open Build Service API_ is a XML API.

    To authenticate, use [HTTP basic authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) by passing the _Authorization_ header in the form of `Authorization: Basic <credentials>`.

    There is no API versioning as there is no need for it right now.

    Only rudimentary rate limiting is implemented, so please be gentle when using the API concurrently, especially with potentially expensive operations.
    In case of abuse, we will limit/remove your access.

    For command-line users, we recommend using [osc](https://github.com/openSUSE/osc) with its _api_ command to interact with the API.
    It's as simple as this example: `osc api /about` (_about_ is one of the endpoints documented below)
  license:
    name: GNU General Public License v2.0
    url: https://github.com/openSUSE/open-build-service/blob/master/COPYING
  title: Open Build Service API
  version: 2.10.50
  x-apisguru-categories:
    - developer_tools
  x-origin:
    - format: openapi
      url: https://build.opensuse.org/apidocs-new/OBS-v2.10.50.yaml
      version: "3.0"
  x-providerName: opensuse.org
  x-serviceName: obs
externalDocs:
  description: Open Build Service - Documentation
  url: https://openbuildservice.org/help/
tags:
  - name: General Information
  - name: Attributes
  - name: Attribute Namespaces
  - name: Build
  - name: Configuration
  - name: Distributions
  - name: Groups
  - name: Issue Trackers
  - name: Person
  - name: Published Binaries
  - description: |
      Please, before using request endpoints, make sure you have read and understood the "Request and Review System" section of
      the [user guide](https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.request_and_review_system.html).

      In the next sections you will see how calls to request endpoints could be combined to fullfill different workflows.

      ## Workflow 1: Create a Submit Request from Package A to Package B

      The steps described in this workflow could be easily replicated with this command:
      `osc createrequest -a submit home:Admin:Origin A home:Admin:Destination B -m "Submit A to B"`

      The logic involved in the creation of a submit request will require to call more endpoints. For the sake of simplicity we suppose, that:
        - The project `home:Admin:Origin` exists, with a package `A`, and it has a file called `test.txt`.
        - The latest revision of the package `home:Admin:Origin:A` is `1`.
        - The project `home:Admin:Destination` doesn't exist.
        - There aren't any other submit requests previously created with the same source and target.

      To create a submit request, pass the following request body:
      ```
      <request>
        <action type="submit">
          <source project="home:Admin:Origin" package="A" rev="1"/>
          <target project="home:Admin:Destination" package="B"/>
        </action>
        <state name="new"/>
        <description>Submit A to B</description>
      </request>
      ```
      ... to this endpoint: `POST /request?cmd=create`


      ## Workflow 2: Review a Submit Request
      **Add a User as Reviewer of a Submit Request**

      First, we make sure that a certain user can review our submit request.
      We will add the user `test1` as a reviewer of the already created submit request.

      For the sake of simplicity we suppose, that:
        - There is already a user with login name `test1`.
        - There is already a submit request with number `33`.

      Adding the user `test1` as a reviewer of the submit request number `33` can be performed with this command:
      `osc review add -m 'Add user test1 as reviewer' -U test1 33`

      The same action can be done with this API endpoint: `POST /request/33?cmd=addreview&by_user=test1`

      **Mark a Review of a Submit Request as Accepted**

      Now that the user `test1` is a reviewer of the submit request number `33`, this user can review that submit request as `accepted`.

      To review the submit request as `accepted`, issue the following command, using for authentication the login `test1`:
      `osc review accept -m 'Accept submit request' -U test1 33`

      This can also be done with this API endpoint, using for authentication the login `test1`:
      `POST /request/33?cmd=changereviewstate&newstate=accepted&by_user=test1`


      ## Workflow 3: Approve a Submit Request

      To mark a submit request as approved means that a submit request will be automatically accepted when all the required reviews are accepted.

      For the sake of simplicity let's accept that:
        - There is already a user with the login name `test1`, which is also a maintainer of the project `home:Admin`.
        - There is already a submit request with the number `44`.
        - The user with login name `test1` is a reviewer of the submit request number `44`.

      **Note**: The following commands or endpoints should all be executed as user `test1`.

      **Mark a Submit Request as Approved**

      To mark a request as approved, execute the following command: `osc request approve -m 'Approve submit request' -U test1 44`

      This can also be done with this endpoint (as user `test1`): `POST /request/44?cmd=approve`

      **Review an Already Approved Submit Request as Accepted**

      After adding a review to this submit request with state `accepted`, the submit request will automatically be accepted.
      This is the same step that has been described previously in the last section *"Review a Submit Request as Accepted"*.

      To perform this operation with `osc`, perform the following command: `osc review accept -m 'Accept submit request' -U test1 44`

      The same can be done with the following endpoint: `POST /request/44?cmd=changereviewstate&newstate=accepted&by_user=test1`
    externalDocs:
      url: https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.request_and_review_system.html
    name: Request
  - name: Workers
paths:
  /about:
    get:
      description: Get generic information about the API.
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                properties:
                  commit:
                    example: 7b5d82e6143442a8eb8459f35cc94d2fbe263ebe
                    type: string
                  description:
                    example: API to the Open Build Service
                    type: string
                  last_deployment:
                    example: 2020-11-10 15:07:02 +0000
                    type: string
                  revision:
                    example: 2.11~alpha.20201110T101235.7b5d82e614
                    type: string
                  title:
                    example: Open Build Service API
                    type: string
                required:
                  - title
                  - description
                  - revision
                type: object
                xml:
                  name: about
          description: |
            OK. The request has succeeded.

            XML Schema used for body validation: [about.xsd](../schema/about.xsd)
      summary: Get information about API.
      tags:
        - General Information
  /architectures:
    get:
      description: |
        Get a list of all known architectures known to OBS in general. This is not the list of architectures provided by this instance. Check the schedulers element from the `/configuration` route for this.
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                count: "4"
                entry:
                  - name: aarch64
                  - name: armv7l
                  - name: s390x
                  - name: x86_64
              schema:
                properties:
                  count:
                    type: integer
                    xml:
                      attribute: true
                  entry:
                    items:
                      properties:
                        name:
                          type: string
                          xml:
                            attribute: true
                      type: object
                    type: array
                type: object
                xml:
                  name: directory
          description: OK. The request has succeeded.
        "401":
          content:
            application/xml; charset=utf-8:
              examples:
                anonymous_user:
                  summary: Anonymous User
                  value:
                    code: anonymous_user
                    summary: Anonymous user is not allowed here - please login
                authentication_required:
                  summary: Authentication Required
                  value:
                    code: authentication_required
                    summary: Unknown user 'Admin' or invalid password
              schema:
                properties:
                  code:
                    type: string
                    xml:
                      attribute: true
                  data:
                    items:
                      type: string
                    type: array
                  details:
                    type: string
                  summary:
                    type: string
                type: object
                xml:
                  name: status
          description: |
            Unauthorized.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      security:
        - basic_authentication: []
      summary: List all known architectures.
      tags:
        - General Information
  "/architectures/{architecture_name}":
    get:
      description: Show information about one architecture.
      parameters:
        - description: Architecture name
          example: x86_64
          in: path
          name: architecture_name
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                example:
                  name: x86_64
                properties:
                  name:
                    type: string
                    xml:
                      attribute: true
                type: object
                xml:
                  name: architecture
          description: OK. The request has succeeded.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: unknown_architecture
                summary: "Architecture does not exist: x999"
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Show one architecture.
      tags:
        - General Information
  /attribute:
    get:
      description: List all attribute namespaces.
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                count: "2"
                entry:
                  - name: OBS
                  - name: openSUSE
              schema:
                $ref: "#/paths/~1architectures/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK. The request has succeeded.

            XML Schema used for body validation: [directory.xsd](../schema/directory.xsd)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
      security:
        - basic_authentication: []
      summary: List all attribute namespaces.
      tags:
        - Attribute Namespaces
  "/attribute/{namespace}":
    delete:
      description: |
        Delete an attribute namespace and all attributes below.

        This operation is the same as the one defined with [DELETE /attribute/{namespace}/_meta](#/Attributes/delete_attribute__namespace___meta).
      parameters:
        - $ref: "#/paths/~1attribute~1%7Bnamespace%7D/get/parameters/0"
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                code: ok
                summary: Ok
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK. The request has succeeded.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
      security:
        - basic_authentication: []
      summary: Delete an attribute namespace and all attributes below.
      tags:
        - Attribute Namespaces
    get:
      description: List all attributes under a given attribute namespace.
      parameters:
        - description: The namespace
          example: OBS_TEST
          in: path
          name: namespace
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                count: "2"
                entry:
                  - name: AutoCleanup
                  - name: OwnerRootProject
              schema:
                $ref: "#/paths/~1architectures/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK. The request has succeeded.

            XML Schema used for body validation: [directory.xsd](../schema/directory.xsd)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find AttribNamespace
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: List all attributes below a namespace.
      tags:
        - Attribute Namespaces
  "/attribute/{namespace}/_meta":
    delete:
      description: |
        Delete an attribute namespace and all attributes below.

        This operation is the same as the one defined with [DELETE /attribute/{namespace}](#/Attributes/delete_attribute__namespace_).
      parameters:
        - $ref: "#/paths/~1attribute~1%7Bnamespace%7D/get/parameters/0"
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
      security:
        - basic_authentication: []
      summary: Delete an attribute namespace and all attributes below.
      tags:
        - Attribute Namespaces
    get:
      description: Shows attribute namespace.
      parameters:
        - $ref: "#/paths/~1attribute~1%7Bnamespace%7D/get/parameters/0"
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                properties:
                  modifiable_by:
                    items:
                      properties:
                        user:
                          example: user_login_name
                          type: string
                          xml:
                            attribute: true
                      type: object
                    type: array
                  name:
                    example: OBS_TEST
                    type: string
                    xml:
                      attribute: true
                type: object
                xml:
                  name: namespace
          description: |
            OK. The request has succeeded.

            XML Schema used for body validation: [attribute_namespace_meta.xsd](../schema/attribute_namespace_meta.xsd)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find AttribNamespace
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Show attribute namespace.
      tags:
        - Attribute Namespaces
    post:
      description: |
        This endpoint can be used for both, creating an attribute namespace and updating it:
          * If the attribute namespace passed as parameter doesn't exist, it will create the attribute namespace.
          * If the attribute namespace passed as parameter already exists, it will update the namespace attribute.

        This operation is the same as the one defined with [PUT](#/Attributes/put_attribute__namespace___meta).
      parameters:
        - $ref: "#/paths/~1attribute~1%7Bnamespace%7D/get/parameters/0"
      requestBody:
        content:
          application/xml; charset=utf-8:
            schema:
              $ref: "#/paths/~1attribute~1%7Bnamespace%7D~1_meta/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
        description: |
          Attribute namespace definition.

          XML Schema used for body validation: [attribute_namespace_meta.xsd](../schema/attribute_namespace_meta.xsd)
        required: true
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "400":
          content:
            application/xml; charset=utf-8:
              examples:
                empty_body:
                  summary: Validation Failed (Empty Body)
                  value:
                    code: validation_failed
                    summary: Document is empty, not allowed for attribute_namespace_meta
                wrong_xml_element:
                  summary: Validation Failed (Wrong XML Element)
                  value:
                    code: validation_failed
                    summary: "attribute_namespace_meta validation error: 1:0: ERROR: Element 'foo': No matching global declaration available for the validation root."
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Validation Failed.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              examples:
                namespace:
                  summary: Not Found (Namespace)
                  value:
                    code: not_found
                    summary: Couldn't find AttribNamespace
                user:
                  summary: Not Found (User)
                  value:
                    code: not_found
                    summary: Couldn't find User with login = user_login_name
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Change attribute namespace. Create an attribute namespace if it doesn't exist.
      tags:
        - Attribute Namespaces
    put:
      description: |
        This endpoint can be used for both, creating an attribute namespace and updating it:
          * If the attribute namespace passed as parameter doesn't exist, it will create the attribute namespace.
          * If the attribute namespace passed as parameter already exists, it will update the namespace attribute.

        This operation is the same as the one defined with [POST](#/Attributes/post_attribute__namespace___meta).
      parameters:
        - $ref: "#/paths/~1attribute~1%7Bnamespace%7D/get/parameters/0"
      requestBody:
        content:
          application/xml; charset=utf-8:
            schema:
              $ref: "#/paths/~1attribute~1%7Bnamespace%7D~1_meta/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
        description: |
          Attribute namespace definition.

          XML Schema used for body validation: [attribute_namespace_meta.xsd](../schema/attribute_namespace_meta.xsd)
        required: true
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "400":
          content:
            application/xml; charset=utf-8:
              examples:
                empty_body:
                  summary: Validation Failed (Empty Body)
                  value:
                    code: validation_failed
                    summary: Document is empty, not allowed for attribute_namespace_meta
                wrong_xml_element:
                  summary: Validation Failed (Wrong XML Element)
                  value:
                    code: validation_failed
                    summary: "attribute_namespace_meta validation error: 1:0: ERROR: Element 'foo': No matching global declaration available for the validation root."
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Validation Failed.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              examples:
                namespace:
                  summary: Not Found (Namespace)
                  value:
                    code: not_found
                    summary: Couldn't find AttribNamespace
                user:
                  summary: Not Found (User)
                  value:
                    code: not_found
                    summary: Couldn't find User with login = user_login_name
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Change attribute namespace. Create an attribute namespace if it doesn't exist.
      tags:
        - Attribute Namespaces
  "/attribute/{namespace}/{attribute_name}":
    delete:
      description: |
        Delete an attribute and all its values in projects or packages.

        This operation is the same as the one defined with [DELETE /attribute/{namespace}/{attribute_name}/_meta](#/Attributes/delete_attribute__namespace___attribute_name___meta)
      parameters:
        - $ref: "#/paths/~1attribute~1%7Bnamespace%7D/get/parameters/0"
        - description: The name of the attribute
          example: OwnerRootProjectTest
          in: path
          name: attribute_name
          required: true
          schema:
            type: string
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              examples:
                namespace:
                  summary: Not Found (Namespace)
                  value:
                    code: not_found
                    summary: Couldn't find AttribNamespace
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Delete an attribute and all its values in projects or packages.
      tags:
        - Attributes
  "/attribute/{namespace}/{attribute_name}/_meta":
    delete:
      description: |
        Delete an attribute and all its values in projects or packages.

        This operation is the same as the one defined with [DELETE /attribute/{namespace}/{attribute_name}](#/Attributes/delete_attribute__namespace___attribute_name_)
      parameters:
        - $ref: "#/paths/~1attribute~1%7Bnamespace%7D/get/parameters/0"
        - $ref: "#/paths/~1attribute~1%7Bnamespace%7D~1%7Battribute_name%7D/delete/parameters/1"
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              examples:
                namespace:
                  summary: Not Found (Namespace)
                  value:
                    code: not_found
                    summary: Couldn't find AttribNamespace
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Delete an attribute and all its values in projects or packages.
      tags:
        - Attributes
    get:
      description: Shows attribute.
      parameters:
        - $ref: "#/paths/~1attribute~1%7Bnamespace%7D/get/parameters/0"
        - $ref: "#/paths/~1attribute~1%7Bnamespace%7D~1%7Battribute_name%7D/delete/parameters/1"
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                properties:
                  allowed:
                    properties:
                      value:
                        example:
                          - DisableDevelTest
                          - BugownerOnlyTest
                        items:
                          type: string
                        type: array
                    type: object
                  count:
                    example: 0
                    type: integer
                  description:
                    example: An example description for an attribute.
                    type: string
                  modifiable_by:
                    items:
                      properties:
                        user:
                          example: user_login_name
                          type: string
                          xml:
                            attribute: true
                      type: object
                    type: array
                  name:
                    example: OBS_TEST
                    type: string
                    xml:
                      attribute: true
                  namespace:
                    example: OwnerRootProjectTest
                    type: string
                    xml:
                      attribute: true
                type: object
                xml:
                  name: definition
          description: OK. The request has succeeded.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              examples:
                namespace:
                  summary: Not Found (Namespace)
                  value:
                    code: not_found
                    summary: Couldn't find AttribNamespace
                unknown_attribute:
                  summary: Unknown Attribute
                  value:
                    code: unknown_attribute
                    summary: Unknown attribute 'OBS_TEST':'OwnerRootProjectTest'
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Shows attribute.
      tags:
        - Attributes
    post:
      description: |
        This endpoint can be used for both, creating an attribute and updating it:
          * If the attribute passed as parameter doesn't exist, it will create the attribute.
          * If the attribute passed as parameter already exists, it will update the attribute.

        This operation is the same as the one defined with [PUT](#/Attributes/put_attribute__namespace___attribute_name___meta).
      parameters:
        - $ref: "#/paths/~1attribute~1%7Bnamespace%7D/get/parameters/0"
        - $ref: "#/paths/~1attribute~1%7Bnamespace%7D~1%7Battribute_name%7D/delete/parameters/1"
      requestBody:
        content:
          application/xml; charset=utf-8:
            schema:
              $ref: "#/paths/~1attribute~1%7Bnamespace%7D~1%7Battribute_name%7D~1_meta/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
        description: Attribute definition.
        required: true
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "400":
          content:
            application/xml; charset=utf-8:
              examples:
                empty_body:
                  summary: Validation Failed (Empty Body)
                  value:
                    code: validation_failed
                    summary: Document is empty, not allowed for attrib_type
                illegal_request:
                  summary: Illegal Request
                  value:
                    code: illegal_request
                    summary: "Illegal request: PUT/POST /attribute/OBS_TEST/OwnerRootProjectTest/_meta: path does not match content"
                wrong_xml_element:
                  summary: Validation Failed (Wrong XML Attributes)
                  value:
                    code: validation_failed
                    summary: "attrib_type validation error: 1:0: ERROR: Element definition failed to validate attributes"
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Validation Failed.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              examples:
                namespace:
                  summary: Not Found (Namespace)
                  value:
                    code: not_found
                    summary: Couldn't find AttribNamespace
                unknown_attribute:
                  summary: Unknown Attribute
                  value:
                    code: unknown_attribute
                    summary: Unknown attribute 'OBS_TEST':'OwnerRootProjectTest'
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Change attribute data. Create an attribute if it doesn't exist.
      tags:
        - Attributes
    put:
      description: |
        This endpoint can be used for both, creating an attribute and updating it:
          * If the attribute passed as parameter doesn't exist, it will create the attribute.
          * If the attribute passed as parameter already exists, it will update the attribute.

        This operation is the same as the one defined with [POST](#/Attributes/post_attribute__namespace___attribute_name___meta).
      parameters:
        - $ref: "#/paths/~1attribute~1%7Bnamespace%7D/get/parameters/0"
        - $ref: "#/paths/~1attribute~1%7Bnamespace%7D~1%7Battribute_name%7D/delete/parameters/1"
      requestBody:
        content:
          application/xml; charset=utf-8:
            schema:
              $ref: "#/paths/~1attribute~1%7Bnamespace%7D~1%7Battribute_name%7D~1_meta/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
        description: Attribute definition.
        required: true
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "400":
          content:
            application/xml; charset=utf-8:
              examples:
                empty_body:
                  summary: Validation Failed (Empty Body)
                  value:
                    code: validation_failed
                    summary: Document is empty, not allowed for attrib_type
                illegal_request:
                  summary: Illegal Request
                  value:
                    code: illegal_request
                    summary: "Illegal request: PUT/POST /attribute/OBS_TEST/OwnerRootProjectTest/_meta: path does not match content"
                wrong_xml_element:
                  summary: Validation Failed (Wrong XML Attributes)
                  value:
                    code: validation_failed
                    summary: "attrib_type validation error: 1:0: ERROR: Element definition failed to validate attributes"
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Validation Failed.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              examples:
                namespace:
                  summary: Not Found (Namespace)
                  value:
                    code: not_found
                    summary: Couldn't find AttribNamespace
                unknown_attribute:
                  summary: Unknown Attribute
                  value:
                    code: unknown_attribute
                    summary: Unknown attribute 'OBS_TEST':'OwnerRootProjectTest'
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Change attribute data. Create an attribute if it doesn't exist.
      tags:
        - Attributes
  /build:
    get:
      description: Get a simple directory listing of all projects
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                entry:
                  - name: openSUSE:Leap:15.1
                  - name: openSUSE:Leap:15.2
              schema:
                $ref: "#/paths/~1architectures/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK

            XML Schema used for body validation: [directory.xsd](../schema/directory.xsd)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
      security:
        - basic_authentication: []
      summary: Get a simple directory listing of all projects
      tags:
        - Build
  "/build/{project_name}":
    get:
      description: Get a simple directory listing of all repositories for the specified project
      parameters:
        - description: Project name
          example: home:Admin
          in: path
          name: project_name
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                entry:
                  - name: openSUSE_Tumbleweed
                  - name: openSUSE_Leap_15.3
              schema:
                $ref: "#/paths/~1architectures/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK

            XML Schema used for body validation: [directory.xsd](../schema/directory.xsd)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              examples:
                Unknown Project:
                  value:
                    code: unknown_project
                    summary: "Project not found: <some project>."
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Unknown project.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      security:
        - basic_authentication: []
      summary: Get a simple directory listing of all repositories for the specified project
      tags:
        - Build
    post:
      description: Apply different actions on builds/build processes of the specified project
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - description: Name of the package. Scope the commands to the specified package.
          example: firefox
          in: query
          name: package
          schema:
            type: string
        - description: Name of the build architecture. Scope the commands to the specified architectures.
          example: x86_64
          in: query
          name: arch
          schema:
            type: string
        - description: Name of the repository. Scope the commands to the specified repository.
          example: openSUSE_Leap_15.2
          in: query
          name: repository
          schema:
            type: string
        - description: |
            **NOTE**: All commands described below, can be scoped to a package within the project by setting the `package`
            parameter.

            * `wipe`: Delete all binaries build by the project.
            * `restartbuild`: Restart all running build processes inside the project.
            * `rebuild`: Trigger a rebuild of all packages inside the project.
            * `abortbuild`: Abort all running build processes for the specified project, marking them as failed.
            * `killbuild`: Alias for `abortbuild`.
            * `unpublish`: Delete all published package binaries, for the specified project, from the download repository.
            * `sendsysrq`: Send a single sysrq character to the kernel of a running build. Character need to be specified
                           through the `sysrq` parameter. Only a subset of debugging requests are supported (eg. 9, t or w).
          in: query
          name: cmd
          required: true
          schema:
            enum:
              - wipe
              - restartbuild
              - killbuild
              - abortbuild
              - rebuild
              - unpublish
              - sendsysrq
            type: string
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "400":
          content:
            application/xml; charset=utf-8:
              examples:
                Illegal Request:
                  value:
                    code: illegal_request
                    summary: unsupported POST command '<some command>' to <some url>.
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Illegal request.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
        "403":
          content:
            application/xml; charset=utf-8:
              examples:
                Execute cmd no permission:
                  value:
                    code: execute_cmd_no_permission
                    summary: No permission to execute command on package <some package> in project <some project>
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Execute command no permission.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
        "404":
          $ref: "#/paths/~1build~1%7Bproject_name%7D/get/responses/404"
      security:
        - basic_authentication: []
      summary: Apply different actions on builds/build processes of the specified project
      tags:
        - Build
  "/build/{project_name}/_result":
    get:
      description: Get the build results for packages, architectures and repositories of the specified project.
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - description: |
            Specify which sections should be included in the result list.

            * `status`: Include detailed infos about the build status. **Default**
            * `summary`: Include the summary of the status values.
            * `binarylist`: Include a list of generated binary files.
          in: query
          name: view
          schema:
            enum:
              - summary
              - status
              - binarylist
            type: string
        - description: Name of the package. Limit results to the specified package.
          example: obs-server
          in: query
          name: package
          schema:
            type: string
        - description: Name of the build architecture. Limit results to the specified build architecture.
          example: x86_64
          in: query
          name: arch
          schema:
            type: string
        - description: Name of the repository. Limit results to the specified repository.
          example: openSUSE_Leap_15.2
          in: query
          name: repository
          schema:
            type: string
        - description: Show the last build result (excludes current building job states).
          example: 1
          in: query
          name: lastbuild
          schema:
            type: boolean
        - description: Include build results from packages with project local links.
          example: 1
          in: query
          name: locallink
          schema:
            type: boolean
        - description: Include build results from _multibuild definitions.
          example: 1
          in: query
          name: multibuild
          schema:
            type: boolean
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                properties:
                  result:
                    items:
                      properties:
                        arch:
                          example: x86_64
                          type: string
                          xml:
                            attribute: true
                        binarylist:
                          items:
                            properties:
                              binary:
                                items:
                                  properties:
                                    filename:
                                      example: hello-2.10-3.1.x86_64.rpm
                                      type: string
                                      xml:
                                        attribute: true
                                    mtime:
                                      example: "1617270174"
                                      type: string
                                      xml:
                                        attribute: true
                                    size:
                                      example: "58352"
                                      type: string
                                      xml:
                                        attribute: true
                                  type: object
                                type: array
                              package:
                                example: ctris
                                type: string
                                xml:
                                  attribute: true
                            type: object
                          type: array
                        code:
                          example: published
                          type: string
                          xml:
                            attribute: true
                        project:
                          example: home:foo
                          type: string
                          xml:
                            attribute: true
                        repository:
                          example: openSUSE_Leap_15.3
                          type: string
                          xml:
                            attribute: true
                        state:
                          example: published
                          type: string
                          xml:
                            attribute: true
                        status:
                          items:
                            properties:
                              code:
                                example: succeeded
                                type: string
                                xml:
                                  attribute: true
                              details:
                                example: package whitelist
                                type: string
                              package:
                                example: ctris
                                type: string
                                xml:
                                  attribute: true
                            type: object
                          type: array
                        summary:
                          properties:
                            statuscount:
                              items:
                                properties:
                                  code:
                                    example: disabled
                                    type: string
                                    xml:
                                      attribute: true
                                  count:
                                    example: "2"
                                    type: string
                                    xml:
                                      attribute: true
                                type: object
                              type: array
                          type: object
                      type: object
                    type: array
                  state:
                    example: e096d16554264fa553ca0aa3226cf189
                    type: string
                    xml:
                      attribute: true
                type: object
                xml:
                  name: resultlist
          description: |
            OK.

            XML Schema used for body validation: [buildresult.rng](../schema/buildresult.rng)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          $ref: "#/paths/~1build~1%7Bproject_name%7D/get/responses/404"
      security:
        - basic_authentication: []
      summary: Get the build results for packages, architectures and repositories of the specified project.
      tags:
        - Build
  "/build/{project_name}/{repository_name}":
    get:
      description: List of all architectures the specified project builds against a given repository.
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - description: Repository name
          example: openSUSE_Tumbleweed
          in: path
          name: repository_name
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                entry:
                  - name: x86_64
                  - name: i586
              schema:
                $ref: "#/paths/~1architectures/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK

            XML Schema used for body validation: [directory.xsd](../schema/directory.xsd)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: 404
                details: 404 project '<project_name>' has no repository '<repository_name>'
                summary: project '<project_name>' has no repository '<repository_name>'
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: List of all architectures the specified project builds against a given repository.
      tags:
        - Build
  "/build/{project_name}/{repository_name}/_buildconfig":
    get:
      description: |
        Show the build configuration for the specified repository. Includes all base package requirements, mappings and macros.
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
      responses:
        "200":
          content:
            text/plain:
              example: |
                %define _project home:Admin

                ### from openSUSE.org:openSUSE:Leap:15.2
                %define _repository standard

                Macros:
                %vendor obs://build.some.where/home:Admin
                %_project home:Admin

                ### from openSUSE.org:openSUSE:Leap:15.2

                %_repository standard
                :Macros


                Release: <CI_CNT>.<B_CNT> spec:lp152.<CI_CNT>.<B_CNT>
                %define gcc_version 7

                # testing new cycle algorithm
                BuildFlags: genmetaalgo:1

                # abort the build if the log file didn't move in an hour (seen in libreoffice builds)
                BuildFlags: logidlelimit:3600

                PublishFlags: ympdist:openSUSE%20Leap%2015.2

                # Help with the switch to the gcc7 provided libs
                Prefer: -libstdc++6-gcc7 -libtsan0-gcc7 -libgomp1-gcc7 -libgcc_s1-gcc7 -libatomic1-gcc7 -libcilkrts5-gcc7 -libitm1-gcc7
                Prefer: -liblsan0-gcc7 -libmpx2-gcc7 -libubsan0-gcc7
          description: OK
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          $ref: "#/paths/~1build~1%7Bproject_name%7D/get/responses/404"
      security:
        - basic_authentication: []
      summary: Show the build configuration for the specified repository.
      tags:
        - Build
  "/build/{project_name}/{repository_name}/{architecture_name}/_builddepinfo":
    get:
      description: |
        Show the build dependencies of packages that are part of the project, for a given repository and architecture.
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
        - $ref: "#/paths/~1architectures~1%7Barchitecture_name%7D/get/parameters/0"
        - description: Name of the package. Limit results to the specified package.
          example: obs-server
          in: query
          name: package
          schema:
            type: string
        - description: |
            * `pkgnames`: Show whole package dependencies, instead of individual binaries.
            * `revpkgnames`: Show which packages depend on the provided project/package for
              the given repository/architecture, and therefore a rebuild gets triggered on change.
            * `order`: Show packages ordered by dependencies.
          in: query
          name: view
          schema:
            enum:
              - pkgnames
              - revpkgnames
              - order
            type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                properties:
                  package:
                    items:
                      properties:
                        name:
                          example: memcached
                          type: string
                          xml:
                            attribute: true
                        pkgdep:
                          items:
                            example:
                              - gzip
                              - obs-server
                            type: string
                          type: array
                        source:
                          example: memcached
                          type: string
                        subpkg:
                          items:
                            example:
                              - memcached-devel
                              - memcached-debugsource
                            type: string
                          type: array
                      type: object
                    type: array
                type: object
                xml:
                  name: builddepinfo
          description: OK
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          $ref: "#/paths/~1build~1%7Bproject_name%7D/get/responses/404"
      security:
        - basic_authentication: []
      summary: Show the build dependencies of packages that are part of the project.
      tags:
        - Build
  "/build/{project_name}/{repository_name}/{architecture_name}/_repository":
    get:
      description: |
        List all binaries (produced by all packages of the given project) for the specified repository and architecture.
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
        - $ref: "#/paths/~1architectures~1%7Barchitecture_name%7D/get/parameters/0"
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                properties:
                  binary:
                    items:
                      properties:
                        filename:
                          example: hello-2.10-3.1.x86_64.rpm
                          type: string
                          xml:
                            attribute: true
                        mtime:
                          example: "1617270174"
                          type: string
                          xml:
                            attribute: true
                        size:
                          example: "58352"
                          type: string
                          xml:
                            attribute: true
                      type: object
                    type: array
                type: object
                xml:
                  name: binarylist
          description: OK.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          $ref: "#/paths/~1build~1%7Bproject_name%7D/get/responses/404"
      security:
        - basic_authentication: []
      summary: List all binaries (produced by all packages of the given project).
      tags:
        - Build
  "/build/{project_name}/{repository_name}/{architecture_name}/{package_name}":
    get:
      description: List binaries built by the sources of the specified package.
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
        - $ref: "#/paths/~1architectures~1%7Barchitecture_name%7D/get/parameters/0"
        - description: Package name
          example: ctris
          in: path
          name: package_name
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D~1%7Barchitecture_name%7D~1_repository/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
          description: OK.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          $ref: "#/paths/~1build~1%7Bproject_name%7D/get/responses/404"
      security:
        - basic_authentication: []
      summary: List binaries built by the sources of the specified package.
      tags:
        - Build
  "/build/{project_name}/{repository_name}/{architecture_name}/{package_name}/_buildinfo":
    get:
      description: This endpoint returns information about some specific artifact
      operationId: getBuildProjectRepositoryArchPackageBuildinfo
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
        - $ref: "#/paths/~1architectures~1%7Barchitecture_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D~1%7Barchitecture_name%7D~1%7Bpackage_name%7D/get/parameters/3"
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                properties:
                  arch:
                    example: i586
                    type: string
                  bcnt:
                    example: "2"
                    type: string
                  bdep:
                    properties:
                      arch:
                        example: i586
                        type: string
                        xml:
                          attribute: true
                      name:
                        example: liblua5_4-5
                        type: string
                        xml:
                          attribute: true
                      notmeta:
                        example: "1"
                        type: string
                        xml:
                          attribute: true
                      preinstall:
                        example: "1"
                        type: string
                        xml:
                          attribute: true
                      project:
                        example: openSUSE.org:openSUSE:Tumbleweed
                        type: string
                        xml:
                          attribute: true
                      release:
                        example: "3.1"
                        type: string
                        xml:
                          attribute: true
                      repository:
                        example: dod
                        type: string
                        xml:
                          attribute: true
                      version:
                        example: 5.4.2
                        type: string
                        xml:
                          attribute: true
                    type: object
                  debuginfo:
                    example: 0
                    type: integer
                  file:
                    example: ctris.spec
                    type: string
                  package:
                    example: ctris
                    type: string
                    xml:
                      attribute: true
                  path:
                    x-project:
                      example: home:Admin
                      type: string
                      xml:
                        attribute: true
                    x-repository:
                      example: openSUSE_Tumbleweed
                      type: string
                      xml:
                        attribute: true
                  project:
                    example: home:Admin
                    type: string
                    xml:
                      attribute: true
                  release:
                    example: "3.2"
                    type: string
                  repository:
                    example: openSUSE_Tumbleweed
                    type: string
                    xml:
                      attribute: true
                  rev:
                    example: 3
                    type: integer
                  specfile:
                    example: ctris.spec
                    type: string
                  srcmd5:
                    example: 6b7c8d9cb5c5d36453c1dc8e102016b1
                    type: string
                  subpack:
                    example: ctris
                    type: string
                  verifymd5:
                    example: 6b7c8d9cb5c5d36453c1dc8e102016b1
                    type: string
                  versrel:
                    example: 0.42.1-3
                    type: string
                type: object
                xml:
                  name: buildinfo
          description: Returns the artifact building information.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: unknown_project
                summary: "Project not found: 1"
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Error: Not Found

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      security:
        - basic_authentication: []
      tags:
        - Build
  "/build/{project_name}/{repository_name}/{architecture_name}/{package_name}/_history":
    get:
      description: This endpoint returns the build history for a specific artifact
      operationId: getBuildProjectRepositoryArchPackageHistory
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
        - $ref: "#/paths/~1architectures~1%7Barchitecture_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D~1%7Barchitecture_name%7D~1%7Bpackage_name%7D/get/parameters/3"
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                properties:
                  entry:
                    properties:
                      bcnt:
                        example: "1"
                        type: string
                        xml:
                          attribute: true
                      duration:
                        example: "222"
                        type: string
                        xml:
                          attribute: true
                      rev:
                        example: "4"
                        type: string
                        xml:
                          attribute: true
                      srcmd5:
                        example: 63a6f075d3d420c6c1160a7b5dc31354
                        type: string
                        xml:
                          attribute: true
                      time:
                        example: "1617812788"
                        type: string
                        xml:
                          attribute: true
                      versrel:
                        example: 0.42.1-4
                        type: string
                        xml:
                          attribute: true
                    type: object
                type: object
                xml:
                  name: buildhistory
          description: Returns ok when the build status is ok
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: unknown_project
                summary: "Project not found: 1"
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Error: Not Found

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      security:
        - basic_authentication: []
      tags:
        - Build
  "/build/{project_name}/{repository_name}/{architecture_name}/{package_name}/_jobstatus":
    get:
      description: |
        Show the build status of a currently running build job. Shows an empty result if no build job is running.
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
        - $ref: "#/paths/~1architectures~1%7Barchitecture_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D~1%7Barchitecture_name%7D~1%7Bpackage_name%7D/get/parameters/3"
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                properties:
                  code:
                    example: building
                    type: string
                    xml:
                      attribute: true
                  hostarch:
                    example: x86_64
                    type: string
                  jobid:
                    example: 17c8d25b92da67f6ec428ea51a9b5342
                    type: string
                  lastduration:
                    example: "43"
                    type: string
                  starttime:
                    example: "1618222900"
                    type: string
                  uri:
                    example: http://172.18.0.5:38963
                    type: string
                type: object
                xml:
                  name: jobstatus
          description: |
            OK.

            XML Schema used for body validation: [jobstatus.rng](../schema/jobstatus.rng)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          $ref: "#/paths/~1build~1%7Bproject_name%7D/get/responses/404"
      security:
        - basic_authentication: []
      summary: Show the build status of a currently running build job.
      tags:
        - Build
  "/build/{project_name}/{repository_name}/{architecture_name}/{package_name}/_log":
    get:
      description: This endpoint returns the last log file for a specific build artifact
      operationId: getBuildProjectRepositoryArchPackageLog
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
        - $ref: "#/paths/~1architectures~1%7Barchitecture_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D~1%7Barchitecture_name%7D~1%7Bpackage_name%7D/get/parameters/3"
      responses:
        "200":
          content:
            text/plain:
              example: |
                [    0s] Memory limit set to 23077696KB
                [    0s] Using BUILD_ROOT=/var/cache/obs/worker/root_2
                [    0s] Using BUILD_ARCH=i586:i486:i386
                [    0s] 
                [    0s] 
                [    0s] 5d0262043f4a started "build ctris.spec" at Tue Apr  6 12:27:31 UTC 2021.
                [    0s] 
                [    0s] Building ctris for project 'home:Admin' repository 'openSUSE_Tumbleweed' arch 'i586' srcmd5 '6b7c8d9cb5c5d36453c1dc8e102016b1'
          description: |
            This endpoint returns the log file content
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "403":
          content:
            application/xml; charset=utf-8:
              example:
                code: download_binary_no_permission
                summary: No permission to download binaries from package ctris, project home:Admin
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Error: Not Acceptable

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: unknown_project
                summary: "Project not found: 1"
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Error: Not Found

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      security:
        - basic_authentication: []
      tags:
        - Build
  "/build/{project_name}/{repository_name}/{architecture_name}/{package_name}/_reason":
    get:
      description: Details about the reason of the lastly triggered build.
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
        - $ref: "#/paths/~1architectures~1%7Barchitecture_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D~1%7Barchitecture_name%7D~1%7Bpackage_name%7D/get/parameters/3"
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                properties:
                  explain:
                    example: source change
                    type: string
                  oldsource:
                    example: da9ebc6a12b6da45f9ead3fc2f924889
                    type: string
                  time:
                    example: "1617982407"
                    type: string
                type: object
                xml:
                  name: reason
          description: OK
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          $ref: "#/paths/~1build~1%7Bproject_name%7D/get/responses/404"
      security:
        - basic_authentication: []
      summary: Show the reason for the lastly triggered build.
      tags:
        - Build
  "/build/{project_name}/{repository_name}/{architecture_name}/{package_name}/_status":
    get:
      description: This endpoint returns the building status for a specific artifact
      operationId: getBuildProjectRepositoryArchPackageStatus
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
        - $ref: "#/paths/~1architectures~1%7Barchitecture_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D~1%7Barchitecture_name%7D~1%7Bpackage_name%7D/get/parameters/3"
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                properties:
                  code:
                    example: failed
                    type: string
                    xml:
                      attribute: true
                  package:
                    example: ctris
                    type: string
                    xml:
                      attribute: true
                type: object
                xml:
                  name: status
          description: Returns ok when the build status is ok
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: unknown_project
                summary: "Project not found: 1"
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Error: Not Found

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      security:
        - basic_authentication: []
      tags:
        - Build
  "/build/{project_name}/{repository_name}/{architecture_name}/{package_name}/{file_name}":
    get:
      description: |
        Given a project, repository, architecture and package, retrieve the given file's content.
      operationId: getBuildProjectRepositoryArchitecturePackageFile
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
        - $ref: "#/paths/~1architectures~1%7Barchitecture_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D~1%7Barchitecture_name%7D~1%7Bpackage_name%7D/get/parameters/3"
        - description: The file name
          example: ctris-0.42.1-4.1.x86_64.rpm
          in: path
          name: file_name
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/*:
              schema:
                format: binary
                type: string
          description: Returns the artifact's actual file contents
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: "404"
                details: 404 project 'home:Admin' has no repository '4'
                summary: project 'home:Admin' has no repository '4'
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Error: Not Found

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      security:
        - basic_authentication: []
      summary: Return a specific artifact file contents
      tags:
        - Build
    put:
      description: |
        Given a project, repository, architecture and package, update the given file's content.

        This is for Admins only.
      operationId: putBuildProjectRepositoryArchitecturePackageFile
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
        - $ref: "#/paths/~1architectures~1%7Barchitecture_name%7D/get/parameters/0"
        - description: Package name
          in: path
          name: package_name
          required: true
          schema:
            items:
              enum:
                - _repository
              type: string
            type: array
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D~1%7Barchitecture_name%7D~1%7Bpackage_name%7D~1%7Bfile_name%7D/get/parameters/4"
      requestBody:
        content:
          plain/text:
            schema:
              properties:
                file:
                  format: binary
                  type: string
              type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                code: ok
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Updates the artifact's file contents
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "403":
          content:
            application/xml; charset=utf-8:
              example:
                code: upload_binary_no_permission
                summary: No permission to upload binaries.
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            No permission to upload binaries for this project
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: "404"
                details: 404 project 'home:Admin' has no repository '4'
                summary: project 'home:Admin' has no repository '4'
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Error: Not Found

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      security:
        - basic_authentication: []
      summary: Update a specific artifact file contents
      tags:
        - Build
  "/build/{project_name}/{repository_name}/{architecture_name}/{package_name}/{file_name}?view=fileinfo":
    get:
      description: |
        Given a project, repository, architecture and package, retrieve the given artifact's details.
      operationId: getBuildProjectRepositoryArchitecturePackageFileViewFileinfo
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
        - $ref: "#/paths/~1architectures~1%7Barchitecture_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D~1%7Barchitecture_name%7D~1%7Bpackage_name%7D/get/parameters/3"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D~1%7Barchitecture_name%7D~1%7Bpackage_name%7D~1%7Bfile_name%7D/get/parameters/4"
        - in: query
          name: view
          required: true
          schema:
            items:
              enum:
                - fileinfo
                - fileinfo_ext
              type: string
            type: array
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              examples:
                fileinfo:
                  summary: view=fileinfo
                  value:
                    arch: x86_64
                    description: ctris is a colorized, small and flexible Tetris(TM)-clone for the console. Go play!
                    filename: ctris-0.42.1-4.1.x86_64.rpm
                    mtime: "1617270174"
                    name: ctris
                    provides:
                      - ctris = 0.42.1-6.2
                      - ctris(x86-64) = 0.42.1-6.2
                    release: "4.1"
                    requires:
                      - libc.so.6()(64bit)
                      - libc.so.6(GLIBC_2.2.5)(64bit)
                    size: "765725"
                    summary: Console based tetris clone
                    version: 0.42.1
                fileinfo_ext:
                  summary: view=fileinfo_ext
                  value:
                    arch: x86_64
                    description: ctris is a colorized, small and flexible Tetris(TM)-clone for the console. Go play!
                    filename: ctris-0.42.1-4.2.x86_64.rpm
                    mtime: "1617270174"
                    name: ctris
                    provides:
                      - ctris = 0.42.1-6.2
                      - ctris(x86-64) = 0.42.1-6.2
                    provides_ext:
                      dep: ctris(x86-64) = 0.42.1-6.2
                    release: "4.1"
                    requires:
                      - libc.so.6()(64bit)
                      - libc.so.6(GLIBC_2.2.5)(64bit)
                    requires_ext:
                      dep: libc.so.6()(64bit)
                      provided_by:
                        arch: x86_64
                        name: glibc
                        project: openSUSE.org:openSUSE:Tumbleweed
                        release: "4.1"
                        repository: dod
                        version: "2.33"
                    size: "765725"
                    source: ctris
                    summary: Console based tetris clone
                    version: 0.42.1
              schema:
                properties:
                  arch:
                    type: string
                  description:
                    type: string
                  filename:
                    type: string
                    xml:
                      attribute: true
                  mtime:
                    type: string
                  name:
                    type: string
                  provides:
                    items:
                      type: string
                    type: array
                  provides_ext:
                    items:
                      properties:
                        dep:
                          type: string
                          xml:
                            attribute: true
                      type: object
                    type: array
                  release:
                    type: string
                  requires:
                    items:
                      type: string
                    type: array
                  requires_ext:
                    items:
                      properties:
                        dep:
                          type: string
                          xml:
                            attribute: true
                        provided_by:
                          properties:
                            arch:
                              type: string
                              xml:
                                attribute: true
                            name:
                              type: string
                              xml:
                                attribute: true
                            project:
                              type: string
                              xml:
                                attribute: true
                            release:
                              type: string
                              xml:
                                attribute: true
                            repository:
                              type: string
                              xml:
                                attribute: true
                            version:
                              type: string
                              xml:
                                attribute: true
                          type: object
                      type: object
                    type: array
                  size:
                    type: string
                  source:
                    type: string
                  summary:
                    type: string
                  version:
                    type: string
                type: object
                xml:
                  name: fileinfo
          description: Returns details about the artifact
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: "404"
                details: 404 project 'home:Admin' has no repository '4'
                summary: project 'home:Admin' has no repository '4'
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Error: Not Found

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      security:
        - basic_authentication: []
      summary: This endpoint returns details about an specific artifact
      tags:
        - Build
  /configuration:
    get:
      description: |
        Display the configuration of this Open Build Service instance.
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                properties:
                  admin_email:
                    example: unconfigured@openbuildservice.org
                    type: string
                  allow_user_to_create_home_project:
                    example: on
                    type: string
                  anonymous:
                    example: on
                    type: string
                  change_password:
                    example: on
                    type: string
                  cleanup_empty_projects:
                    example: on
                    type: string
                  default_access_disabled:
                    example: off
                    type: string
                  description:
                    example: The openSUSE Build Service is the public instance of the Open Build Service (OBS)
                    type: string
                  disable_publish_for_branches:
                    example: on
                    type: string
                  disallow_group_creation:
                    example: off
                    type: string
                  download_on_demand:
                    example: on
                    type: string
                  enforce_project_keys:
                    example: off
                    type: string
                  gravatar:
                    example: on
                    type: string
                  hide_private_options:
                    example: off
                    type: string
                  name:
                    example: private
                    type: string
                  obs_url:
                    example: https://unconfigured.openbuildservice.org
                    type: string
                  registration:
                    example: allow
                    type: string
                  schedulers:
                    properties:
                      arch:
                        example:
                          - armv7l
                          - i586
                          - x86_64
                        items:
                          type: string
                        type: array
                    type: object
                  title:
                    example: Open Build Service
                    type: string
                  tos_url:
                    example: https://en.opensuse.org/Terms_of_site
                    type: string
                  unlisted_projects_filter:
                    example: ^home:.+
                    type: string
                  unlisted_projects_filter_description:
                    example: home projects
                    type: string
                type: object
                xml:
                  name: configuration
          description: |
            OK. The request has succeeded.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
      security:
        - basic_authentication: []
      summary: Display the configuration of this Open Build Service instance
      tags:
        - Configuration
    put:
      description: |
        Update the configuration of this Open Build Service instance.

        This is for admins only.
      requestBody:
        content:
          application/xml; charset=utf-8:
            schema:
              $ref: "#/paths/~1configuration/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
        description: Configuration definition.
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                $ref: "#/paths/~1configuration/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK. The request has succeeded.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "403":
          content:
            application/xml; charset=utf-8:
              example:
                code: no_permission_to_change
                summary: The api has a different value for default_access_disabled configured in options.yml file. Remove it there first
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Forbidden.

            In the example below, _default_access_disabled_ is one of the possible configuration options which is set in the options.yml file.
      security:
        - basic_authentication: []
      summary: Update the configuration of this Open Build Service instance
      tags:
        - Configuration
  /distributions:
    get:
      description: |
        List all distributions that can be build against.
        This will not list distributions that are available via [interconnect](https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.concepts.html#id-1.5.10.3.5).
        Check /distributions/include_remotes for this.
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                distribution:
                  - architecture:
                      - i586
                      - x86_64
                    icon:
                      - height: 8
                        url: https://static.opensuse.org/distributions/logos/opensuse.png
                        width: 8
                      - height: 16
                        url: https://static.opensuse.org/distributions/logos/opensuse.png
                        width: 16
                    id: 16626
                    link: http://www.opensuse.org/
                    name: openSUSE Tumbleweed
                    project: openSUSE:Factory
                    reponame: openSUSE_Tumbleweed
                    repository: snapshot
                    vendor: opensuse
                    version: Tumbleweed
                  - architecture: x86_64
                    icon:
                      - height: 8
                        url: https://static.opensuse.org/distributions/logos/opensuse.png
                        width: 8
                      - height: 16
                        url: https://static.opensuse.org/distributions/logos/opensuse.png
                        width: 16
                    id: 16629
                    link: http://www.opensuse.org/
                    name: openSUSE Leap 15.3
                    project: openSUSE:Leap:15.3
                    reponame: openSUSE_Leap_15.3
                    repository: standard
                    vendor: openSUSE
                    version: "15.3"
                  - architecture:
                      - i586
                      - x86_64
                    icon:
                      - height: 8
                        url: https://static.opensuse.org/distributions/logos/fedora.png
                        width: 8
                      - height: 16
                        url: https://static.opensuse.org/distributions/logos/fedora.png
                        width: 16
                    id: 16731
                    link: http://www.fedoraproject.org/
                    name: Fedora 33
                    project: Fedora:33
                    reponame: Fedora_33
                    repository: standard
                    vendor: Fedora
                    version: "33"
              schema:
                properties:
                  distribution:
                    items:
                      properties:
                        architecture:
                          example:
                            - i586
                            - x86_64
                          items:
                            type: string
                          type: array
                        icon:
                          example:
                            - height: 8
                              url: https://static.opensuse.org/distributions/logos/opensuse.png
                              width: 8
                            - height: 16
                              url: https://static.opensuse.org/distributions/logos/opensuse.png
                              width: 16
                          items:
                            properties:
                              height:
                                type: integer
                                xml:
                                  attribute: true
                              url:
                                type: string
                                xml:
                                  attribute: true
                              width:
                                type: integer
                                xml:
                                  attribute: true
                            type: object
                          type: array
                        id:
                          example: 16626
                          type: integer
                          xml:
                            attribute: true
                        link:
                          example: http://www.opensuse.org/
                          type: string
                        name:
                          example: openSUSE Tumbleweed
                          type: string
                        project:
                          example: openSUSE:Factory
                          type: string
                        reponame:
                          example: openSUSE_Tumbleweed
                          type: string
                        repository:
                          example: snapshot
                          type: string
                        vendor:
                          example: opensuse
                          type: string
                          xml:
                            attribute: true
                        version:
                          example: Tumbleweed
                          type: string
                          xml:
                            attribute: true
                      type: object
                    type: array
                type: object
                xml:
                  name: distributions
          description: |
            OK. The request has succeeded.

            XML Schema used for body validation: [distributions.rng](../schema/distributions.rng)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
      security:
        - basic_authentication: []
      summary: List all distributions.
      tags:
        - Distributions
    post:
      description: |
        Create a distribution.

        This is only for admins.
      requestBody:
        content:
          application/xml; charset=utf-8:
            schema:
              properties:
                architecture:
                  example:
                    - i586
                    - x86_64
                  items:
                    type: string
                  type: array
                icon:
                  example:
                    - height: 8
                      url: https://static.opensuse.org/distributions/logos/opensuse.png
                      width: 8
                    - height: 16
                      url: https://static.opensuse.org/distributions/logos/opensuse.png
                      width: 16
                  items:
                    properties:
                      height:
                        type: integer
                        xml:
                          attribute: true
                      url:
                        type: string
                        xml:
                          attribute: true
                      width:
                        type: integer
                        xml:
                          attribute: true
                    type: object
                  type: array
                id:
                  example: 16626
                  type: integer
                  xml:
                    attribute: true
                link:
                  example: http://www.opensuse.org/
                  type: string
                name:
                  example: openSUSE Tumbleweed
                  type: string
                project:
                  example: openSUSE:Factory
                  type: string
                reponame:
                  example: openSUSE_Tumbleweed
                  type: string
                repository:
                  example: snapshot
                  type: string
                vendor:
                  example: opensuse
                  type: string
                  xml:
                    attribute: true
                version:
                  example: Tumbleweed
                  type: string
                  xml:
                    attribute: true
              type: object
              xml:
                name: distribution
        description: Distribution definition
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                distribution:
                  - architecture:
                      - i586
                      - x86_64
                    icon:
                      - height: 8
                        url: https://static.opensuse.org/distributions/logos/opensuse.png
                        width: 8
                      - height: 16
                        url: https://static.opensuse.org/distributions/logos/opensuse.png
                        width: 16
                    id: 16626
                    link: http://www.opensuse.org/
                    name: openSUSE Tumbleweed
                    project: openSUSE:Factory
                    reponame: openSUSE_Tumbleweed
                    repository: snapshot
                    vendor: opensuse
                    version: Tumbleweed
              schema:
                $ref: "#/paths/~1distributions/post/requestBody/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK. The request has succeeded.

            XML Schema used for body validation: [distribution.rng](../schema/distribution.rng)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
      security:
        - basic_authentication: []
      summary: Create a distribution.
      tags:
        - Distributions
  /distributions/bulk_replace:
    put:
      description: |
        Bulk replace all distributions.

        This is only for admins.
      requestBody:
        content:
          application/xml; charset=utf-8:
            schema:
              $ref: "#/paths/~1distributions/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
        description: Distributions definition
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                code: ok
                summary: Ok
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK. The Request has succeeded.

            XML Schema used for body validation: [distributions.rng](../schema/distributions.rng)
        "400":
          content:
            application/xml; charset=utf-8:
              example:
                code: validation_failed
                summary: "distributions validation error: 40:0: ERROR: Expecting an element name, got nothing"
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Bad Request.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
      security:
        - basic_authentication: []
      summary: Bulk replace all distributions.
      tags:
        - Distributions
  /distributions/include_remotes:
    get:
      description: |
        List all distributions that can be build against, including the ones provided by the interconnect.
      responses:
        "200":
          $ref: "#/paths/~1distributions/get/responses/200"
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
      security:
        - basic_authentication: []
      summary: List all distributions including remote.
      tags:
        - Distributions
  "/distributions/{distribution_id}":
    delete:
      description: |
        Delete a distribution.

        This is only for admins.
      parameters:
        - $ref: "#/paths/~1distributions~1%7Bdistribution_id%7D/get/parameters/0"
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                code: ok
                summary: Ok
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK. The request has succeded.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find Distribution with 'id'=0
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not found.
      security:
        - basic_authentication: []
      summary: Delete a distribution.
      tags:
        - Distributions
    get:
      description: |
        Show a distribution that can be build against.
      parameters:
        - description: The id of the distribution
          example: 16626
          in: path
          name: distribution_id
          required: true
          schema:
            type: integer
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                $ref: "#/paths/~1distributions/post/requestBody/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK. The request has succeded.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find Distribution with 'id'=0
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not found.
      security:
        - basic_authentication: []
      summary: Show a distribution.
      tags:
        - Distributions
    put:
      description: Update the data of a distribution.
      parameters:
        - $ref: "#/paths/~1distributions~1%7Bdistribution_id%7D/get/parameters/0"
      requestBody:
        content:
          application/xml; charset=utf-8:
            schema:
              $ref: "#/paths/~1distributions/post/requestBody/content/application~1xml;%20charset=utf-8/schema"
        description: Distribution definition
      responses:
        "200":
          description: |
            OK. The Request has succeeded.

            XML Schema used for body validation: [distribution.rng](../schema/distribution.rng)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find Distribution with 'id'=0
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not found.
      security:
        - basic_authentication: []
      summary: Update a distribution.
      tags:
        - Distributions
  /group:
    get:
      description: List available groups.
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                count: "2"
                entry:
                  - name: group-admin
                  - name: group-test
              schema:
                $ref: "#/paths/~1architectures/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK. The request has succeeded.

            XML Schema used for body validation: [directory.xsd](../schema/directory.xsd)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
      security:
        - basic_authentication: []
      summary: List available groups.
      tags:
        - Groups
  "/group/{group_title}":
    delete:
      description: Delete a group.
      parameters:
        - $ref: "#/paths/~1group~1%7Bgroup_title%7D/get/parameters/0"
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find Group 'group-testd'
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Delete a group.
      tags:
        - Groups
    get:
      description: Read group data.
      parameters:
        - description: Group title
          example: group-test
          in: path
          name: group_title
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                properties:
                  maintainer:
                    items:
                      properties:
                        userid:
                          example: user-test
                          type: string
                          xml:
                            attribute: true
                      type: object
                    type: array
                  person:
                    items:
                      properties:
                        userid:
                          example: user-test
                          type: string
                          xml:
                            attribute: true
                      type: object
                    type: array
                    xml:
                      wrapped: true
                  title:
                    example: group-test
                    type: string
                type: object
                xml:
                  name: group
          description: |
            OK. The request has succeeded.

            XML Schema used for body validation: [group.rng](../schema/group.rng)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find Group 'group-testd'
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Read group data.
      tags:
        - Groups
    post:
      description: Modify group data.
      parameters:
        - $ref: "#/paths/~1group~1%7Bgroup_title%7D/get/parameters/0"
        - description: |
            Command to be executed. It takes one of these available values:
            * `add_user`: add a user to a group. `userid` query parameter must be also used.
            * `remove_user`: remove a user from a group. `userid` query parameter must be also used.
            * `set_email`: set email adress of group. `email` query parameter must be also used.
          in: query
          name: cmd
          schema:
            enum:
              - add_user
              - remove_user
              - set_email
            type: string
        - description: User login. Used with `cmd=add_user` or `cmd=remove_user`.
          in: query
          name: userid
          schema:
            type: string
        - description: Group email. Used with `cmd=set_email`.
          in: query
          name: email
          schema:
            type: string
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "400":
          content:
            application/xml; charset=utf-8:
              example:
                code: bad_request
                summary: cmd must be set to add_user or remove_user
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Bad Request.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              examples:
                group_not_found:
                  summary: Group Not Found
                  value:
                    code: not_found
                    summary: Couldn't find Group 'group-testd'
                user_not_found:
                  summary: User Not Found
                  value:
                    code: not_found
                    summary: Couldn't find User with login = user_test
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Modify group data.
      tags:
        - Groups
    put:
      description: Write group data.
      parameters:
        - $ref: "#/paths/~1group~1%7Bgroup_title%7D/get/parameters/0"
      requestBody:
        content:
          application/xml; charset=utf-8:
            schema:
              $ref: "#/paths/~1group~1%7Bgroup_title%7D/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
        description: |
          Group definition.

          XML Schema used for body validation: [group.rng](../schema/group.rng)
        required: true
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find Group 'group-testd'
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Write group data.
      tags:
        - Groups
  /issue_trackers:
    get:
      description: Get the list of issue trackers.
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                items:
                  properties:
                    description:
                      example: openSUSE Feature Database
                      type: string
                    enable-fetch:
                      example: "false"
                      type: string
                    kind:
                      example: fate
                      type: string
                    label:
                      example: fate#@@@
                      type: string
                    name:
                      example: fate
                      type: string
                    regex:
                      example: (?:fate|Fate|FATE)\s*#\s*(\d+)
                      type: string
                    show-url:
                      example: https://features.opensuse.org/@@@
                      type: string
                    url:
                      example: https://features.opensuse.org/
                      type: string
                  type: object
                  xml:
                    name: issue-tracker
                type: array
                xml:
                  name: issue-trackers
                  wrapped: true
          description: |
            List of issue trackers.

            XML Schema used for body validation: [issue_trackers.rng](../schema/issue_trackers.rng)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
      security:
        - basic_authentication: []
      summary: Get the list of issue trackers.
      tags:
        - Issue Trackers
    post:
      description: Create an issue tracker.
      requestBody:
        content:
          application/xml; charset=utf-8:
            schema:
              $ref: "#/paths/~1issue_trackers/get/responses/200/content/application~1xml;%20charset=utf-8/schema/items"
        description: |
          Issue tracker definition.

          XML Schema used for body validation: [issue_tracker.rng](../schema/issue_tracker.rng)
        required: true
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "400":
          content:
            application/xml; charset=utf-8:
              examples:
                empty_body:
                  summary: Empty Body
                  value:
                    code: validation_failed
                    summary: Document is empty, not allowed for issue_tracker
                wrong_xml_element:
                  summary: Wrong XML Element
                  value:
                    code: validation_failed
                    summary: "issue_tracker validation error: 1:0: ERROR: Expecting element issue-tracker, got foo"
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Validation failed.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
      security:
        - basic_authentication: []
      summary: Create an issue tracker.
      tags:
        - Issue Trackers
  "/issue_trackers/{issue_tracker_name}":
    delete:
      description: Delete an issue tracker.
      parameters:
        - $ref: "#/paths/~1issue_trackers~1%7Bissue_tracker_name%7D/get/parameters/0"
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Unable to find issue tracker 'foo'
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Not Found.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      security:
        - basic_authentication: []
      summary: Delete an issue tracker.
      tags:
        - Issue Trackers
    get:
      description: Show an issue tracker.
      parameters:
        - description: Issue tracker name
          example: fate
          in: path
          name: issue_tracker_name
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                $ref: "#/paths/~1issue_trackers/get/responses/200/content/application~1xml;%20charset=utf-8/schema/items"
          description: |
            Issue tracker definition.

            XML Schema used for body validation: [issue_tracker.rng](../schema/issue_tracker.rng)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Unable to find issue tracker 'foo'
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Not Found.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      security:
        - basic_authentication: []
      summary: Show an issue tracker.
      tags:
        - Issue Trackers
    put:
      description: Update the issue tracker given as path parameter. If it is not found, create it.
      parameters:
        - $ref: "#/paths/~1issue_trackers~1%7Bissue_tracker_name%7D/get/parameters/0"
      requestBody:
        content:
          application/xml; charset=utf-8:
            schema:
              $ref: "#/paths/~1issue_trackers/get/responses/200/content/application~1xml;%20charset=utf-8/schema/items"
        description: |
          Issue tracker definition.

          XML Schema used for body validation: [issue_tracker.rng](../schema/issue_tracker.rng)
        required: true
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "400":
          content:
            application/xml; charset=utf-8:
              examples:
                empty_body:
                  summary: Empty Body
                  value:
                    code: validation_failed
                    summary: Document is empty, not allowed for issue_tracker
                wrong_xml_element:
                  summary: Wrong XML Element
                  value:
                    code: validation_failed
                    summary: "issue_tracker validation error: 1:0: ERROR: Expecting element issue-tracker, got foo"
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Validation failed.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
      security:
        - basic_authentication: []
      summary: Update or create an issue tracker.
      tags:
        - Issue Trackers
  "/issue_trackers/{issue_tracker_name}/issues/{issue_name}":
    get:
      description: Show an issue of an issue tracker.
      parameters:
        - $ref: "#/paths/~1issue_trackers~1%7Bissue_tracker_name%7D/get/parameters/0"
        - description: Issue name.
          example: 12345
          in: path
          name: issue_name
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                properties:
                  created_at:
                    example: 2021-01-18 19:17:51 UTC
                    type: string
                  label:
                    example: fate#12345
                    type: string
                  name:
                    example: 12345
                    type: string
                  tracker:
                    example: fate
                    type: string
                  updated_at:
                    example: 2021-01-18 19:17:51 UTC
                    type: string
                  url:
                    example: https://features.opensuse.org/12345
                    type: string
                type: object
                xml:
                  name: issue
          description: |
            Issue definition.

            XML Schema used for body validation: [issue.rng](../schema/issue.rng)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: issue_tracker_not_found
                summary: "Error: Issue Tracker 'foo' not found."
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Not Found.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      security:
        - basic_authentication: []
      summary: Show an issue of an issue tracker.
      tags:
        - Issue Trackers
  /person:
    get:
      description: |
        List all people.
      parameters:
        - description: A prefix to filter the people to look for
          example: Adm
          in: query
          name: prefix
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                count: "9"
                entry:
                  - name: Admin
                  - name: _nobody_
                  - name: Iggy
                  - name: user_1
                  - name: repo-checker
                  - name: reviewhero
                  - name: user_2
                  - name: user_3
                  - name: Requestor
              schema:
                $ref: "#/paths/~1architectures/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK. The request has succeeded.
            XML Schema used for body validation: [directory.xsd](../schema/directory.xsd)
      security:
        - basic_authentication: []
      summary: List all people.
      tags:
        - Person
    post:
      description: |
        Allows executing command on the person endpoint.

        As of now, the only command allowed is 'register'.
      parameters:
        - description: The command to execute
          example: register
          in: query
          name: cmd
          required: true
          schema:
            enum:
              - register
            type: string
      requestBody:
        content:
          application/xml:
            schema:
              properties:
                email:
                  example: janedoe@example.com
                  type: string
                login:
                  example: jane
                  type: string
                note:
                  example: Jane works in the Engineering team
                  type: string
                password:
                  example: superpassword123
                  type: string
                realname:
                  example: Jane Doe
                  type: string
                state:
                  example: confirmed
                  type: string
              type: object
              xml:
                name: unregisteredperson
        description: The data for the person to register.
        required: true
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "400":
          content:
            application/xml; charset=utf-8:
              examples:
                Bad Request:
                  value:
                    code: err_register_save
                    summary: "Could not save the registration, details: Login is the name of an already existing user and Password can't be blank."
                Unknown Command:
                  value:
                    code: unknown_command
                    summary: Allowed command is 'register'.
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Bad request.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      summary: Executes a command on the person endpoint.
      tags:
        - Person
  /person/register:
    post:
      requestBody:
        content:
          application/xml:
            schema:
              $ref: "#/paths/~1person/post/requestBody/content/application~1xml/schema"
        description: Data for the person to register.
        required: true
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "403":
          content:
            application/xml; charset=utf-8:
              example:
                code: permission_denied
                summary: |
                  User accounts can not be registered via OBS when in LDAP mode. Please refer
                  to your LDAP server to create new users.
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Forbidden
      summary: Registers a new person
      tags:
        - Person
  "/person/{login}":
    get:
      parameters:
        - description: Person login.
          example: Admin
          in: path
          name: login
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                email: root@localhost
                globalrole: Admin
                ignore_auth_services: false
                login: Admin
                realname: OBS Instance Superuser
                state: confirmed
                watchlist:
                  - project:
                      name: home:Admin
              schema:
                properties:
                  email:
                    example: unconfigured@openbuildservice.org
                    type: string
                  globalrole:
                    type: string
                  ignore_auth_services:
                    type: boolean
                  login:
                    example: user_1
                    type: string
                  realname:
                    example: User1
                    type: string
                  state:
                    example: confirmed
                    type: string
                  watchlist:
                    items:
                      properties:
                        project:
                          properties:
                            name:
                              type: string
                              xml:
                                attribute: true
                          type: object
                      type: object
                    type: array
                    xml:
                      name: watchlist
                type: object
                xml:
                  name: person
          description: |
            OK. The request has succeeded.
            XML Schema used for body validation: [user.rng](../schema/user.rng)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find User with login = <login>
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Not found.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      security:
        - basic_authentication: []
      summary: Get details about a person
      tags:
        - Person
    post:
      parameters:
        - $ref: "#/paths/~1person~1%7Blogin%7D/get/parameters/0"
        - description: The command to execute against the provided person.
          example: change_password
          in: query
          name: cmd
          required: true
          schema:
            enum:
              - change_password
              - lock
              - delete
            type: string
      requestBody:
        content:
          text/plain:
            schema:
              type: string
        description: The password in plain text when the cmd param is 'change_password'.
        required: false
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK. The request has succeeded.
            XML Schema used for body validation: [api_response.xsd](../schema/api_response.xsd)
        "400":
          content:
            application/xml; charset=utf-8:
              examples:
                Bad Request:
                  value:
                    code: err_register_save
                    summary: "Could not save the registration, details: Login is the name of an already existing user and Password can't be blank."
                Unknown Command:
                  value:
                    code: unknown_command
                    summary: Allowed commands are '<some command>'.
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Bad request.
            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "403":
          content:
            application/xml; charset=utf-8:
              examples:
                update_user_not_authorized:
                  value:
                    code: update_user_not_authorized
                    summary: You are not authorized to update this User.
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Forbidden.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
        "404":
          $ref: "#/paths/~1person~1%7Blogin%7D/get/responses/404"
      security:
        - basic_authentication: []
      summary: Perform changes on a registered person
      tags:
        - Person
    put:
      parameters:
        - $ref: "#/paths/~1person~1%7Blogin%7D/get/parameters/0"
      requestBody:
        content:
          application/xml:
            schema:
              $ref: "#/paths/~1person/post/requestBody/content/application~1xml/schema"
        description: The new data for the person referred in the login parameter.
        required: true
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "400":
          content:
            application/xml; charset=utf-8:
              examples:
                Subaccount chaining:
                  value:
                    code: subaccount_chaining
                    summary: A subaccount can not be assigned to subaccount <login>
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Bad request.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "403":
          content:
            application/xml; charset=utf-8:
              examples:
                Change user info not permitted:
                  value:
                    code: change_userinfo_no_permission
                    summary: no permission to change userinfo for user <login>
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Unauthorized.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: password_empty
                summary: Requested non-existing user
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Not found.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      security:
        - basic_authentication: []
      summary: Update person
      tags:
        - Person
  "/person/{login}/group":
    get:
      description: List the groups the person belongs to.
      parameters:
        - $ref: "#/paths/~1person~1%7Blogin%7D/get/parameters/0"
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                count: "2"
                entry:
                  - name: factory-maintainers
                  - name: obs-developers
              schema:
                $ref: "#/paths/~1architectures/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK. The request has succeeded.
            XML Schema used for body validation: [directory.xsd](../schema/directory.xsd)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find User with login = fake
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Not Found.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      security:
        - basic_authentication: []
      summary: List the groups of a person
      tags:
        - Person
  "/person/{login}/token":
    get:
      description: List the authentication tokens of a person.
      parameters:
        - $ref: "#/paths/~1person~1%7Blogin%7D/get/parameters/0"
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                count: 2
                entry:
                  - id: 3
                    kind: rss
                    string: FK49K39DKK
                  - id: 25
                    kind: release
                    package: ghcz
                    project: devel:languages:haskell
                    string: 4T04JGI691
              schema:
                properties:
                  count:
                    type: integer
                    xml:
                      attribute: true
                  entry:
                    items:
                      properties:
                        id:
                          type: string
                          xml:
                            attribute: true
                        kind:
                          type: string
                          xml:
                            attribute: true
                        package:
                          type: string
                          xml:
                            attribute: true
                        project:
                          type: string
                          xml:
                            attribute: true
                        string:
                          type: string
                          xml:
                            attribute: true
                      type: object
                    type: array
                type: object
                xml:
                  name: directory
          description: |
            OK. The request has succeeded.

            XML Schema used for body validation: [tokenlist.rng](../schema/tokenlist.rng)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "403":
          content:
            application/xml; charset=utf-8:
              example:
                code: view_user_not_authorized
                summary: You are not authorized to view this User.
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Forbidden.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      security:
        - basic_authentication: []
      summary: List the authentication tokens of a person.
      tags:
        - Person
    post:
      description: |
        Create a new authentication token for a person.

        The token may be limited to a specific package. In this case the query parameters
        `project` and `package` should be provided.

        With an empty request body, a token of the default kind 'runservice' is created.
      parameters:
        - $ref: "#/paths/~1person~1%7Blogin%7D/get/parameters/0"
        - description: |
            Project name. Should be provided, together with the package query parameter,
            to limit the token to a specific package.
          example: home:hans
          in: query
          name: project
          schema:
            type: string
        - description: |
            Package name. Should be provided, together with the project query parameter,
            to limit the token to a specific package.
          example: gchz
          in: query
          name: package
          schema:
            type: string
        - description: |
            Operation indicates the kind of token that is going to be created.

            When operation is not specified, 'runservice' is the default value.
          example: runservice
          in: query
          name: operation
          schema:
            enum:
              - runservice
              - rebuild
              - release
            type: string
        - description: |
            **(Beta/Unstable)**

            SCM token used in OBS workflows to report back the workflow status, when the operation is workflow.

            It's normally possible to generate SCM tokens directly on the SCM's website like GitHub or GitLab.
          example: ghp_fake_token_123
          in: query
          name: scm_token
          schema:
            type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                code: ok
                data:
                  - i6iF4M5cn
                  - 5
                summary: Ok
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK. The request has succeeded.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)

            **NOTE:** This is an example of a valid response. It should include the attribute 'name'
            in every 'data' tag, which is missing in the example using the schema.
            ```
              <status code="ok">
                <summary>Ok</summary>
                <data name="token">i6iF4M5cn</data>
                <data name="id">5</data>
              </status>
            ```
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "403":
          content:
            application/xml; charset=utf-8:
              example:
                code: update_user_not_authorized
                summary: You are not authorized to update this User.
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Forbidden.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      security:
        - basic_authentication: []
      summary: Create a new authentication token for a person.
      tags:
        - Person
  "/person/{login}/token/{id}":
    delete:
      description: Delete a token of the specified person.
      parameters:
        - $ref: "#/paths/~1person~1%7Blogin%7D/get/parameters/0"
        - description: Id of the token to be removed.
          example: 3
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                code: ok
                summary: Ok
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK. The request has succeeded.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "403":
          content:
            application/xml; charset=utf-8:
              example:
                code: update_user_not_authorized
                summary: You are not authorized to update this User.
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Forbidden.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find Token with 'id'=33 [WHERE `tokens`.`user_id` = ?]
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Not Found.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
      summary: Delete a token of a person.
      tags:
        - Person
  /published:
    get:
      description: |
        Get a list of all the projects, all of them are considered published.
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                entry:
                  - name: OBS:Server:Unstable
                  - name: devel:languages:ruby
                  - name: openSUSE:Maintenance:9810
                  - name: zypp:plugins
              schema:
                $ref: "#/paths/~1architectures/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
          description: OK. The request has succeeded.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
      security:
        - basic_authentication: []
      summary: List all the published projects.
      tags:
        - Published Binaries
  "/published/{project_name}":
    get:
      description: |
        Get a list of the repositories of the project that already have published binaries.
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                entry:
                  - name: SLE_15_SP3
                  - name: containers
                  - name: images
                  - name: openSUSE_15.2
              schema:
                $ref: "#/paths/~1architectures/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
          description: OK. The request has succeeded.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "403":
          content:
            application/xml; charset=utf-8:
              example:
                code: download_binary_no_permission
                summary: No permission for binaries from project home:Admin
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: |
            Forbidden.

            XML Schema used for body validation: [status.xsd](../schema/status.xsd)
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find Project
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: List the repositories of a project with published binaries
      tags:
        - Published Binaries
  "/published/{project_name}/{repository_name}":
    get:
      description: |
        Get a list of architectures' directories and other files (.repo, .ymp, etc.) present at the level project/repository of the directory tree where the published binaries are stored.
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                entry:
                  - name: OBS:Server:Unstable.repo
                  - name: OBS_Server.ymp
                  - name: aarch64
                  - name: x86_64
              schema:
                $ref: "#/paths/~1architectures/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
          description: OK. The request has succeeded.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "403":
          $ref: "#/paths/~1published~1%7Bproject_name%7D/get/responses/403"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find Project
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: List the content of the directory tree where the binaries are published at the level project/repository.
      tags:
        - Published Binaries
  "/published/{project_name}/{repository_name}/{architecture_name}":
    get:
      description: |
        Get a list of binaries and other files present at the level project/repository/architecture of the directory tree as a result of successful building and publishing processes.
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
        - $ref: "#/paths/~1architectures~1%7Barchitecture_name%7D/get/parameters/0"
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                entry:
                  - name: apache2-mod_auth_memcookie-1.1.1-lp152.2.1.x86_64.rpm
                  - name: obs-api-testsuite-rspec-2.11~alpha.20200618T200341.d42d8310aa-lp152.10515.1.x86_64.rpm
              schema:
                $ref: "#/paths/~1architectures/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
          description: OK. The request has succeeded.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "403":
          $ref: "#/paths/~1published~1%7Bproject_name%7D/get/responses/403"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find Project
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: List the content of the directory tree where the binaries are published at the level project/repository/architecture.
      tags:
        - Published Binaries
  "/published/{project_name}/{repository_name}/{architecture_name}/{binary_filename}":
    get:
      description: |
        Allow to download the binary file that was published and stored under the directory given by project/repository/architecture/.
        Can response with Media Types like application/x-rpm, text/xml, etc.
        NOTE: Use this only if you absolutely have to, as it doesn't use the redirector.
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
        - $ref: "#/paths/~1architectures~1%7Barchitecture_name%7D/get/parameters/0"
        - description: Binary filename
          example: ctris-0.42.1-8.1.x86_64.rpm
          in: path
          name: binary_filename
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/*:
              schema:
                format: binary
                type: string
            text/xml:
              schema:
                format: binary
                type: string
          description: OK
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "403":
          $ref: "#/paths/~1published~1%7Bproject_name%7D/get/responses/403"
        "404":
          content:
            application/xml; charset=utf-8:
              examples:
                NoSuchFile:
                  value:
                    code: 404
                    details: 404 no such file
                    summary: no such file
                NotFound:
                  value:
                    code: not_found
                    summary: Couldn't find Project
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Return the binary file itself.
      tags:
        - Published Binaries
  "/published/{project_name}/{repository_name}/{architecture_name}/{binary_filename}?view=ymp":
    get:
      description: |
        Generate a ymp pattern, which contains the list of packages needed for intalling certain software without having to create dependencies between them.
        Read more about patterns [in this tutorial](https://en.opensuse.org/openSUSE:Build_Service_Tutorial#Create_Patterns).
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
        - $ref: "#/paths/~1architectures~1%7Barchitecture_name%7D/get/parameters/0"
        - $ref: "#/paths/~1published~1%7Bproject_name%7D~1%7Brepository_name%7D~1%7Barchitecture_name%7D~1%7Bbinary_filename%7D/get/parameters/3"
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                group:
                  distversion: openSUSEsLeap 15.2
                  repositories:
                    repository:
                      - description: These are the developer versions of the tools for the Open Build Service project
                        name: OBS:Server:Unstable
                        recommended: true
                        summary: Developer versions of the Open Build Service Server
                        url: https://download.opensuse.org/repositories/OBS:/Server:/Unstable/openSUSE_15.2
                      - description: openSUSE Leap borrows packages from SLE for the base system
                        name: openSUSE:Leap:15.2
                        recommended: false
                        summary: openSUSE Leap 15.2
                        url: http://download.opensuse.org/distribution/leap/15.2/repo/oss
                  software:
                    item:
                      description: This package provides debug information for package virt-v2v
                      name: virt-v2v-debuginfo
                      summary: Debug information for package virt-v2v
                xmlns: http://opensuse.org/Standards/One_Click_Install
                xmlns:os: http://opensuse.org/Standards/One_Click_Install
              schema:
                properties:
                  group:
                    properties:
                      distversion:
                        type: string
                        xml:
                          attribute: true
                      repositories:
                        properties:
                          repository:
                            items:
                              properties:
                                description:
                                  type: string
                                name:
                                  type: string
                                recommended:
                                  type: string
                                  xml:
                                    attribute: true
                                summary:
                                  type: string
                                url:
                                  type: string
                              type: object
                            type: array
                        type: object
                      software:
                        properties:
                          item:
                            properties:
                              description:
                                type: string
                              name:
                                type: string
                              summary:
                                type: string
                            type: object
                        type: object
                    type: object
                  xmlns:
                    type: string
                    xml:
                      attribute: true
                      example: http://opensuse.org/Standards/One_Click_Install
                  xmlns:os:
                    type: string
                    xml:
                      attribute: true
                      example: http://opensuse.org/Standards/One_Click_Install
                type: object
                xml:
                  name: metapackage
          description: OK.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "403":
          $ref: "#/paths/~1published~1%7Bproject_name%7D/get/responses/403"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find Project
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Generate a ymp pattern that includes the needed repositories to install the given binary.
      tags:
        - Published Binaries
  "/published/{project_name}/{repository_name}?view=status":
    get:
      description: |
        Get information about the build process (build id, start time, etc.) for the pair project and repository.
      parameters:
        - $ref: "#/paths/~1build~1%7Bproject_name%7D/get/parameters/0"
        - $ref: "#/paths/~1build~1%7Bproject_name%7D~1%7Brepository_name%7D/get/parameters/1"
        - description: Set this parameter to status in order to get details about the last publication.
          example: status
          in: query
          name: view
          schema:
            enum:
              - status
            type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                properties:
                  buildid:
                    example: 1569496563
                    type: integer
                  code:
                    example: succeeded
                    type: string
                    xml:
                      attribute: true
                  endtime:
                    example: 1617574611
                    type: integer
                  starttime:
                    example: 1617574611
                    type: integer
                type: object
                xml:
                  name: status
          description: OK. The request has succeeded.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "403":
          $ref: "#/paths/~1published~1%7Bproject_name%7D/get/responses/403"
        "404":
          content:
            application/xml; charset=utf-8:
              examples:
                project:
                  summary: Couldn't find Project
                  x-code: not_found
                unknown:
                  value:
                    code: unknown
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Present information about the last publication of the pair project and repository.
      tags:
        - Published Binaries
  /request:
    get:
      description: Get a simple directory listing of all requests
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                entry:
                  - name: 122
                  - name: 123
              schema:
                $ref: "#/paths/~1architectures/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK

            XML Schema used for body validation: [directory.xsd](../schema/directory.xsd)
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
      security:
        - basic_authentication: []
      summary: Get a simple directory listing of all requests
      tags:
        - Request
    post:
      description: Create a request
      parameters:
        - description: This endpoint will refuse the creation of a new request if this parameter is not set.
          in: query
          name: cmd
          required: true
          schema:
            enum:
              - create
            type: string
        - description: Ask the server to add revisions of the current sources to the request.
          in: query
          name: addrevision
          schema:
            enum:
              - 1
            type: string
        - description: Enforce a new package instance in a project which has OBS:DelegateRequestTarget set
          in: query
          name: ignore_delegate
          schema:
            enum:
              - 1
            type: string
        - description: Skip the build state check
          in: query
          name: ignore_build_state
          schema:
            enum:
              - 1
            type: string
      requestBody:
        content:
          application/xml; charset=utf-8:
            schema:
              properties:
                action:
                  properties:
                    options:
                      properties:
                        sourceupdate:
                          example: cleanup
                          type: string
                      type: object
                    source:
                      properties:
                        package:
                          example: obs-server
                          type: string
                          xml:
                            attribute: true
                        project:
                          example: home:foo-user
                          type: string
                          xml:
                            attribute: true
                        rev:
                          example: 521
                          type: integer
                          xml:
                            attribute: true
                      type: object
                    target:
                      properties:
                        package:
                          example: obs-server
                          type: string
                          xml:
                            attribute: true
                        project:
                          example: OBS:Unstable
                          type: string
                          xml:
                            attribute: true
                      type: object
                    type:
                      example: submit
                      type: string
                      xml:
                        attribute: true
                  type: object
                creator:
                  example: foo-user
                  type: string
                  xml:
                    attribute: true
                description:
                  example: A little version update
                  type: string
                history:
                  items:
                    properties:
                      comment:
                        example: Please review sources
                        type: string
                      description:
                        example: Request created
                        type: string
                      when:
                        example: 2021-01-15T13:39:43
                        type: string
                        xml:
                          attribute: true
                      who:
                        example: foo
                        type: string
                        xml:
                          attribute: true
                    type: object
                  type: array
                id:
                  example: 42
                  type: integer
                  xml:
                    attribute: true
                review:
                  items:
                    anyOf:
                      - properties:
                          by_user:
                            example: obs-maintainer
                            type: string
                            xml:
                              attribute: true
                          state:
                            example: accepted
                            type: string
                            xml:
                              attribute: true
                          when:
                            example: 2021-01-15T15:49:32
                            type: string
                            xml:
                              attribute: true
                          who:
                            example: obs-maintainer
                            type: string
                            xml:
                              attribute: true
                        type: object
                      - properties:
                          by_group:
                            example: obs-group
                            type: string
                            xml:
                              attribute: true
                          state:
                            example: accepted
                            type: string
                            xml:
                              attribute: true
                          when:
                            example: 2021-01-15T15:49:32
                            type: string
                            xml:
                              attribute: true
                          who:
                            example: obs-maintainer
                            type: string
                            xml:
                              attribute: true
                        type: object
                      - properties:
                          by_project:
                            example: OBS:Unstable
                            type: string
                            xml:
                              attribute: true
                          state:
                            example: accepted
                            type: string
                            xml:
                              attribute: true
                          when:
                            example: 2021-01-15T15:49:32
                            type: string
                            xml:
                              attribute: true
                          who:
                            example: obs-maintainer
                            type: string
                            xml:
                              attribute: true
                        type: object
                      - properties:
                          by_package:
                            example: obs-server
                            type: string
                            xml:
                              attribute: true
                          state:
                            example: accepted
                            type: string
                            xml:
                              attribute: true
                          when:
                            example: 2021-01-15T15:49:32
                            type: string
                            xml:
                              attribute: true
                          who:
                            example: obs-maintainer
                            type: string
                            xml:
                              attribute: true
                        type: object
                  type: array
                state:
                  properties:
                    comment:
                      example: allright
                      type: string
                    name:
                      example: accepted
                      type: string
                      xml:
                        attribute: true
                    when:
                      example: 2021-01-15T13:39:43
                      type: string
                      xml:
                        attribute: true
                    who:
                      example: bar-user
                      type: string
                      xml:
                        attribute: true
                  type: object
              type: object
              xml:
                name: request
        description: |
          Request XML

          **NOTE:** You cannot pass the request id in the xml. You can pass the history in the xml, but it will be simply ignored.
        required: true
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                $ref: "#/paths/~1request/post/requestBody/content/application~1xml;%20charset=utf-8/schema"
          description: |
            OK.

            XML Schema used for body validation: [request.rng](../schema/request.rng)
        "400":
          content:
            application/xml; charset=utf-8:
              example:
                code: expand_error
                summary: The source of package test-project/test-package for revision 2 is broken
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Bad Request
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "403":
          content:
            application/xml; charset=utf-8:
              example:
                code: create_bs_request_not_authorized
                summary: You are not authorized to create this Bs request.
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Forbidden
      security:
        - basic_authentication: []
      summary: Create a request
      tags:
        - Request
  "/request/{id}":
    delete:
      description: Delete a given request.
      parameters:
        - $ref: "#/paths/~1request~1%7Bid%7D/get/parameters/0"
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find request with id '10'
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found
      security:
        - basic_authentication: []
      summary: Delete a given request.
      tags:
        - Request
    get:
      description: Show details about a specified request.
      parameters:
        - description: Id of the choosen request.
          example: 743
          in: path
          name: id
          required: true
          schema:
            type: integer
        - $ref: "#/paths/~1request?view=collection/get/parameters/6"
        - $ref: "#/paths/~1request?view=collection/get/parameters/7"
      responses:
        "200":
          $ref: "#/paths/~1request/post/responses/200"
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find request with id '5'
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found
      security:
        - basic_authentication: []
      summary: Show details about a specified request.
      tags:
        - Request
    post:
      description: Apply certain actions on a specified request.
      parameters:
        - $ref: "#/paths/~1request~1%7Bid%7D/get/parameters/0"
        - description: |
            - `addreview`:
              Add a review to a request. **NOTE:** You need to specify who has to address
              the review by providing an additional paramter. Possible options are:
              * by_user
              * by_group
              * by_project

            - `assignreview`:
              Accept a review for a given group and assign a new review to a specific user.
              **NOTE:** You need to pass the group name in the `by_group` parameter
              and the new reviewer in the `reviewer` parameter.

            - `changestate`: Modify the state of a given request.
              **NOTE:** You need to pass the new state throug the `newstate` parameter. Changing
              from one state to another is in certain cases not allowed. You can still force
              the operation by using the `force=1` parameter.

            - `changereviewstate`:
              Change the state of a review inside a given request.

            - `setpriority`:
              Change the priority of a given request. You have to pass the choosen priority through
              the `priority` parameter. Possible values are:
              * low
              * moderate
              * important
              * critical

            - `setincident`: Change the target incident for maintenance_incident actions
              **NOTE:** You need to provide the incident number through the `incident`
              parameter.

            - `setacceptat`: Set or modify the accept_at time. Either specified by the `time`
              parameter or by default set to now.

            - `approve`: Pre-approve a request in the review state. It will turn into state `accepted`
              after the last review.

            - `cancelapproval`: Reset the approval of a request
          examples:
            addreview:
              value: cmd=addreview&by_group=heroes
            approve:
              value: cmd=approve
            assignreview:
              value: cmd=assignreview&by_group=heroes&reviewer=foo
            cancelapproval:
              value: cmd=cancelapproval
            changereviewstate:
              value: cmd=changereviewstate&by_group=heroes&newstate=new&comment=reopened
            changestate:
              value: cmd=changestate&newstate=accepted
            setacceptat:
              value: cmd=setacceptat&time='2020-12-01%2000:00:00%20UTC'
            setincident:
              value: cmd=setincident&incident=12
            setpriority:
              value: cmd=setpriority&priority=low&comment=notsoimportant
          explode: false
          in: query
          name: cmd
          schema:
            type: string
          style: form
        - description: Define the new state
          in: query
          name: newstate
          schema:
            type: string
        - description: Define the new priority
          in: query
          name: priority
          schema:
            type: string
        - description: Specify the user of a new review
          in: query
          name: by_user
          schema:
            type: string
        - description: Specify the group of the new review
          in: query
          name: by_group
          schema:
            type: string
        - description: Specify the project of the new review
          in: query
          name: by_project
          schema:
            type: string
        - description: Specify the package of the new review
          in: query
          name: by_package
          schema:
            type: string
        - description: Specify the incident number for `setincident`
          in: query
          name: incident
          schema:
            type: string
        - description: Specify the time for `setacceptat`
          in: query
          name: time
          schema:
            type: string
        - description: Add a comment to one of the actions
          in: query
          name: comment
          schema:
            type: string
      responses:
        "200":
          $ref: "#/paths/~1attribute~1%7Bnamespace%7D/delete/responses/200"
        "400":
          content:
            application/xml; charset=utf-8:
              example:
                code: no_maintenance_release_target
                summary: |
                  Maintenance incident request contains release target project test_maintenance_project with
                  invalid project kind "standard" (should be "maintenance_release") for package package01
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Bad Request
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              examples:
                Not Found:
                  value:
                    code: not_found
                    summary: Couldn't find request with id '120'
                Request Not Modifiable:
                  value:
                    code: request_not_modifiable
                    summary: request is not in review state
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found
      security:
        - basic_authentication: []
      summary: Apply certain actions on a specified request.
      tags:
        - Request
    put:
      description: |
        Modify a given request.

        **NOTE:** Certain parts of a request can only be changed by admins.
      parameters:
        - $ref: "#/paths/~1request~1%7Bid%7D/get/parameters/0"
      requestBody:
        content:
          application/xml; charset=utf-8:
            schema:
              $ref: "#/paths/~1request/post/requestBody/content/application~1xml;%20charset=utf-8/schema"
        description: |
          Request XML

          **NOTE:** You cannot pass the request id in the xml. You can pass the history in the xml, but it will be simply ignored.

          XML Schema used for body validation: [request.rng](../schema/request.rng)
        required: true
      responses:
        "200":
          $ref: "#/paths/~1request/post/responses/200"
        "400":
          content:
            application/xml; charset=utf-8:
              example:
                code: request_save_error
                summary: Auto accept time is in the past
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Bad Request
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find request with id '10'
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found
      security:
        - basic_authentication: []
      summary: Modify a given request.
      tags:
        - Request
  "/request/{id}?cmd=diff":
    post:
      description: |
        Get the diff for all packages affected by the request.
      parameters:
        - $ref: "#/paths/~1request~1%7Bid%7D/get/parameters/0"
        - description: |
            Diff relative to a given superseded request. State the id of the corresponding superseded request.
          example: 10401
          in: query
          name: diff_to_superseded
          schema:
            type: string
        - description: Set this parameter to xml in order to receive a structured diff instead of plain text.
          in: query
          name: view
          schema:
            enum:
              - xml
            type: string
        - description: Include parsed issues
          in: query
          name: withissues
          schema:
            enum:
              - true
              - 1
            type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                properties:
                  action:
                    properties:
                      options:
                        properties:
                          sourceupdate:
                            example: cleanup
                            type: string
                        type: object
                      source:
                        properties:
                          package:
                            example: ruby
                            type: string
                            xml:
                              attribute: true
                          project:
                            example: home:Iggy:branches:home:Admin
                            type: string
                            xml:
                              attribute: true
                          rev:
                            example: 3
                            type: string
                            xml:
                              attribute: true
                        type: object
                      sourcediff:
                        properties:
                          files:
                            items:
                              properties:
                                file:
                                  properties:
                                    diff:
                                      example: |
                                        spec files:
                                        -----------
                                        --- test.spec
                                        +++ test.spec
                                        @@ -0,0 +1 @@
                                        +# NEW COMMENT
                                        \ No newline at end of file
                                      type: string
                                    new:
                                      $ref: "#/paths/~1request~1%7Bid%7D?cmd=diff/post/responses/200/content/application~1xml;%20charset=utf-8/schema/properties/action/properties/sourcediff/properties/files/items/properties/file/properties/old"
                                    old:
                                      properties:
                                        md5:
                                          example: d4f573d2bf9a0e306f87dad7eee0cf56
                                          type: string
                                          xml:
                                            attribute: true
                                        name:
                                          example: ruby.spec
                                          type: string
                                          xml:
                                            attribute: true
                                        size:
                                          example: 70
                                          type: string
                                          xml:
                                            attribute: true
                                      type: object
                                    state:
                                      example: changed
                                      type: string
                                      xml:
                                        attribute: true
                                  type: object
                              type: object
                            type: array
                          issues:
                            items:
                              properties:
                                issue:
                                  properties:
                                    label:
                                      example: boo#944302
                                      type: string
                                      xml:
                                        attribute: true
                                    name:
                                      example: 922894
                                      type: string
                                      xml:
                                        attribute: true
                                    state:
                                      example: added
                                      type: string
                                      xml:
                                        attribute: true
                                    tracker:
                                      example: bnc
                                      type: string
                                      xml:
                                        attribute: true
                                    url:
                                      example: https://bugzilla.opensuse.org/show_bug.cgi?id=944302
                                      type: string
                                      xml:
                                        attribute: true
                                  type: object
                              type: object
                            type: array
                          key:
                            example: 9dbe9eb1767c5e12c69839af893dc239
                            type: string
                            xml:
                              attribute: true
                          new:
                            $ref: "#/paths/~1request~1%7Bid%7D?cmd=diff/post/responses/200/content/application~1xml;%20charset=utf-8/schema/properties/action/properties/sourcediff/properties/old"
                          old:
                            properties:
                              package:
                                example: ruby
                                type: string
                                xml:
                                  attribute: true
                              project:
                                example: home:Iggy:branches:home:Admin
                                type: string
                                xml:
                                  attribute: true
                              rev:
                                example: 3
                                type: string
                                xml:
                                  attribute: true
                              srcmd5:
                                example: 59300f4ba65f53334b2e2a39f87ba3a0
                                type: string
                                xml:
                                  attribute: true
                            type: object
                        type: object
                      target:
                        properties:
                          package:
                            example: ruby
                            type: string
                            xml:
                              attribute: true
                          project:
                            example: home:Admin
                            type: string
                            xml:
                              attribute: true
                        type: object
                      type:
                        example: submit
                        type: string
                        xml:
                          attribute: true
                    type: object
                  actions:
                    example: 0
                    type: string
                    xml:
                      attribute: true
                  id:
                    example: 12
                    type: string
                    xml:
                      attribute: true
                type: object
                x-components:
                  schemas:
                    NewOldDestination:
                      $ref: "#/paths/~1request~1%7Bid%7D?cmd=diff/post/responses/200/content/application~1xml;%20charset=utf-8/schema/properties/action/properties/sourcediff/properties/old"
                    OldNewFile:
                      $ref: "#/paths/~1request~1%7Bid%7D?cmd=diff/post/responses/200/content/application~1xml;%20charset=utf-8/schema/properties/action/properties/sourcediff/properties/files/items/properties/file/properties/old"
                xml:
                  name: diff
            text/plain; charset=utf-8:
              example: |
                spec files:
                -----------
                --- test.spec
                +++ test.spec
                @@ -0,0 +1 @@
                +# NEW COMMENT
                \ No newline at end of file
              schema:
                type: string
          description: OK
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: Couldn't find request with id '355'
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found
      security:
        - basic_authentication: []
      summary: Get the diff for all packages affected by the request.
      tags:
        - Request
  /request?view=collection:
    get:
      description: |
        Get a collection of requests for a specified target. **NOTE:**
        You need to set at least one of the following parameters in order
        to use this endpoint:

        * `user`
        * `project`
        * `package`
        * `states`
        * `types`
        * `ids`
      parameters:
        - description: |
            Filter the results of requests and open reviews for a certain user. If no other parameters are
            applied, it will include requests where the user is maintainer of the target or the creator of
            the request.
          example: hans
          in: query
          name: user
          schema:
            type: string
        - description: Limit the results of requests and open review requests to the specified target project.
          example: home:hans
          in: query
          name: project
          schema:
            type: string
        - description: Limit the results of requests and open review requests to the specified target package.
          example: ruby
          in: query
          name: package
          schema:
            type: string
        - description: Limit results to a given request state. Multiple states can be provided as a comma separated list.
          example: new,review
          in: query
          name: states
          schema:
            type: string
        - description: Limit the results to certain action types. Multiple types can be provided as a comma separated list.
          example: add_role,submit
          in: query
          name: types
          schema:
            type: string
        - description: Limit the results to a given role. Multiple roles can be provided as a comma separated list.
          example: creator,maintainer,reviewer,source,target
          in: query
          name: roles
          schema:
            type: string
        - description: Include the request history in the results.
          example: 1
          in: query
          name: withhistory
          schema:
            type: string
        - description: Includes both, request and review history in the results.
          example: 1
          in: query
          name: withfullhistory
          schema:
            type: string
        - description: Limit the results to the specified amount of requests.
          example: 7
          in: query
          name: limit
          schema:
            type: integer
        - description: Limit the result to specified request id's. Multiple id's can be provided as a comma separated list.
          example: 15,19,23
          in: query
          name: ids
          schema:
            type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              schema:
                properties:
                  matches:
                    example: 7
                    type: string
                    xml:
                      attribute: true
                  request:
                    items:
                      $ref: "#/paths/~1request/post/requestBody/content/application~1xml;%20charset=utf-8/schema"
                    type: array
                type: object
                xml:
                  name: collection
          description: OK
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              examples:
                Not Found:
                  value:
                    code: not_found
                    summary: Couldn't find User with login = foo
                Require Filter:
                  value:
                    code: require_filter
                    summary: This call requires at least one filter, either by user, project or package or states or types or reviewstates
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found
      security:
        - basic_authentication: []
      summary: Get a collection of requests for a specified target
      tags:
        - Request
  /worker/status:
    get:
      description: |
        Lists status of workers, running jobs, waiting jobs, status of the backend services and general statistics.

        Other ways to obtain the same information as with this endpoint are:
          * `GET /worker/_status`
          * `GET /status/workerstatus`
          * `GET /build/_workerstatus`
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                blocked:
                  - arch: i586
                    jobs: "0"
                  - arch: x86_64
                    jobs: "0"
                buildavg:
                  - arch: i586
                    buildavg: "1200"
                  - arch: x86_64
                    buildavg: "1200"
                building:
                  - arch: x86_64
                    hostarch: x86_64
                    package: android-sdk
                    project: home:enzokiel
                    repository: openSUSE_11.3_Update
                    starttime: "1289838671"
                    workerid: 1a1f67b948b6:2
                clients: "2"
                down:
                  - hostarch: aarch64
                    workerid: armbuild03:1
                idle:
                  - hostarch: x86_64
                    workerid: 1a1f67b948b6:1
                partition:
                  - daemon:
                      - starttime: "1617711138"
                        state: running
                        type: srcserver
                      - starttime: "1617711144"
                        state: running
                        type: servicedispatch
                      - starttime: "1617711144"
                        state: running
                        type: service
                      - starttime: "1617711145"
                        state: running
                        type: clouduploadserver
                      - starttime: "1617711144"
                        state: running
                        type: clouduploadworker
                      - arch: i586
                        queue:
                          high: "0"
                          low: "11"
                          med: "0"
                          next: "0"
                        starttime: "1617711145"
                        state: running
                        type: scheduler
                      - arch: x86_64
                        queue:
                          high: "0"
                          low: "11"
                          med: "0"
                          next: "0"
                        starttime: "1617711145"
                        state: running
                        type: scheduler
                      - starttime: "1617711143"
                        state: running
                        type: repserver
                      - starttime: "1617711144"
                        state: running
                        type: dispatcher
                      - starttime: "1617711145"
                        state: running
                        type: publisher
                      - starttime: "1617711146"
                        state: running
                        type: signer
                  - daemon:
                      - arch: aarch64
                        queue:
                          high: "0"
                          low: "4"
                          med: "1"
                          next: "22"
                        starttime: "1617148925"
                        state: running
                        type: scheduler
                    name: back-main
                waiting:
                  - arch: i586
                    jobs: "0"
                  - arch: x86_64
                    jobs: "0"
              schema:
                properties:
                  blocked:
                    items:
                      properties:
                        arch:
                          type: string
                          xml:
                            attribute: true
                        jobs:
                          type: string
                          xml:
                            attribute: true
                      type: object
                    type: array
                  buildavg:
                    items:
                      properties:
                        arch:
                          type: string
                          xml:
                            attribute: true
                        buildavg:
                          type: string
                          xml:
                            attribute: true
                      type: object
                    type: array
                  building:
                    items:
                      properties:
                        arch:
                          type: string
                          xml:
                            attribute: true
                        hostarch:
                          type: string
                          xml:
                            attribute: true
                        package:
                          type: string
                          xml:
                            attribute: true
                        project:
                          type: string
                          xml:
                            attribute: true
                        repository:
                          type: string
                          xml:
                            attribute: true
                        starttime:
                          type: string
                          xml:
                            attribute: true
                        workerid:
                          type: string
                          xml:
                            attribute: true
                      type: object
                    type: array
                  clients:
                    type: integer
                    xml:
                      attribute: true
                  down:
                    items:
                      properties:
                        hostarch:
                          type: string
                          xml:
                            attribute: true
                        workerid:
                          type: string
                          xml:
                            attribute: true
                      type: object
                    type: array
                  idle:
                    items:
                      properties:
                        hostarch:
                          type: string
                          xml:
                            attribute: true
                        workerid:
                          type: string
                          xml:
                            attribute: true
                      type: object
                    type: array
                  partition:
                    items:
                      properties:
                        daemon:
                          items:
                            properties:
                              arch:
                                type: string
                                xml:
                                  attribute: true
                              queue:
                                properties:
                                  high:
                                    type: string
                                    xml:
                                      attribute: true
                                  low:
                                    type: string
                                    xml:
                                      attribute: true
                                  med:
                                    type: string
                                    xml:
                                      attribute: true
                                  next:
                                    type: string
                                    xml:
                                      attribute: true
                                type: object
                              starttime:
                                type: string
                                xml:
                                  attribute: true
                              state:
                                type: string
                                xml:
                                  attribute: true
                              type:
                                type: string
                                xml:
                                  attribute: true
                            type: object
                          type: array
                        name:
                          type: string
                          xml:
                            attribute: true
                      type: object
                    type: array
                  waiting:
                    items:
                      properties:
                        arch:
                          type: string
                          xml:
                            attribute: true
                        jobs:
                          type: string
                          xml:
                            attribute: true
                      type: object
                    type: array
                type: object
                xml:
                  name: workerstatus
          description: OK
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
      security:
        - basic_authentication: []
      summary: Lists status of workers, jobs, backend services and general statistics.
      tags:
        - Workers
  "/worker/{architecture_name}:{worker_id}":
    get:
      description: |
        Lists capabilites of a worker.

        This can be useful when checking for constraints.

        This operation is the same as `GET /worker/capability/{architecture_name}:{worker_id}`.
      parameters:
        - $ref: "#/paths/~1architectures~1%7Barchitecture_name%7D/get/parameters/0"
        - description: Worker id.
          example: 1a1f67b948b6:1
          in: path
          name: worker_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              example:
                hardware:
                  cpu:
                    flag:
                      - fpu
                      - vme
                      - de
                      - pse
                      - tsc
                      - msr
                  jobs: "1"
                  processors: "8"
                hostarch: x86_64
                hostlabel: OBS_WORKER_SECURITY_LEVEL_
                linux:
                  flavor: default
                  version: 5.11.6-1
                registerserver: http://backend:5252
                sandbox: chroot
                workerid: 1a1f67b948b6:1
              schema:
                properties:
                  hardware:
                    properties:
                      cpu:
                        properties:
                          flag:
                            items:
                              type: string
                            type: array
                        type: object
                      jobs:
                        type: string
                      processors:
                        type: string
                    type: object
                  hostarch:
                    type: string
                    xml:
                      attribute: true
                  hostlabel:
                    type: string
                  linux:
                    properties:
                      flavor:
                        type: string
                      version:
                        type: string
                    type: object
                  registerserver:
                    type: string
                    xml:
                      attribute: true
                  sandbox:
                    type: string
                  workerid:
                    type: string
                    xml:
                      attribute: true
                type: object
                xml:
                  name: worker
          description: OK
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: "404"
                details: "404 remote error: unknown worker (http://backend:5252/worker/x86_64:1a1f67b948bf:1)"
                summary: "remote error: unknown worker (http://backend:5252/worker/x86_64:1a1f67b948bf:1)"
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Lists capabilites of a worker.
      tags:
        - Workers
  /worker?cmd=checkconstraints:
    post:
      description: |
        Given a project, package, repository and architecture, list workers which can build with that restrictions, and also match a constraints filter.

        This endpoint doesn't create or modify any data.

        More information about constraints can be found in the
        [user guide](https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.build_job_constraints.html).

        This operation is the same as `POST /worker/command/run?cmd=checkconstraints`.
      parameters:
        - description: Project name.
          example: home:user1
          in: query
          name: project
          required: true
          schema:
            type: string
        - description: Repository name.
          example: openSUSE_Tumbleweed
          in: query
          name: repository
          required: true
          schema:
            type: string
        - description: Architecture name.
          example: x86_64
          in: query
          name: arch
          required: true
          schema:
            type: string
        - description: Package name.
          example: test_package
          in: query
          name: package
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/xml; charset=utf-8:
            examples:
              cpu_flags:
                summary: Cpu flags
                value:
                  hardware:
                    cpu:
                      flag:
                        - mmx
                        - sse2
              mix:
                summary: Linux version and linux flavor
                value:
                  linux:
                    flavor: default
                    version:
                      max: 4
                      min: 3
              processors:
                summary: Number of processors
                value:
                  hardware:
                    processors: 2
            schema:
              properties:
                hardware:
                  properties:
                    cpu:
                      properties:
                        flag:
                          items:
                            type: string
                          type: array
                      type: object
                    disk:
                      properties:
                        size:
                          type: string
                      type: object
                    memory:
                      properties:
                        size:
                          type: string
                      type: object
                    physicalmemory:
                      properties:
                        size:
                          type: string
                      type: object
                    processors:
                      type: string
                  type: object
                hostlabel:
                  type: string
                linux:
                  properties:
                    flavor:
                      type: string
                    version:
                      properties:
                        max:
                          type: string
                        min:
                          type: string
                      type: object
                  type: object
                sandbox:
                  example: chroot
                  type: string
              type: object
              xml:
                name: constraints
        description: Constraints XML filter
        required: true
      responses:
        "200":
          content:
            application/xml; charset=utf-8:
              examples:
                no_workers:
                  summary: No Workers Satisfy the Constraints
                  value: null
                two_workers:
                  summary: Two Workers Satisfy the Constraints
                  value:
                    entry:
                      - name: x86_64:1a1f67b948b6:1
                      - name: x86_64:1a1f67b948b6:2
              schema:
                $ref: "#/paths/~1architectures/get/responses/200/content/application~1xml;%20charset=utf-8/schema"
          description: OK
        "400":
          content:
            application/xml; charset=utf-8:
              example:
                code: missing_parameter
                summary: Required Parameter arch missing
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Bad Request.
        "401":
          $ref: "#/paths/~1architectures/get/responses/401"
        "404":
          content:
            application/xml; charset=utf-8:
              example:
                code: not_found
                summary: |
                  &lt;status code="404"&gt;
                  &lt;summary&gt;repository 'home:Admin/openSUSE_Tumbleweed' has no architecture 'x86_64d'&lt;/summary&gt;
                  &lt;details&gt;404 repository 'home:Admin/openSUSE_Tumbleweed' has no architecture 'x86_64d'&lt;/details&gt;
                  &lt;/status&gt;
              schema:
                $ref: "#/paths/~1architectures/get/responses/401/content/application~1xml;%20charset=utf-8/schema"
          description: Not Found.
      security:
        - basic_authentication: []
      summary: Lists workers which match a constraints filter.
      tags:
        - Workers
components:
  securitySchemes:
    basic_authentication:
      scheme: basic
      type: http
