@ -1,3 +1,4 @@
# HPR automation API design
*Table of contents*
@ -49,15 +50,17 @@ all data is expected to be JSON-based
*request_available_slots*:
In:
| Name(s) | Type |Remark |
|------------|-------|------------------------------------------------|
|token | string| Bearer / API token |
|token |string | Bearer / API token |
|[start_date]|string | ISO-8601 compliant date |
| | | if missing, first avaible slot will be returned|
|[end_date] |string | ISO-8601 compliant date |
| | | If stated, no slot after date will be chosen |
Out:
|Name(s) | Type | Remark |
|--------------|-------|---------------------------|
|slot_available|boolean|Indicates if slot available|
@ -65,15 +68,20 @@ Out:
|slot |string |ISO-8601 compliant date |
| | | |
* Possible errno values
* Possible errno values:
0 No error
1 Invalid start date
2 Invalid end date
3 Invalid token
*show_request*:
In:
| Name(s) | Type |Remark |
|-------------|-------|--------------------------------------------------------------------------------|
|date |string | ISO-8601 compliant date indicating selected slot |
@ -93,9 +101,10 @@ In:
|[profile] |string | Optional profile description |
| | | |
* either audio_stream or audio_url must be present
* either audio_stream or audio_url must be present
Out:
|Name(s) | Type | Remark |
|--------|-------|-----------------------------------------------------|
| id |string | Confirmation ID (-1 it not accepted) |
@ -106,30 +115,38 @@ Out:
* Possible errno values:
0 No error
1 Mandatory field missing (errstr contains parameter ID)
2 Upload problem (includes any decoding issues)
3 Download problem (audio_url invalid?)
4 Invalid date
5 Request validity period expired (similar to curernt workflow, show_request must be issued no later than 15 minutes after request_available_slots returns with a valid date spec)
*cancel_request*:
In:
|Name(s) | Type | Remark |
|--------|-------|----------------------------------------------------------------------|
| id |string | Confirmation ID for cancelation request |
Out:
|Name(s) | Type | Remark |
|--------|-------|----------------------------------------------------|
|canceled|boolean| Cancelation confirmation |
|errno |integer| Reason indication why cancelation was not possible*|
| | | |
* Possible errno values:
0 No error
1 Cancelation not possible
2 Cancelation requested issued past airing date
**3. Requirements**