The API provides programmatic access to read/set/delete data from DTVSol middleware.
To use this API, you need an API key. You can obtain it from your DTVSol middleware, under section Settings
Token:
Aways you must send the token into your http header request: /usr/bin/curl -ss -X GET "http://api.dtvsol.info/channels/" -H "accept: application/json" -H "Token: "
get data
get channels
Base url: /usr/bin/curl -ss -X GET "http://api.dtvsol.info/channels/{channelId}" -H "accept: application/json" -H "Token: "
QUERY PARAMETERS
Field
Type
Description
channelId
Integer
(optional) Get only information for selected channel by ID.
get radios
Base url: /usr/bin/curl -ss -X GET "http://api.dtvsol.info/radios/{radioId}" -H "accept: application/json" -H "Token: "
QUERY PARAMETERS
Field
Type
Description
radioId
Integer
(optional) Get only information for selected radio by ID.
get packs
Base url: /usr/bin/curl -ss -X GET "http://api.dtvsol.info/packs/{packId}" -H "accept: application/json" -H "Token: "
QUERY PARAMETERS
Field
Type
Description
packId
Integer
(optional) Get only information for selected pack by ID.
get tariffs
Base url: /usr/bin/curl -ss -X GET "http://api.dtvsol.info/tariffs/{tariffId}" -H "accept: application/json" -H "Token: "
QUERY PARAMETERS
Field
Type
Description
tariffId
Integer
(optional) Get only information for selected tariff by ID.
get devices
Base url: /usr/bin/curl -ss -X GET "http://api.dtvsol.info/devices/{deviceId}" -H "accept: application/json" -H "Token: "
QUERY PARAMETERS
Field
Type
Description
deviceId
Integer
(optional) Get only information for selected device by ID.
get clients
Base url: /usr/bin/curl -ss -X GET "http://api.dtvsol.info/clients/{clientId}" -H "accept: application/json" -H "Token: "
QUERY PARAMETERS
Field
Type
Description
clientId
Integer
(optional) Get only information for selected client by ID.
get proxies
Base url: /usr/bin/curl -ss -X GET "http://api.dtvsol.info/proxies/{proxyId}" -H "accept: application/json" -H "Token: "
QUERY PARAMETERS
Field
Type
Description
proxyId
Integer
(optional) Get only information for selected proxy by ID.
get restreamers
Base url: /usr/bin/curl -ss -X GET "http://api.dtvsol.info/restreamers/{restreamerId}" -H "accept: application/json" -H "Token: "
QUERY PARAMETERS
Field
Type
Description
restreamerId
Integer
(optional) Get only information for selected restreamer by ID.
get transcoders
Base url: /usr/bin/curl -ss -X GET "http://api.dtvsol.info/transcoders/{transcoderId}" -H "accept: application/json" -H "Token: "
QUERY PARAMETERS
Field
Type
Description
transcoderId
Integer
(optional) Get only information for selected transcoder by ID.
get server zones
Base url: /usr/bin/curl -ss -X GET "http://api.dtvsol.info/serverZones/{zoneId}" -H "accept: application/json" -H "Token: "
QUERY PARAMETERS
Field
Type
Description
zoneId
Integer
(optional) Get only information for selected zone by ID.
get channels groups
Base url: /usr/bin/curl -ss -X GET "http://api.dtvsol.info/channelGroups/{groupId}" -H "accept: application/json" -H "Token: "
QUERY PARAMETERS
Field
Type
Description
groupId
Integer
(optional) Get only information for selected group by ID.
get device code
Base url: /usr/bin/curl -ss -X GET "http://api.dtvsol.info/deviceCode/{clientId}" -H "accept: application/json" -H "Token: "
QUERY PARAMETERS
Field
Type
Description
clientId
Integer
Get generated code for Dtvsol application for selected client with ID.
RETURN PARAMETERS
Field
Type
Description
deviceCode
Integer
Generated code for Dtvsol application. This code can be user to add new device.
set data
add client
Base url: /usr/bin/curl -ss -X POST "http://api.dtvsol.info/clients/" -H "accept: application/json" -H "Token: " -d "{\"name\":\"\",\"nie\":\"\",\"address\":\"\",\"phone\":\"\",\"email\":\"\",\"vip\":\"\",\"vod\":\"\",\"timeshift\":\"\",\"note\":\"\",\"data\":{\"proxyServerId\":\"\",\"tariffId\":\"\"}}"
QUERY PARAMETERS
Field
Type
Description
name
String
The name of the client.
nie
String
(optional) Identification ID of the client.
address
String
(optional) Address of the client.
phone
String
(optional) Phone of the client.
email
String
(optional) E-mail of the client.
vip
Boolean
Set if the client is VIP - do not have end date.
vod
Boolean
Set if the client have permission to watch VOD.
timeshift
Boolean
Set if the client have permission to use Catchup/Timeshift option.
note
String
(optional) Some extra information for this client.
proxyServerId
Integer
ID of proxy server where this client will be connected.
tariffId
Integer
ID of tariff for this client
add device
Base url: /usr/bin/curl -ss -X POST "http://api.dtvsol.info/devices/{clientId}" -H "accept: application/json" -H "Token: " -d "{\"code\":\"\",\"mac\":\"\",\"type\":\"\",\"proxyId\":\"\",\"tariffId\":\"\",\"note\":\"\"}"
QUERY PARAMETERS
Field
Type
Description
code
Integer
(optional) This field is necessary when you add Dtvsol application as device
mac
String
(optional) This field is necessary when you add Dtvsol (old version) application as device.
type
String
You can choose of three type of devices: dtvsol, android, m3u. [dtvsol]-current Dtvsol application, [andorid]-old Dtvsol application, [m3u]-m38 playlist
proxyId
Integer
(optional) ID of proxy server where this device will be connected. If is not set - the system will use proxyId from client information.
tariffId
Integer
(optional) ID of tariff for this device. If is not set - the system will use tariffId from client information.
note
String
(optional) Some extra information for this device.
RETURN PARAMETERS
Field
Type
Description
Result
String
[ok|error] - this field can be "ok" or "error".
errorText
String
(optional) When the result is "error", this field contain information.
deviceId
Integet
(options) When the result is "ok", this field contain the ID of the new generated device
ID of channel - the ID must be from selected pack.
RETURN PARAMETERS
Field
Type
Description
Result
String
[ok|error] - this field can be "ok" or "error".
errorText
String
(optional) When the result is "error", this field contain information.
Errors
The Westeros API uses the following error codes:
Error Code
Meaning
X000
Some parameters are missing. This error appears when you don't pass every mandatory parameters.
X001
Unknown or unvalid secret_key. This error appears if you use an unknow API key or if your API key expired.
X002
Unvalid secret_key for this domain. This error appears if you use an API key non specified for your domain. Developper or Universal API keys doesn't have domain checker.
X003
Unknown or unvalid user token. This error appears if you use an unknow user token or if the user token expired.
Always you must send the token into your HTTP header request:
/usr/bin/curl -ss -X GET "http://api.dtvsol.info/channels/" -H "accept: application/json" -H "Token: "