REST API
(→Download & Support) |
|||
(One intermediate revision by one user not shown) | |||
Line 1: | Line 1: | ||
+ | |||
+ | |||
+ | == About REST API == | ||
{{ATV}} has an extensive REST API which you can access over HTTP or HTTPS. | {{ATV}} has an extensive REST API which you can access over HTTP or HTTPS. | ||
Line 6: | Line 9: | ||
HTTP does not require authentication (only suited for your local LAN), whereas HTTPS does (so it can be opened up to the outside world through your router). You configure the credentials required at {{ATV}} installation time, or alternatively they can be changed in '''%PROGRAMFILES%\ARGUS TV\Scheduler\ArgusTV.Scheduler.exe.config''' | HTTP does not require authentication (only suited for your local LAN), whereas HTTPS does (so it can be opened up to the outside world through your router). You configure the credentials required at {{ATV}} installation time, or alternatively they can be changed in '''%PROGRAMFILES%\ARGUS TV\Scheduler\ArgusTV.Scheduler.exe.config''' | ||
− | |||
+ | == Endpoints == | ||
There is built-in documentation which describes each endpoint. | There is built-in documentation which describes each endpoint. | ||
Line 19: | Line 22: | ||
* http://htpc.local:49943/ArgusTV/Log/help | * http://htpc.local:49943/ArgusTV/Log/help | ||
− | |||
+ | == Return Format == | ||
The API can return data in either JSON (the default) or XML. You choose which you want by sending the appropriate Content-type header in your request. | The API can return data in either JSON (the default) or XML. You choose which you want by sending the appropriate Content-type header in your request. | ||
Content-type: application/json | Content-type: application/json | ||
− | |||
+ | == Examples == | ||
=== Get the {{ATV}} Server Version using curl === | === Get the {{ATV}} Server Version using curl === | ||
Line 37: | Line 40: | ||
* -d normally contains POST data to send. For this endpoint, there is no POST data, but we still specify it to force the request into POST (all {{ATV}} REST API endpoints require POST requests). | * -d normally contains POST data to send. For this endpoint, there is no POST data, but we still specify it to force the request into POST (all {{ATV}} REST API endpoints require POST requests). | ||
− | |||
+ | == Common Issues == | ||
=== Date Format === | === Date Format === | ||
− | |||
The date format expected by most of the endpoints in JSON is: | The date format expected by most of the endpoints in JSON is: | ||
Line 50: | Line 52: | ||
The date format on URLs is a more basic format and can be one of the following: "yyyy-MM-ddTHH:mm:sszzz", "yyyy-MM-ddTHH:mm:ss", "yyyyMMddTHHmmss", "yyyyMMdd" or "yyyy-MM-dd". | The date format on URLs is a more basic format and can be one of the following: "yyyy-MM-ddTHH:mm:sszzz", "yyyy-MM-ddTHH:mm:ss", "yyyyMMddTHHmmss", "yyyyMMdd" or "yyyy-MM-dd". | ||
+ | |||
+ | |||
+ | == Download & Support == | ||
+ | {{BOX_WEB}}'''Support''': see {{ATV}} Forum's thread {{LINK-FORUM}} [http://www.argus-tv.com/forum/viewtopic.php?f=73&t=3946 {{ATV}} REST API] | ||
+ | {{/BOX_WEB}} |
Latest revision as of 14:31, 3 February 2013
Contents |
[edit] About REST API
ARGUS TV has an extensive REST API which you can access over HTTP or HTTPS.
- Use port 49941 for HTTPS
- Use port 49943 for HTTP
HTTP does not require authentication (only suited for your local LAN), whereas HTTPS does (so it can be opened up to the outside world through your router). You configure the credentials required at ARGUS TV installation time, or alternatively they can be changed in %PROGRAMFILES%\ARGUS TV\Scheduler\ArgusTV.Scheduler.exe.config
[edit] Endpoints
There is built-in documentation which describes each endpoint.
They are broken into six categories, which can be found at the addresses below (assuming your ARGUS TV server is at htpc.local)
- http://htpc.local:49943/ArgusTV/Control/help
- http://htpc.local:49943/ArgusTV/Scheduler/help
- http://htpc.local:49943/ArgusTV/Guide/help
- http://htpc.local:49943/ArgusTV/Core/help
- http://htpc.local:49943/ArgusTV/Configuration/help
- http://htpc.local:49943/ArgusTV/Log/help
[edit] Return Format
The API can return data in either JSON (the default) or XML. You choose which you want by sending the appropriate Content-type header in your request.
Content-type: application/json
[edit] Examples
[edit] Get the ARGUS TV Server Version using curl
curl --insecure -u user:password -d '' https://htpc.local:49941/ArgusTV/Core/Version
This should return a simple string (this endpoint doesn't actually return any JSON data).
- --insecure means "don't complain about the self-signed SSL certificate ARGUS TV uses
- -u user:password should be self-explanatory
- -d normally contains POST data to send. For this endpoint, there is no POST data, but we still specify it to force the request into POST (all ARGUS TV REST API endpoints require POST requests).
[edit] Common Issues
[edit] Date Format
The date format expected by most of the endpoints in JSON is:
/Date(xxxxx+0000)/
Here, xxxxx is the number of milliseconds in the GMT time zone, regular (non-daylight savings) time since midnight, January 1, 1970.
The +0000 part is the timezone offset and is really only there for informational purposes (since the number of milliseconds is always in the GMT timezone).
The date format on URLs is a more basic format and can be one of the following: "yyyy-MM-ddTHH:mm:sszzz", "yyyy-MM-ddTHH:mm:ss", "yyyyMMddTHHmmss", "yyyyMMdd" or "yyyy-MM-dd".
[edit] Download & Support
Support: see ARGUS TV Forum's thread ARGUS TV REST API |