Overview

This page shows the usage of the ContentDeliveryRepoFamily 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/content-delivery-repo-families/

Query params:

  • name (string, case insensitive, substring match)
  • 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

{
    "description": "string", 
    "name": "string"
}

Example:

$ curl  "https://pdc.fedoraproject.org/rest_api/v1/content-delivery-repo-families/
{
    "count": 3,
    "next": null,
    "previous": null,
    "results": [
        {
            "name": "dist",
            "description": "Production content delivery repositories"
        },
        {
            "name": "beta",
            "description": "Beta (pre-production) content delivery repositories"
        },
        {
            "name": "htb",
            "description": "Content delivery repositories for High Touch Beta (HTB) customers"
        }
    ]
}

Browsable GET

GET /rest_api/v1/content-delivery-repo-families/
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 3,
    "next": null,
    "previous": null,
    "results": [
        {
            "name": "dist",
            "description": "Production repositories"
        },
        {
            "name": "beta",
            "description": "Beta (pre-production) repositories"
        },
        {
            "name": "htb",
            "description": "Repostitories for High Touch Beta (HTB) customers"
        }
    ]
}