Warning: This is an experimental API

Overview

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

Test tools

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

Customize Output

There are two query params that you can use to customize your output.

fields: string, can be set multiple times, to demand what fields you want to include;

exclude_fields: string, can be set multiple times, to demand what fields you do NOT want.

NOTE: If both given, exclude_fields rules fields.

Documents & examples

Method: GET

URL: /rest_api/v1/release-schedules/

Query Params:

  • active (bool)
  • date (string)
  • date_after (string)
  • date_before (string)
  • product_version (string)
  • release (string)
  • sla (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:

# paged lists
{
    "count": int,
    "next": url,
    "previous": url,
    "results": [
        {
            "active": bool,
            "date": date,
            "id": int,
            "release": string,
            "release_url": string,
            "sla": string,
            "sla_url": string,
        }
        ...
}

Method: GET

URL: /rest_api/v1/release-schedules/{pk}/

Response:

{
    "active": bool,
    "date": date,
    "id": int,
    "release": string,
    "release_url": string,
    "sla": string,
    "sla_url": string,
}

Method: POST

URL: /rest_api/v1/release-schedules/

Data:

{
    'release': string,  # required
    'sla':     string,  # required
    'date':    date,    # required
}

type: /rest_api/v1/release-schedules/

Response:

{
    "active": bool,
    "date": date,
    "id": int,
    "release": string,
    "release_url": string,
    "sla": string,
    "sla_url": string,
}

It is possible to create this resource in bulk. To do so, use the same procedure as when creating a single instance, only the request body should contain a list of JSON objects. The response you get back will also contain a list of values which you would obtain by submitting the request data separately.

When using the PUT method, if an optional field is not specified in the input, it will be erased.

Method:

PUT:

PATCH:

URL: /rest_api/v1/release-schedules/{pk}/

Response:

{
    "active": bool,
    "date": date,
    "id": int,
    "release": string,
    "release_url": string,
    "sla": string,
    "sla_url": string,
}

Method: DELETE

URL: /rest_api/v1/release-schedules/{pk}/

Response:

STATUS: 204 NO CONTENT

Example:

curl -X DELETE -H "Content-Type: application/json" https://pdc.fedoraproject.org/rest_api/v1/release-schedules/1/

It is possible to delete multiple items in one request. Use the DELETE method with the same url as for listing/creating objects. The request body should contain a list with identifiers for objects to be deleted. The identifier is usually the last part of the URL for deleting a single object.

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/release-schedules/
HTTP 200 OK
Allow: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

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