Fetching channels

Channels can be created to make a collection of radio content items. The Channels API endpoint is part of the Content REST API.

The Channel object

{
    "id": "a4452199a-24027-4071-ae22-ef4e2fca254a6",
    "created_on": "2017-06-08T09:27:59+00:00",
    "changed_on": "2017-08-25T08:14:49+00:00",
    "label": "Channel",
    "name": "WebApp",
    "type": "site",
}
FIELDDESCRIPTION
idUnique identifier for each item.
created_onUTC time at which the channel was created.
changed_onUTC time at which the channel was last updated.
labelIdentifier for the object.
nameName of the channel.
typeCan be "site" or "channel"

Fetching all channels

If you want to fetch a collection of channels you can use the channels collection endpoint.

GET https://api.eu1.prepr.io/channels
{
    "items": [
      {
          "id": "a4452199a-24027-4071-ae22-ef4e2fca254a6",
          "created_on": "2017-06-08T09:27:59+00:00",
          "changed_on": "2017-08-25T08:14:49+00:00",
          "label": "Channel",
          "name": "WebApp",
          "type": "site",
          "slug": null
      }
    ],
    "total": 1,
    "after": "YWZ0ZXJfMjU=",
    "before": "YmVmb3JlXzA=",
    "skip": 0,
    "limit": 25
}

Arguments

The following arguments are available or required when querying a collection:

argumenttyperequireddescription
qStringfalseSearch by name.
sortStringfalsecreated_on, changed_on, name
slugStringfalse--

Query by ID

Since IDs are unique in Prepr, you can find the channel you want using the id argument. Here is an example that demonstrates how to query a channel with the ID "535c1e-...":

GET https://api.eu1.prepr.io/channels/{id}

Was this article helpful?

We’d love to learn from your feedback