Metadata for OpenShift Build Service

This viewset provides a list of all components relevant to OSBS. This connection is realized through the has_osbs flag on release component types. The components appear in this API automatically when they are assigned the proper type. Records here can only be changed, they can't be created or deleted.

Currently there is just one flag tracked here:

  • autorebuild: This flag indicates whether the component should be automatically rebuilt when its dependencies change. If the value in PDC is null, it indicates that the client should use its default value.

Documents & examples

Method: GET

URL: /rest_api/v1/osbs/

Query params:

  • autorebuild (bool)
  • component_name (string)
  • release (string)
  • ordering (string) Comma separated list of fields for ordering results.
    • To sort by a field in descending order, prefix its name with minus (e.g. -name).
    • Use double underscores for nested field names (e.g. parent__child for {"parent": {"child": ...}}).

Following filters can be used to show only specific fields. This can make response time faster. Format is list or single value (JSON: {"fields": ["a","b"]} or {"fields": "a"}, in URL: ?fields=a&fields=b).

  • fields (list | string) Fields to display (other fields will be hidden).
  • exclude_fields: (list | string) Fields NOT to display (overrules fields).

Response:

{
    "autorebuild (nullable)": "boolean", 
    "component (read-only)": {
        "id": "int", 
        "name": "string", 
        "release": "Release.release_id"
    }
}

Method: GET

URL: /rest_api/v1/osbs/{release_id}/{component_name}/

Response:

{
    "autorebuild (nullable)": "boolean", 
    "component (read-only)": {
        "id": "int", 
        "name": "string", 
        "release": "Release.release_id"
    }
}

Method: PUT

URL: /rest_api/v1/osbs/{release_id}/{component_name}/

Data:

{
    "autorebuild (nullable)": "boolean"
}

Response:

{
    "autorebuild (nullable)": "boolean", 
    "component (read-only)": {
        "id": "int", 
        "name": "string", 
        "release": "Release.release_id"
    }
}

Method: PATCH

URL: /rest_api/v1/osbs/{release_id}/{component_name}/

Data:

{
    "autorebuild (nullable)": "boolean"
}

Response:

{
    "autorebuild (nullable)": "boolean", 
    "component (read-only)": {
        "id": "int", 
        "name": "string", 
        "release": "Release.release_id"
    }
}

It is possible to update multiple objects in one request. Use the PUT or PATCH method with the same url as for listing/creating objects. The request body should contain an object, where keys are identifiers of objects to be modified and their values use the same format as normal update.

Browsable GET

GET /rest_api/v1/osbs/
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 0,
    "next": null,
    "previous": null,
    "results": []
}