This API endpoint gives access to various functions of the channels database table, permitting to read, add, change or delete entries at the database. This database table holds all satellite channels known in the satnms database.
Supported HTTP methods: GET, POST, PATCH, DELETE, HEAD, OPTIONS
The API generally does not permit PATCH or DELETE operations on entire tables, this to protect the database from being accidentally be deleted. Even POST operations only work with single data objects.
GET /api/v1/channels/
Returns the list of all satellite channel records as an array of ChannelData data objects.
Parameters: none
Expected Payload: none
Replied Payload: The list of satellite channel records as an array of ChannelData data objects.
Return Codes:
| Code | Description |
|---|---|
| 200 | OK, returns a JSON document with the requested information |
| 401 | not logged in. In this case an ApiError document is returned, describing details of the error. |
GET /api/v1/channels/ip
Returns the list of all 'IP' type satellite channel records as an array of ChannelData data objects.
Parameters: none
Expected Payload: none
Replied Payload: The list of satellite channel records as an array of ChannelData data objects. This array may be empty if there are no such channel records in the database..
Return Codes:
| Code | Description |
|---|---|
| 200 | OK, returns a JSON document with the requested information |
| 401 | not logged in. In this case an ApiError document is returned, describing details of the error. |
GET /api/v1/channels/asi
Returns the list of all 'ASI' type satellite channel records as an array of ChannelData data objects.
Parameters: none
Expected Payload: none
Replied Payload: The list of satellite channel records as an array of ChannelData data objects. This array may be empty if there are no such channel records in the database.
Return Codes:
| Code | Description |
|---|---|
| 200 | OK, returns a JSON document with the requested information |
| 401 | not logged in. In this case an ApiError document is returned, describing details of the error. |
GET /api/v1/channels/sat
Returns the list of all 'SAT' type satellite channel records as an array of ChannelData data objects.
Parameters: none
Expected Payload: none
Replied Payload: The list of satellite channel records as an array of ChannelData data objects. This array may be empty if there are no such channel records in the database.
Return Codes:
| Code | Description |
|---|---|
| 200 | OK, returns a JSON document with the requested information |
| 401 | not logged in. In this case an ApiError document is returned, describing details of the error. |
GET /api/v1/channels/sat/{satelliteId}
Returns the list of 'SAT' type satellite channel records for a given satellite as an array of ChannelData data objects.
Parameters:
| Parameter | Description |
|---|---|
| satelliteId | Id of the satellite. |
Expected Payload: none
Replied Payload: The list of satellite channel records as an array of ChannelData data objects. This array may be empty if there are no channel records defined for this satellite.
Return Codes:
| Code | Description |
|---|---|
| 200 | OK, returns a JSON document with the requested information |
| 401 | not logged in. In this case an ApiError document is returned, describing details of the error. |
| 404 | satellite with the given satelliteId does not exists. In this case an ApiError document is returned, describing details of the error. |
GET /api/v1/channels/{channelId}
Returns the information stored for a particular channel record addressed by {channelId} as a ChannelData data object.
Parameters:
| Parameter | Description |
|---|---|
| channelId | Id of the channel record. |
Expected Payload: none
Replied Payload: The requested ChannelData data object.
Return Codes:
| Code | Description |
|---|---|
| 200 | OK, returns a document describing the requested satellite. |
| 401 | not logged in. In this case an ApiError document is returned, describing details of the error. |
| 404 | no satellite channel record exists with the given channelId. In this case an ApiError document is returned, describing details of the error. |
POST /api/v1/channels
Creates a new channel record with the given attributes.
Parameters: none
Expected Payload: The ChannelData data object to store. The channel definition must conform the following conditions:
Replied Payload: The ChannelData data object added to the datbase. The replied data object contains the channelId assigned to the newly created record.
Return Codes:
| Code | Description |
|---|---|
| 201 | CREATED, the created ChannelData data object is replied as payload |
| 400 | BAD_REQUEST if the supplied ChannelData does not conform the conditions listed above. |
| 401 | not logged in. In this case an ApiError document is returned,describing details of the error. |
| 500 | DB is not writable. In this case an ApiError document is returned,describing details of the error. |
PATCH /api/v1/channels/{channelId}
Updates an existing channel record with the given channelId from the attached ChannelData data object.
Parameters:
| Parameter | Description |
|---|---|
| channelId | Id of the channel record. |
Expected Payload: The ChannelData data object containing the fields to be updated in the database. Fields not contained in the supplied data object are retained unchanged. The channel definition must conform the following conditions:
Replied Payload: The ChannelData data object read from the database after the requested changes have been applied.
Return Codes:
| Code | Description |
|---|---|
| 200 | OK, changes have been applied. |
| 400 | BAD_REQUEST if the supplied ChannelData does not conform the conditions listed above. |
| 401 | not logged in. In this case an ApiError document is returned, describing details of the error. |
| 404 | no satellite channel record exists with the given channelId. In this case an ApiError document is returned, describing details of the error. |
| 500 | DB is not writable. In this case an ApiError document is returned,describing details of the error. |
DELETE /api/v1/channels/{channelId}
Remove a channel record from the database.
Parameters:
| Parameter | Description |
|---|---|
| channelId | Id of the channel record to delete. |
Expected Payload: none
Replied Payload: none
Return Codes:
| Code | Description |
|---|---|
| 204 | NO CONTENT, the channel record has been deleted. |
| 401 | not logged in. In this case an ApiError document is returned, describing details of the error. |
| 404 | no satellite channel record exists with the given channelId. In this case an ApiError document is returned, describing details of the error. |
| 500 | DB is not writable. In this case an ApiError document is returned,describing details of the error. |
DELETE /api/v1/channels/sat/{satelliteId}
Remove all channel records which belong to the given satelliteId.
Parameters:
| Parameter | Description |
|---|---|
| satelliteId | Id of the satellite |
Return Codes:
| Code | Description |
|---|---|
| 204 | NO CONTENT, all channel records for the selected satellite have been deleted. |
| 401 | not logged in. In this case an ApiError document is returned, describing details of the error. |
| 404 | satellite with the given satelliteId does not exist. In this case an ApiError document is returned, describing details of the error. |
| 500 | DB is not writable. In this case an ApiError document is returned,describing details of the error. |