This API endpoint gives access to various functions of the streamkeys database table, permitting to read, add, change or delete entries at the database. This database table holds all BISS-1/BISS-E keys and SRT passphrases known in the sat-nms 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/streamkeys
Returns the list of stored stream keys as an array of StreamKeyData data objects.
Parameters: none
Expected Payload: none
Replied Payload: The list of stored stream keys as an array of StreamKeyData data objects.
Return Codes:
| Code | Description |
|---|---|
| 200 | OK, returns a JSON document with all streamkeys and their attributes. |
| 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. |
GET /api/v1/streamkeys/{keyId}
Returns the basic properties of the stream key addressed by {keyId} as a StreamKeyData data object.
Parameters:
| Parameter | Description |
|---|---|
| keyId | Id of the stream key. |
Expected Payload: none
Replied Payload: The requested StreamKeyData data object.
Return Codes:
| Code | Description |
|---|---|
| 200 | OK, returns a document describing the requested stream key. |
| 401 | not logged in. In this case an ApiError document is returned, describing details of the error. |
| 404 | stream key with the given keyId does not exists. In this case an ApiError document is returned, describing details of the error. |
POST /api/v1/streamkeys
Creates a new stream key with the given attributes. The unique keyId is generated by the database backend and returned in the response document.
Parameters: none
Expected Payload: The StreamKeyData data object to store. Any keyId definition in the source is ignored as this will be set by the database when the new entry is created. The name field in the supplied payload must be unique over the entire table or the API call will decline to create the database record.
Replied Payload: The StreamKeyData data object added to the database. The replied data object contains the keyId assigned to the newly created record.
Return Codes:
| Code | Description |
|---|---|
| 201 | CREATED, the created StreamKeyData data object is replied as payload |
| 400 | BAD_REQUEST. Either the name supplied with the request is not unique or the key does not conform to the format restrictions for the given keyType |
| 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/streamkeys/{keyId}
Updates an existing stream key with the given keyId from the attached StreamKeyData data object.
Parameters:
| Parameter | Description |
|---|---|
| keyId | Id of the stream key. |
Expected Payload: The StreamKeyData data object containing the fields to be updated in the database. If the data object contains an keyId key, the value is ignored. The database record is solely identified by keyId set in the URL, the keyId of the record is immutable. Keys not contained in the supplied data object are retained unchanged. The name field in the supplied payload must be unique over the entire table or the API call will decline to modify the database record.
Replied Payload: The StreamKeyData 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. Either the name supplied with the request is not unique or the key does not conform to the format restrictions for the given keyType |
| 401 | not logged in. In this case an ApiError document is returned, describing details of the error. |
| 404 | the stream key with the given keyId does not exists. 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/streamkeys/{keyId}
Remove a stream key from the database.
Parameters:
| Parameter | Description |
|---|---|
| keyId | Id of the stream key to delete |
Expected Payload: none
Replied Payload: none
Return Codes:
| Code | Description |
|---|---|
| 204 | NO CONTENT, the satellite has been deleted. |
| 401 | not logged in. In this case an ApiError document is returned, describing details of the error. |
| 404 | the stream key with the given keyId does not exists. 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. |