Before using the API, familiarize yourself with the following:
Resources and resource types
A resource is an individual data entity with a unique identifier. The table below describes the different types of resources and the different calls you can make when using this API.
|Station </resources/station>||Station object|
|get||Retrieves (GET) a specific resource.|
The table below identifies the (subset of) operations that are supported for different types of resources. Each resource may support some particular actions which are described on their individual specification page.
HTTP request headers
The required headers used by the API are listed below. At the moment we’re only accepting JSON and JSONAPI-specific header.
|Content-Type||The content type of the payload||application/json|
|Content-Type||The content type of the payload||application/vnd.api+json|
Possible fields returned
|call_sign||string||Station call sign (this is a unique value in our system)|
|full_common_name||string||Full common name (Max: 255 characters)|
|short_common_name||string||Short common name (Max: 128 characters)|
|tvss_url||string||The URL of TV Schedule|
|donate_url||string||The donation URL of the Station|
|timezone||string||The timezone of your Station's location|
|website_url||string||The homepage URL of the Station|
|facebook_url||string||The Facebook page of the Station|
|twitter_url||string||The Twitter page of the Station|
|station_kids_url||string||The kids homepage of the Station|
|telephone||string||The telephone number of the Station|
|fax||string||The fax number of the Station|
|city||string||The city in the station's mailing address.|
|state||string||The state in the station's mailing address.|
|address_line_1||string||The station's mailing address.|
|address_line_2||string||The station's mailing address.|
|zip_code||string||The zip code for the station's mailing address.|
|string||The email contact of the Station|
|tag_line||string||The Station’s tag line|
|primary_channel||string||Determines the station’s default TV listings grid|
|primetime_start||string||The primetime start designated by the station.|
|images||object or empty list||Images associated to a Station|
|updated_at||datetime||When the Station was last updated|
The following table describes the parameters for all images.
|profile||string||The profile of the image|
|url||string||The link to the ITS image|
Currently, Station is the only endpoint available in Station Manager. A station can be identified by its station ID (recommended) or by filtering by its flagship callsign (not recommended, as call signs change).
Returns a collection with all stations.
|call_sign||string||station callsign (case sensitive). Must be ALL CAPS. This parameter is NOT RECOMMENDED, as call signs can change. We recommend using the station ID (shown above) instead.|
|page||integer||Show the results on a specific page.|
|sort||string||Show the sorted by specific fields. The available fields are specified in the [‘meta’][‘sort’] block.|
The response for a request made to this endpoint will be paginated. The following response is for a request made without any query parameters:
Filter by Station ID
Requesting the station that will match WETA station ID. This will always return 1 or 0 results, because the filtering is an exact match by ID.
How Do I Get Station ID?
Look up the station ID using the link below, and appending the station flagship call sign to the end. In the response, look for the "id" field. Use this id value to Filter by Station ID, which is the recommended way to request station data. (This is because call signs can change; the ID will never change.) The example below uses WETA:
HTTP Response Status Codes
The possible Status codes returned by this call are 200, 401, 403, 500. For information about these statuses, refer to the HTTP response status codes section.
HTTP Request Headers
The header ‘Content-type’ should have the value ‘application/json’ as described in HTTP Request headers.
|200||Success||Operation was successful|
|400||Bad request||Description of the error will be given in the payload|
|401||Unauthenticated consumer||The consumer with this key:secret pair doesn’t exist in the system|
|403||Unauthorized consumer||The consumer with the key:secret doesn’t have access to this resource|
|404||No resources found||The demanded resources can not be found|
|500||Internal server error||Unknown error|
The Station Manager API uses "page-size" to determine the number of results displayed on one page. The maximum allowed number of results that you can display is 50.
The following is an example returning three stations.
The Station Manager API uses "page=" to determine which page of results you wish to view. If you have 10 pages of results, you can use this filter to jump to page two, or any other page within the 10 results.
The following is an example of jumping to page two of the list of results for stations.