Overview

This page shows the usage of the Release Types API, please see the following for more details.

Test tools

You can use curl in terminal, with -X method (GET|POST|PUT|PATCH|DELETE), -d data (a json string). or GUI plugins for browsers, such as RESTClient, RESTConsole.

Documents & examples

Method: GET

URL: /rest_api/v1/release-types/

Query params:

  • name (string, case insensitive, substring match)
  • short (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: a paged list of following objects

{
    "name": "string", 
    "short": "string", 
    "suffix": "string"
}

Example:

$ curl "https://pdc.fedoraproject.org/rest_api/v1/release-types/"
{
    "previous": null,
    "next": null,
    "count": 6,
    "results": [
        {
            "short": "ga",
            "name": "Release",
            "suffix": ""
        },
        ......
    ]
}

Browsable GET

GET /rest_api/v1/release-types/
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 7,
    "next": null,
    "previous": null,
    "results": [
        {
            "short": "aus",
            "name": "Advanced Update Support (AUS) (also Advanced Mission Critical, Long Life)",
            "suffix": "-aus"
        },
        {
            "short": "els",
            "name": "Extended Life-cycle Support",
            "suffix": "-els"
        },
        {
            "short": "eus",
            "name": "Extended Update Support (EUS)",
            "suffix": "-eus"
        },
        {
            "short": "fast",
            "name": "FasTrack",
            "suffix": "-fast"
        },
        {
            "short": "ga",
            "name": "Release",
            "suffix": ""
        },
        {
            "short": "updates",
            "name": "Updates for a release",
            "suffix": "-updates"
        },
        {
            "short": "updates-testing",
            "name": "Updates Testing",
            "suffix": "-updates-testing"
        }
    ]
}