GET https://api.ucdn.com/v4/account/?token=your-api-token
.
application/json
or
application/x-www-form-urlencoded
.
Content-Type header in the request is required.Name | Type | Description |
---|---|---|
*** | array | All certificates for this account. |
Status | Type | Description |
---|---|---|
200 | array | success message |
curl -X GET "https://api.ucdn.com/v4/certificates/?token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2015 08:03:15 GMT
Server: Apache
X-Powered-By: PHP/5.6.8-pl0-gentoo
X-Cache: hit
Vary: Accept-Encoding
Content-Length: 320
Content-Type: application/json; charset=utf-8
[
{
"id": 18,
"hostname": "cdn.section9.com",
"fingerprint": "3d284b5326388d22f9bfb15600917ebc1dfa96cd",
"used_in_zones": [
{
"zone_id": 1,
"domain": "cdn.section9.com",
"cdn_domain": "a1-121.so.clients.cdn13.com"
}
]
},
{
"id": 35,
"hostname": "cdn3.section9.co.jp",
"fingerprint": "0f382f59b8ee80950c9663042190008927a6012f",
"used_in_zones": []
}
]
Name | Type | Description |
---|---|---|
id | int | The id of this certificate |
fingerprint | string | sha1 of the certificate you've uploaded. |
hostname | string | The hostname this certificate is used with. |
used_in_zones | array | List of all zones which make use of this certificate. |
Status | Type | Description |
---|---|---|
200 | object | success message |
404 | string | certificate did not exists |
curl -X GET "https://api.ucdn.com/v4/certificate/18/?token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2015 08:03:15 GMT
Server: Apache
X-Powered-By: PHP/5.6.8-pl0-gentoo
X-Cache: hit
Vary: Accept-Encoding
Content-Length: 199
Content-Type: application/json; charset=utf-8
{
"id": 18,
"hostname": "cdn.section9.com",
"fingerprint": "3d284b5326388d22f9bfb15600917ebc1dfa96cd",
"used_in_zones": [
{
"zone_id": 1,
"domain": "cdn.section9.com",
"cdn_domain": "a1-121.so.clients.cdn13.com"
}
]
}
Status | Type | Description |
---|---|---|
200 | string | success message |
409 | string | Error message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
certificate | string required | It must be in .pem format. Base64 encoded certificate with BEGIN and END. |
Your certificate in pem format |
|
key | string required | It must be in .pem format. We support only base64 encoded RSA keys. |
Your key in pem format |
|
ca_bundle | string | It must be in .pem format. Base64 encoded with BEGIN and END. |
CA bundle |
curl -X POST "https://api.ucdn.com/v4/certificate/?token=acf0230d03f5b71d7252e336106f7338" --header "Content-Type: application/json" -d '{"key": "-----BEGIN RSA PRIVATE KEY-----\nMIICXAIBAAKBgQDc95uOOiAJNKaoZBvTqIaMjCRVWhGjiZcHkmM+rENyW4xOuai1\nY2WUyj59jYsHzusu31NmaWgNTSzeYhI0oSBPCmitIEDmp7mGzfqadwFlbtQuAsaK\nR2QkvdpTHkPJaiT0N58Isq2J3M2jjwHnX2npYQILxgndWwt+syeXFoDauwIDAQAB\nAoGAEijfRd8NBvSmxawEhW6SMDbMPZ97V59VJDApq9roaBuR+l5TuSSEEqhUXmkl\nhezBc0azSfVbscwn5dbVfDHJv84Y5BcPyvzBqtrUhzO64HPefFICQh6HpE4t/rke\npSl9KeznWpiQqMq5AQwQo1IHeINnXdp7ZLDp9mCGOJV4Y3ECQQDwIL7kM7Q0nhZ/\nOO4yYzL+AMAYvs1hvhR2Ij7bWYuqJ+Pb/8aV8IrjDQMujFcfS2GwKDEPed42oQZl\n79hQjvavAkEA65Kjzck51prvMNdwv1abcq66COXLf8EdyY74QqjrtKknEweQclQs\nihCt0x47O+YiB1zJ/VLpW845EBCfUpbftQJAI7s7rIllD09W2aeHCkholhNWglgi\nB6FZOhrub4Vrmu5Eob/1tOoOQKr3Bj4r2KRG7QeOBVeFEWv0n8aI0bP0UQJBAKY9\n+LzbmaZ59fxIvTc5/j9DUOPAjwicFtJLw6T/Ij9+86U5PFWCU2AnfxOyjOirci4x\n7BWKckYoVRqiMF0PPdUCQEeq3IancNy8/5s7N6PKxEtnJ6G/Odty03pZ5xwSReM9\njBYtqogXMe6BSm9HlVSPYfA8gs4vynFtJlt0Cdc1A/c=\n-----END RSA PRIVATE KEY-----", "certificate": "-----BEGIN CERTIFICATE-----\nMIICLTCCAZYCCQCl/56DTdFTUDANBgkqhkiG9w0BAQUFADBbMQswCQYDVQQGEwJB\nVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0\ncyBQdHkgTHRkMRQwEgYDVQQDDAtleGFtcGxlLmNvbTAeFw0xNTAxMjYxNjIzMTla\nFw0xNjAxMjYxNjIzMTlaMFsxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0\nYXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxFDASBgNVBAMM\nC2V4YW1wbGUuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDc95uOOiAJ\nNKaoZBvTqIaMjCRVWhGjiZcHkmM+rENyW4xOuai1Y2WUyj59jYsHzusu31NmaWgN\nTSzeYhI0oSBPCmitIEDmp7mGzfqadwFlbtQuAsaKR2QkvdpTHkPJaiT0N58Isq2J\n3M2jjwHnX2npYQILxgndWwt+syeXFoDauwIDAQABMA0GCSqGSIb3DQEBBQUAA4GB\nAAEQreWBJw7zReaELu2Pn+IUnXd8N6hJBjp3SX1jCO6LjodjKd33sqyvFvRhZOSg\nevp0wiADmAoVE9jToxPEO5ZxJ1j6dtycog60IRbMGskWeh10m/cUzaKGWYnatYqE\nZsNWvi3ahdovfzM7ukkecn9SDrUD+74+qNIhL6QDqhOD\n-----END CERTIFICATE-----"}'
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2015 08:10:29 GMT
Server: Apache
X-Powered-By: PHP/5.6.8-pl0-gentoo
Vary: Accept-Encoding
Content-Length: 39
Content-Type: application/json; charset=utf-8
{
"message": "Certificate saved",
"id": 41
}
Status | Type | Description |
---|---|---|
200 | string | success message |
404 | string | certificate did not exists |
curl -X DELETE "https://api.ucdn.com/v4/certificate/20/?token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2015 08:10:28 GMT
Server: Apache
X-Powered-By: PHP/5.6.8-pl0-gentoo
Vary: Accept-Encoding
Content-Length: 33
Content-Type: application/json; charset=utf-8
{
"message": "Certificate 43 was deleted"
}
Name | Type | Description |
---|---|---|
bytes_served | int | Bytes served for the requested period |
hits | int | File hits for the requested period |
Status | Type | Description |
---|---|---|
200 | json | data |
400 | json | Fail message |
404 | json | Fail message |
532 | json | Fail message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string | Existing zone name |
Name of the existing zone. |
|
zone_type | string | Valid types: ['objects', 'livestream']. Required when zone_name parameter is given. |
Type of the given zone. |
|
date_from | string | GMT date in format YYYY-MM-DD or a Unix timestamp | 24 hours ago |
From which date to generate the reports. Inclusive. |
date_to | string | GMT date in format YYYY-MM-DD or a Unix timestamp | Now |
To which date to generate the reports. Exclusive. |
curl -X GET "https://api.ucdn.com/v4/reports?zone_name=test-zone&zone_type=objects&date_from=2015-08-12&date_to=2015-08-13&token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Wed, 12 Aug 2015 13:21:34 GMT
Server: Apache
Vary: Accept-Encoding
Content-Length: 49
Content-Type: application/json; charset=utf-8
{
"hits": 72223298971,
"bytes_served": 1031761416566
}
Name | Type | Description |
---|---|---|
bandwidth | json | Json with this structure {timestamp: bandiwdth} (in Mbps). |
Status | Type | Description |
---|---|---|
200 | json | data |
400 | json | Invalid date_from or date_to parameters. |
401 | json | Input parameter problem - invalid token. |
404 | json | Zone with given name does not exists. |
532 | json | Fail message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string | Existing zone name |
Name of the existing zone. |
|
zone_type | string | Valid types: ['objects', 'livestream']. Required when zone_name parameter is given. |
Type of the given zone. |
|
date_from | string | GMT date in format YYYY-MM-DD or a Unix timestamp. The interval between date_from and date_to should be no more than 1 year. | 24 hours ago |
From which date to generate the bandwidth. Inclusive. |
date_to | string | GMT date in format YYYY-MM-DD or a Unix timestamp. Date_to parameter should be no more than 2 month from now. | Now |
To which date to generate the bandwidth. Exclusive. |
curl -X GET 'https://api.ucdn.com/v4/reports/get_bandwidth?date_from=1711539900&date_to=1711549800&zone_name=test_livestream&zone_type=livestream&token=acf0230d03f5b71d7252e336106f7338'
{
"1394571600": 19.29,
"1394571900": 9.29,
"1394572200": 7.00,
"1394572500": 11.35,
"1394572800": 17.65,
"1394573100": 18.21,
"1394573400": 11.14,
"1394573700": 13.32,
"1394574000": 19.84
}
Name | Type | Description |
---|---|---|
elements | json | Json with this structure {date: {region: 95th_percentile_bandwidth}} (in Mbps). |
Status | Type | Description |
---|---|---|
200 | json | data |
400 | json | Invalid region, invalid year or month parameters. |
401 | json | Input parameter problem - invalid token. |
532 | json | Fail message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
year | int required | Positive year. |
For which year to generate the bandwidth. Inclusive. |
|
month | int | Positive month between 1-12. | Whole year. |
For which month to generate the bandwidth. Exclusive. |
region | string | Valid regions: europe, united-states, asia, asia-pacific, asia-west. | All regions. |
For which region to generate the bandwidth. Exclusive. |
curl -X GET 'https://api.ucdn.com/v4/reports/get_bandwidth_95th?year=2024&month=01&token=acf0230d03f5b71d7252e336106f7338'
{
"2024-01": {
"Asia-Pacific": "16.44",
"Asia": "15.94",
"United States": "8.39",
"Europe": "12.47"
}
}
Name | Type | Description |
---|---|---|
elements | array | An array with the generated data. Every element in the array represents a time slot. See the `element_description` field for information on what it is made of. |
element_duration | int | Lenght of tht time interval for each element. In seconds. |
element_description | array | Every element in `elements` is an array of values. This fields says what does each value in an element mean. |
Status | Type | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
from | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | 24 hours ago |
From which date to generate the reports |
to | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | now |
To which date to generate the reports |
zones | string | A zone name or a list of zone names separated with comma. Example: test-zone,test-zone-1. Required when zones_type parameter is given. | All zones for this account |
Names of the existing zone. This way a report for a particular zone or group of zones can be made. |
zones_type | string | Valid types: ['objects', 'livestream']. Required when zones parameter is given. |
Type of the given zone. |
|
by | string | One of to following: 5min, hour, day | day |
Group the reported elements in slots with particular time length. |
curl -X GET 'https://api.ucdn.com/v4/reports/bytes/ssl?from=2021-01-03&to=2024-01-03&zones_type=objects&zones=test-zone&token=acf0230d03f5b71d7252e336106f7338'
{
"element_description": [
"unix timestamp of the time slot start",
"bytes served in this time slot"
],
"element_duration": 3600,
"elements": [
[
1609632000,
0
],
[
1609635600,
0
],
[
1609639200,
0
],
[
1609642800,
0
],
[
1609646400,
0
],
[
1609650000,
0
],
[
1609653600,
0
],
[
1609657200,
0
],
[
1609660800,
0
],
[
1609664400,
0
],
[
1609668000,
0
],
[
1609671600,
0
],
[
1609675200,
0
],
[
1609678800,
0
]
]
}
Name | Type | Description |
---|---|---|
elements | array | An array with the generated data. Every element in the array represents a time slot. See the `element_description` field for information on what it is made of. |
element_duration | int | Lenght of tht time interval for each element. In seconds. |
element_description | array | Every element in `elements` is an array of values. This fields says what does each value in an element mean. |
Status | Type | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
from | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | 24 hours ago |
From which date to generate the reports |
to | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | now |
To which date to generate the reports |
by | string | One of to following: 5min, hour, day | day |
Group the reported elements in slots with particular time length. |
zones | string | A zone name or a list of zone names separated with comma. Example: test-zone,test-zone-1. Required when zones_type parameter is given. | All zones for this account |
Names of the existing zone. This way a report for a particular zone or group of zones can be made. |
zones_type | string | Valid types: ['objects', 'livestream']. Required when zones parameter is given. |
Type of the given zone. |
curl -X GET 'https://api.ucdn.com/v4/reports/hits/ssl?from=2021-01-03&to=2024-01-03&zones_type=objects&zones=test-zone&token=acf0230d03f5b71d7252e336106f7338'
{
"element_description": [
"unix timestamp of the time slot start",
"bytes served in this time slot"
],
"element_duration": 3600,
"elements": [
[
1609632000,
0
],
[
1609635600,
0
],
[
1609639200,
0
],
[
1609642800,
0
],
[
1609646400,
0
],
[
1609650000,
0
],
[
1609653600,
0
],
[
1609657200,
0
],
[
1609660800,
0
],
[
1609664400,
0
],
[
1609668000,
0
],
[
1609671600,
0
],
[
1609675200,
0
],
[
1609678800,
0
]
]
}
Name | Type | Description |
---|---|---|
elements | array | An array with the generated data. Every element in the array represents a time slot. See the `element_description` field for information on what it is made of. |
element_duration | int | Lenght of tht time interval for each element. In seconds. |
element_description | array | Every element in `elements` is an array of values. This fields says what does each value in an element mean. |
Status | Type | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
from | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | 24 hours ago |
From which date to generate the reports |
to | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | now |
To which date to generate the reports |
by | string | One of to following: 5min, hour, day | day |
Group the reported elements in slots with particular time length. |
zones | string | A zone names or a list of zone names separated with comma. Example: test-zone,test-zone-1. Required when zones_type parameter is given. | All zones for this account |
Names of the existing zone. This way a report for a particular zone or group of zones can be made. |
zones_type | string | Valid types: ['objects',livestream]. Required when zones parameter is given. |
Type of the given zone. |
curl -X GET "https://api.ucdn.com/v4/reports/bytes/?from=2015-08-12&to=2015-08-13&token=acf0230d03f5b71d7252e336106f7338&zones=test-zone,test-zone-1"
HTTP/1.1 200 OK
Date: Wed, 12 Aug 2015 13:21:35 GMT
Server: Apache
Vary: Accept-Encoding
Content-Length: 602
Content-Type: application/json; charset=utf-8
{
"element_description": [
"unix timestamp of the time slot start",
"bytes served in this time slot"
],
"element_duration": 3600,
"elements": [
[
1439337600,
0
],
[
1439341200,
105885510745
],
[
1439344800,
114271292947
],
[
1439348400,
124036006918
],
[
1439352000,
120396189741
],
[
1439355600,
101645584874
],
[
1439359200,
80206732783
],
[
1439362800,
69543285192
],
[
1439366400,
68522904965
],
[
1439370000,
73195626735
],
[
1439373600,
67897186868
],
[
1439377200,
0
],
[
1439380800,
0
],
[
1439384400,
0
],
[
1439388000,
0
],
[
1439391600,
0
],
[
1439395200,
0
],
[
1439398800,
0
],
[
1439402400,
0
],
[
1439406000,
0
],
[
1439409600,
0
],
[
1439413200,
0
],
[
1439416800,
0
],
[
1439420400,
0
]
]
}
Name | Type | Description |
---|---|---|
elements | object | A key-value pairs. The key in the pair is a ISO 3166-1 country code. The value of an array with the generated data. Every element in the array represents a time slot. See the `element_description` field for information on what it is made of. |
element_duration | int | Lenght of tht time interval for each element. In seconds. |
element_description | array | Every element in `elements` is an array of values. This fields says what does each value in an element mean. |
Status | Type | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
from | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | 24 hours ago |
From which date to generate the reports |
to | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | now |
To which date to generate the reports |
countries | string | Comma separated list of countries. Every country must be represented by a ISO 3166-1 country code. Examples: 'bg,vn,ru' | All countries. |
List of countries for which to show statistics. |
zones | string | A zone name or a list of zone names separated with comma. Example: test-zone,test-zone-1. Required when zones_type parameter is given. | All zones for this account |
Names of the existing zone. This way a report for a particular zone or group of zones can be made. |
zones_type | string | Valid types: ['objects', 'livestream']. Required when zones parameter is given. |
Type of the given zone. |
curl -X GET "https://api.ucdn.com/v4/reports/countries?from=2021-01-03&to=2024-01-03&zones_type=objects&zones=test-zone&token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Wed, 12 Aug 2015 11:04:50 GMT
Server: Apache
Vary: Accept-Encoding
Content-Length: 4406
Content-Type: application/json; charset=utf-8
{
"element_description": [
"unix timestamp of the time slot start",
"hits from this country",
"bytes served to this country"
],
"element_duration": 86400,
"elements": {
"CH": [
[
1439290800,
0,
0
],
[
1439294400,
384465,
19224985
],
[
1439298000,
373860,
18694275
],
[
1439301600,
367775,
18390470
]
],
"GB": [
[
1439290800,
0,
0
],
[
1439294400,
427190,
21361100
],
[
1439298000,
415390,
20771405
],
[
1439301600,
408645,
20433865
],
[
1439305200,
407865,
20394660
],
[
1439308800,
415540,
20778725
],
[
1439312400,
439510,
21977240
],
[
1439316000,
476520,
23827165
],
[
1439319600,
515800,
25791430
],
[
1439323200,
531010,
26551560
]
],
"MX": [
[
1439290800,
0,
0
],
[
1439294400,
261435,
13072990
],
[
1439298000,
254210,
12712090
],
[
1439301600,
250090,
12505515
]
],
"RU": [
[
1439290800,
0,
0
]
],
"US": [
[
1439290800,
0,
0
],
[
1439294400,
449685,
22485365
],
[
1439298000,
437260,
21864645
],
[
1439301600,
430150,
21509335
],
[
1439305200,
429335,
21468070
]
],
"VN": [
[
1439290800,
0,
0
],
[
1439294400,
196060,
9804735
],
[
1439298000,
190655,
9534070
],
[
1439301600,
187550,
9379120
],
[
1439305200,
187185,
9361135
]
]
}
}
Name | Type | Description |
---|---|---|
elements | array | An array with the generated data. Every element in the array represents a time slot. See the `element_description` field for information on what it is made of. |
element_duration | int | Lenght of tht time interval for each element. In seconds. |
element_description | array | Every element in `elements` is an array of values. This fields says what does each value in an element mean. |
Status | Type | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
from | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | 24 hours ago |
From which date to generate the reports |
to | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | now |
To which date to generate the reports |
by | string | Only one possible value is supported for now: hour | hour |
Group the reported elements in slots with particular time length. |
curl -X GET "https://api.ucdn.com/v4/reports/storages/?from=2015-08-12&to=2015-08-13&by=hour&token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Wed, 12 Aug 2015 11:04:52 GMT
Server: Apache
Vary: Accept-Encoding
Content-Length: 698
Content-Type: application/json; charset=utf-8
{
"element_description": [
"unix timestamp of the time slot start",
"used size in bytes"
],
"element_duration": 3600,
"elements": [
[
1439290800,
0
],
[
1439294400,
2887995255
],
[
1439298000,
2887995255
],
[
1439301600,
2887995255
],
[
1439305200,
2887995255
],
[
1439308800,
2887995255
],
[
1439312400,
2887995255
],
[
1439316000,
2887995255
],
[
1439319600,
2887995255
],
[
1439323200,
2887995255
],
[
1439326800,
2887995255
],
[
1439330400,
2887995255
],
[
1439334000,
2887995255
],
[
1439337600,
2887995255
],
[
1439341200,
2887995255
],
[
1439344800,
2887995255
],
[
1439348400,
2887995255
],
[
1439352000,
2887995255
],
[
1439355600,
2887995255
],
[
1439359200,
2887995255
],
[
1439362800,
2887995255
],
[
1439366400,
2887995255
],
[
1439370000,
2887995255
],
[
1439373600,
0
],
[
1439377200,
0
]
]
}
Name | Type | Description |
---|---|---|
elements | object | A key-value pairs. The key in the pair is a HTTP status code. The value of an array with the generated data. Every element in the array represents a time slot. See the `element_description` field for information on what it is made of. |
element_duration | int | Lenght of tht time interval for each element. In seconds. |
element_description | array | Every element in `elements` is an array of values. This fields says what does each value in an element mean. |
Status | Type | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
from | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | 24 hours ago |
From which date to generate the reports |
to | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | now |
To which date to generate the reports |
by | string | One of to following: 5min, hour, day | day |
Group the reported elements in slots with particular time length. |
code | string | Integer. Represents a HTTP status code between 100 and 599. | All status codes. |
Show staistics for particular HTTP status code. |
zones | string | A zone name or a list of zone names separated with comma. Example: test-zone,test-zone-1. Required when zones_type parameter is given. | All zones for this account |
Names of the existing zone. This way a report for a particular zone or group of zones can be made. |
zones_type | string | Valid types: ['objects', 'livestream']. Required when zones parameter is given. |
Type of the given zone. |
curl -X GET "https://api.ucdn.com/v4/reports/status/codes/?from=2015-08-12&to=2015-08-13&token=acf0230d03f5b71d7252e336106f7338&code=404"
HTTP/1.1 200 OK
Date: Wed, 12 Aug 2015 13:21:34 GMT
Server: Apache
Vary: Accept-Encoding
Content-Length: 643
Content-Type: application/json; charset=utf-8
{
"element_description": [
"unix timestamp of the time slot start",
"hits",
"percents of all"
],
"element_duration": 3600,
"elements": {
"404": [
[
1439337600,
0,
0
],
[
1439341200,
181058,
0
],
[
1439344800,
195398,
0
],
[
1439348400,
212096,
0
],
[
1439352000,
205871,
0
],
[
1439355600,
173808,
0
],
[
1439359200,
137148,
0
],
[
1439362800,
118913,
0
],
[
1439366400,
117169,
0
],
[
1439370000,
125157,
0
],
[
1439373600,
116099,
0
],
[
1439377200,
0,
0
],
[
1439380800,
0,
0
],
[
1439384400,
0,
0
],
[
1439388000,
0,
0
],
[
1439391600,
0,
0
],
[
1439395200,
0,
0
],
[
1439398800,
0,
0
],
[
1439402400,
0,
0
],
[
1439406000,
0,
0
],
[
1439409600,
0,
0
],
[
1439413200,
0,
0
],
[
1439416800,
0,
0
],
[
1439420400,
0,
0
]
]
}
}
Name | Type | Description |
---|---|---|
elements | array | An array with the generated data. Every element in the array represents a time slot. See the `element_description` field for information on what it is made of. |
element_duration | int | Lenght of tht time interval for each element. In seconds. |
element_description | array | Every element in `elements` is an array of values. This fields says what does each value in an element mean. |
Status | Type | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
from | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | 24 hours ago |
From which date to generate the reports |
to | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | now |
To which date to generate the reports |
by | string | One of to following: 5min, hour, day | day |
Group the reported elements in slots with particular time length. |
zones | string | A zone name or a list of zone names separated with comma. Example: test-zone,test-zone-1. Required when zones_type parameter is given. | All zones for this account |
Names of the existing zone. This way a report for a particular zone or group of zones can be made. |
zones_type | string | Valid types: ['objects', 'livestream']. Required when zones parameter is given. |
Type of the given zone. |
curl -X GET "https://api.ucdn.com/v4/reports/hits?from=2021-01-03&to=2024-01-03&zones_type=objects&zones=test-zone&token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Wed, 12 Aug 2015 11:04:50 GMT
Server: Apache
Vary: Accept-Encoding
Content-Length: 602
Content-Type: application/json; charset=utf-8
{
"element_description": [
"unix timestamp of the time slot start",
"hits"
],
"element_duration": 3600,
"elements": [
[
1439290800,
0
],
[
1439294400,
739857
],
[
1439298000,
719431
],
[
1439301600,
707736
],
[
1439305200,
706384
],
[
1439308800,
719685
],
[
1439312400,
761199
],
[
1439316000,
825275
],
[
1439319600,
893314
],
[
1439323200,
919642
],
[
1439326800,
984416
],
[
1439330400,
962014
],
[
1439334000,
919178
],
[
1439337600,
873281
],
[
1439341200,
871015
],
[
1439344800,
939998
],
[
1439348400,
1020329
],
[
1439352000,
990386
],
[
1439355600,
836136
],
[
1439359200,
659778
],
[
1439362800,
572053
],
[
1439366400,
563661
],
[
1439370000,
602095
],
[
1439373600,
558520
],
[
1439377200,
0
]
]
}
Name | Type | Description |
---|---|---|
elements | array | An array with the generated data. Every element in the array represents a time slot. See the `element_description` field for information on what it is made of. |
element_duration | int | Lenght of tht time interval for each element. In seconds. |
element_description | array | Every element in `elements` is an array of values. This fields says what does each value in an element mean. |
Status | Type | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
from | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | 24 hours ago |
From which date to generate the reports |
to | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | now |
To which date to generate the reports |
by | string | One of to following: 5min, hour, day | day |
Group the reported elements in slots with particular time length. |
zones | string | A zone name or a list of zone names separated with comma. Example: test-zone,test-zone-1. Required when zones_type parameter is given. | All zones for this account |
Names of the existing zone. This way a report for a particular zone or group of zones can be made. |
zone_type | string |
Type of the given zone. |
||
zones_type | Valid types: ['objects', 'livestream']. Required when zones parameter is given. |
|
curl -X GET 'https://api.ucdn.com/v4/reports/hits/http2?from=2021-01-03&to=2024-01-03&zones_type=objects&zones=test-zone&token=acf0230d03f5b71d7252e336106f7338'
{
"element_description": [
"unix timestamp of the time slot start",
"bytes served in this time slot"
],
"element_duration": 3600,
"elements": [
[
1609632000,
0
],
[
1609635600,
0
],
[
1609639200,
0
],
[
1609642800,
0
],
[
1609646400,
0
],
[
1609650000,
0
],
[
1609653600,
0
],
[
1609657200,
0
],
[
1609660800,
0
],
[
1609664400,
0
],
[
1609668000,
0
],
[
1609671600,
0
],
[
1609675200,
0
],
[
1609678800,
0
]
]
}
Name | Type | Description |
---|---|---|
elements | array | An array with the generated data. Every element in the array represents a time slot. See the `element_description` field for information on what it is made of. |
element_duration | int | Lenght of tht time interval for each element. In seconds. |
element_description | array | Every element in `elements` is an array of values. This fields says what does each value in an element mean. |
Status | Type | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
from | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | 24 hours ago |
From which date to generate the reports |
to | string | Valid formats are: YYYY-MM-DD HH:mm with optional timezone parameter or a Unix timestamp. Examples: 2014-03-12 15:32 GMT+3, 1394571600 | now |
To which date to generate the reports |
zones | string | A zone name or a list of zone names separated with comma. Example: test-zone,test-zone-1. Required when zones_type parameter is given. | All zones for this account |
Filter output for user zones. This way a report for particular zone or a group of zones can be made. |
zones_type | string | Valid types: ['objects', 'livestream']. Required when zones parameter is given. |
Type of the given zone. |
|
by | string | One of to following: 5min, hour, day | day |
Group the reported elements in slots with particular time length. |
curl -k -X GET 'https://api.ucdn.com/v4/reports/bytes/http2?from=2021-01-03&to=2024-01-03&zones_type=objects&zones=test-zone&token=acf0230d03f5b71d7252e336106f7338'
{
"element_description": [
"unix timestamp of the time slot start",
"bytes served in this time slot"
],
"element_duration": 3600,
"elements": [
[
1609632000,
0
],
[
1609635600,
0
],
[
1609639200,
0
],
[
1609642800,
0
],
[
1609646400,
0
],
[
1609650000,
0
],
[
1609653600,
0
],
[
1609657200,
0
],
[
1609660800,
0
],
[
1609664400,
0
],
[
1609668000,
0
],
[
1609671600,
0
],
[
1609675200,
0
],
[
1609678800,
0
]
]
}
Name | Type | Description |
---|---|---|
job_id | string | The ID of the newly created purge job |
Status | Type | Description |
---|---|---|
204 | json | Success message |
532 | json | Fail message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | required string | Existing zone name. Required when zone_type parameter is given. |
Name of the existing zone. |
|
zone_type | required string | Valid types: ['objects', 'livestream']. Required when zone_name parameter is given. |
Type of the given zone. |
|
files | string | You can use either http://example.com/dir/file.txt or /dir/file.txt |
A list of files separated by a new line |
curl --include --request POST "https://api.ucdn.com/v4/purge/zone?zone_name=test-zone&zone_type=objects&token=acf0230d03f5b71d7252e336106f7338" --header "Content-Type: application/json" -d '{"files":"/example/logo.png\n/second/file"}'
HTTP/1.1 200 OK
Date: Wed, 12 Aug 2015 13:21:34 GMT
Server: Apache
Vary: Accept-Encoding
Content-Length: 80
Content-Type: application/json; charset=utf-8
{
"message": "Purge request received",
"job_id": "3cfb478531097f1830056a828752cbdd"
}
Name | Type | Description |
---|---|---|
job_id | string | The ID of this purge job |
files | array | List of a file which make up this purge job |
status | string | The status of this purge job. It can be "waiting", "running", "finished" or "failed" |
created_at | int | The time this job was created in Unix timestamp |
Status | Type | Description |
---|---|---|
200 | string | Success message |
532 | string | Fail message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
job_id | string | - |
A purge job id as returned by the job creation call |
curl --include "https://api.ucdn.com/v4/purge/job/2170dd23decc45691adf28987282d0bc/?token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Wed, 12 Aug 2015 13:21:33 GMT
Server: Apache
Vary: Accept-Encoding
Content-Length: 210
Content-Type: application/json; charset=utf-8
{
"job_id": "2170dd23decc45691adf28987282d0bc",
"files": [
"http:\/\/a1-121.so.clients.cdn13.com\/example\/logo.png",
"http:\/\/a1-121.so.clients.cdn13.com\/second\/file"
],
"status": "finished",
"created_at": 1435318980
}
Status | Type | Description |
---|---|---|
200 | array | Array with purge jobs |
532 | string | Fail message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
status | required string | Supported values are "waiting", "running", "finished" and "failed" | Will show "waiting", "running" and "failed" purge jobs only |
Return only purge jobs which are in this status. |
count | integer | Positive integer less or equal to 500 | 20 |
How many purge jobs to return |
curl --include "https://api.ucdn.com/v4/purge/?status=finished&token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Wed, 12 Aug 2015 13:21:33 GMT
Server: Apache
Vary: Accept-Encoding
Content-Length: 1900
Content-Type: application/json; charset=utf-8
[
{
"job_id": "ed74f89ab1469b4942fa6fee32832c31",
"files": [
"http:\/\/a1-121.so.clients.cdn13.com\/example\/logo.png",
"http:\/\/a1-121.so.clients.cdn13.com\/second\/file"
],
"status": "finished",
"created_at": 1439377493
},
{
"job_id": "58432bcd7c38551ab1c3552315962a39",
"files": [
"http:\/\/a1-121.so.clients.cdn13.com\/example\/logo.png",
"http:\/\/a1-121.so.clients.cdn13.com\/second\/file"
],
"status": "finished",
"created_at": 1435565013
},
{
"job_id": "ae2f114aa4ee1940fe960a2dca2d2d4d",
"files": [
"http:\/\/a1-121.so.clients.cdn13.com\/example\/logo.png",
"http:\/\/a1-121.so.clients.cdn13.com\/second\/file"
],
"status": "finished",
"created_at": 1435564159
},
{
"job_id": "e2a311eaaf6408621c6ba10d37b0a17f",
"files": [
"http:\/\/a1-121.so.clients.cdn13.com\/example\/logo.png",
"http:\/\/a1-121.so.clients.cdn13.com\/second\/file"
],
"status": "finished",
"created_at": 1435564105
},
{
"job_id": "2170dd23decc45691adf28987282d0bc",
"files": [
"http:\/\/a1-121.so.clients.cdn13.com\/example\/logo.png",
"http:\/\/a1-121.so.clients.cdn13.com\/second\/file"
],
"status": "finished",
"created_at": 1435318980
},
{
"job_id": "cd704ed605964e55a2a3c64162f94b05",
"files": [
"http:\/\/a1-121.so.clients.cdn13.com\/example\/logo.png",
"http:\/\/a1-121.so.clients.cdn13.com\/second\/file"
],
"status": "finished",
"created_at": 1435317428
},
{
"job_id": "a301e0571b0402a5fca1b6271612612b",
"files": [
"http:\/\/a1-121.so.clients.cdn13.com\/example\/logo.png",
"http:\/\/a1-121.so.clients.cdn13.com\/second\/file"
],
"status": "finished",
"created_at": 1435317395
},
{
"job_id": "9dfb57172bbbdc33abeb66862bb995d4",
"files": [
"http:\/\/a1-121.so.clients.cdn13.com\/example\/logo.png",
"http:\/\/a1-121.so.clients.cdn13.com\/second\/file"
],
"status": "finished",
"created_at": 1435317350
},
{
"job_id": "72709f187f5b5759d1db5055ac3c1340",
"files": [
"http:\/\/a1-121.so.clients.cdn13.com\/example\/logo.png",
"http:\/\/a1-121.so.clients.cdn13.com\/second\/file"
],
"status": "finished",
"created_at": 1435317296
}
]
Status | Type | Description |
---|---|---|
200 | string | Success message |
532 | string | Fail message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
job_id | string | - |
A purge job id as returned by the job creation call |
curl --include --request DELETE "https://api.ucdn.com/v4/purge/job/cd704ed605964e55a2a3c64162f94b05/?token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Wed, 12 Aug 2015 13:21:40 GMT
Server: Apache
Vary: Accept-Encoding
Content-Length: 39
Content-Type: application/json; charset=utf-8
{
"message": "The purge job was removed"
}
Name | Type | Description |
---|---|---|
id | int | The id of the created storage |
status | string | Operation success message |
Status | Type | Description |
---|---|---|
200 | json | Message for successful creation |
532 | json | Error message |
504 | json | Storage backend failed |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
name | string required | At least 3 characters long identifier. |
Name wihch will be used for the swift container. |
|
region | string required | "europe" or "north-america". |
The geographical region of this container. |
curl -X POST "https://api.ucdn.com/v4/storage/?token=acf0230d03f5b71d7252e336106f7338" --header "Content-Type: application/json" -d '{"region":"north-america", "name": "level-4-logs"}'
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2015 08:10:29 GMT
Server: Apache
X-Powered-By: PHP/5.6.8-pl0-gentoo
Vary: Accept-Encoding
Content-Length: 36
Content-Type: application/json; charset=utf-8
{
"message": "Storage Created",
"id": 3
}
Name | Type | Description |
---|---|---|
id | int | The identificator of this storage instance |
container | string | The name of this storage |
ftp_host | string | FTP host for this storage |
ftp_user | string | FTP user for this storage |
ftp_password | string | FTP password for this storage |
region | string | The geo region this storage is in |
synchronized_with_storage | string | Id of a storage which is synchronized with this one (if there is one). |
Status | Type | Description |
---|---|---|
200 | array | Array with information for all storages |
532 | json | Error message |
curl -X GET "https://api.ucdn.com/v4/storages/?token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2015 08:03:11 GMT
Server: Apache
X-Powered-By: PHP/5.3.10-1ubuntu3.16
X-Cache: miss
Vary: Accept-Encoding
Content-Length: 388
Content-Type: application/json; charset=utf-8
[
{
"id": 2,
"container": "despensable",
"ftp_host": "europe.upload.cdn13.com",
"ftp_user": "1000121.1000121",
"ftp_password": "ftppassword",
"region": "europe",
"synchronized_with_storage": null
},
{
"id": 1,
"container": "level-3-logs",
"ftp_host": "north-america.upload.cdn13.com",
"ftp_user": "1000121.1000121",
"ftp_password": "ftppassword",
"region": "north-america",
"synchronized_with_storage": null
}
]
Name | Type | Description |
---|---|---|
new_ftp_password | string | The new FTP password which must be used with storages in the patched region. Will be returned only if the `action` request parameter is "change_ftp_password". |
message | string | Success message |
Status | Type | Description |
---|---|---|
200 | object | Relevant information for the successful `action` |
400 | string | Something wrong with the request |
409 | string | Insufficient parameters |
504 | string | Storage backend errors |
532 | string | Fail message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
region | string required | "europe" or "north-america". |
The region in which storages will be patched. |
|
action | string required | Only "change_ftp_password" is supported for now. With it, all storages in the region will have their FTP passwords changed. |
Tells what will this reconfiguration do. |
curl -X PATCH "https://api.ucdn.com/v4/storages/?token=acf0230d03f5b71d7252e336106f7338" --header "Content-Type: application/json" -d '{"action":"change_ftp_password", "region": "north-america"}'
HTTP/1.1 200 OK
Date: Tue, 24 Nov 2015 11:03:39 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.14
Content-Length: 41
Content-Type: application/json; charset=utf-8
{
"new_ftp_password": "dd9028f5f3ed79408e"
}
Name | Type | Description |
---|---|---|
id | int | The identificator of this storage instance |
container | string | The name of this storage |
ftp_host | string | FTP host for this storage |
ftp_user | string | FTP user for this storage |
ftp_password | string | FTP password for this storage |
region | string | The geo region this storage is in |
synchronized_with_storage | string | Id of a storage which is synchronized with this one (if there is one). |
Status | Type | Description |
---|---|---|
200 | json | Information for this storage |
404 | json | No active storage found message |
532 | json | Error message |
curl -X GET "https://api.ucdn.com/v4/storage/1/?token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2015 08:03:12 GMT
Server: Apache
X-Powered-By: PHP/5.6.8-pl0-gentoo
X-Cache: hit
Vary: Accept-Encoding
Content-Length: 200
Content-Type: application/json; charset=utf-8
{
"id": 1,
"container": "level-3-logs",
"ftp_host": "north-america.upload.cdn13.com",
"ftp_user": "1000121.1000121",
"ftp_password": "ftppassword",
"region": "north-america",
"synchronized_with_storage": null
}
Name | Type | Description |
---|---|---|
bytes | int | Number of bytes consumed on this storage |
objects | int | Number of files and folders on this storage |
Status | Type | Description |
---|---|---|
200 | json | Consumed size |
404 | json | No active storage found message |
532 | json | Error message |
curl -X GET "https://api.ucdn.com/v4/storage/1/size/?token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2015 08:03:11 GMT
Server: Apache
X-Powered-By: PHP/5.3.10-1ubuntu3.16
X-Cache: miss
Vary: Accept-Encoding
Content-Length: 23
Content-Type: application/json; charset=utf-8
{
"bytes": 0,
"objects": 0
}
Status | Type | Description |
---|---|---|
200 | json | Message for successful deletion |
404 | json | No active storage found message |
532 | json | Error message |
504 | json | Storage backend failed |
curl -X DELETE "https://api.ucdn.com/v4/storage/2/?token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2015 08:10:35 GMT
Server: Apache
X-Powered-By: PHP/5.6.8-pl0-gentoo
Vary: Accept-Encoding
Content-Length: 33
Content-Type: application/json; charset=utf-8
{
"message": "Storage was deleted"
}
Name | Type | Description |
---|---|---|
authenticated | bool | True if the credentials are valid or false otherwise |
user_id | int | The user ID of the user for which the credentials matched. Only present in successful logins. |
reason | string | Huaman readable sentence explaining the result from this call |
token | string | The token for this user needed for authenticating against the Public API. Only present in successful logins. |
Status | Type | Description |
---|---|---|
200 | string | Message |
401 | string | Invalid login credentials |
532 | string | An error message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
string required | The email with which this user has been registered |
Email supplied by the user |
||
password | string required | The password for this user |
Password supplied by the user |
curl -X POST "https://api.ucdn.com/v4/check/login/" --header "Content-Type: application/json" -d '{"email":"major@section9.co.jp", "password": "password"}'
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2015 08:03:16 GMT
Server: Apache
X-Powered-By: PHP/5.6.8-pl0-gentoo
Vary: Accept-Encoding
Content-Length: 118
Content-Type: application/json; charset=utf-8
{
"authenticated": true,
"user_id": 121,
"reason": "Login credentials are valid",
"token": "acf0230d03f5b71d7252e336106f7338"
}
Name | Type | Description |
---|---|---|
id | int | Your unique user ID |
username | string | Your username |
name | string | Your name |
string | This account contact email | |
timezone | string | Timezone for the Control Panel reports |
trial | int | Whether this account is part of the UCDN Free trial program |
Status | Type | Description |
---|---|---|
200 | object | Account Information |
curl -X GET "https://api.ucdn.com/v4/account/?token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2015 08:03:08 GMT
Server: Apache
X-Powered-By: PHP/5.3.10-1ubuntu3.16
X-Cache: miss
Vary: Accept-Encoding
Content-Length: 127
Content-Type: application/json; charset=utf-8
{
"id": "121",
"username": "kusanagi",
"email": "major@section9.co.jp",
"name": "Motoko Kusanagi",
"timezone": "Asia\/Tokyo",
"trial": "0"
}
Status | Type | Description |
---|---|---|
200 | object | Account Information |
curl -X GET "https://api.ucdn.com/v4/subaccounts/?token=acf0230d03f5b71d7252e336106f7338"
{
"address" : null,
"api_key" : "acf0230d03f5b71d7252e336106f7338",
"api_secret" : "e2425f9c4df5614821009bce90cc384a",
"billing_currency" : "USD",
"billing_methodology" : "bandwidth",
"bonus_balance" : "0.00000000",
"cache_objects" : "873813",
"cache_quota" : "0",
"can_be_suspend" : "1",
"check_origin" : "1",
"city" : null,
"company_name" : null,
"company_type" : "corporate",
"confirmed_mail" : "1",
"country" : null,
"create_ts" : "1708416831",
"delete_ts" : "0",
"domain_base" : "cdn13.com",
"email" : "test_email@gmail.com",
"expiration_2fa" : null,
"first_name" : null,
"id" : "13956",
"l2_cache_objects" : "500000",
"l2_cache_objects_small" : "1000000",
"l2_cache_quota" : "0",
"l2_cache_quota_small" : "0",
"l3_cache_objects" : "1000000",
"l3_cache_objects_small" : "2000000",
"l3_cache_quota" : "0",
"l3_cache_quota_small" : "0",
"last_name" : null,
"last_updated" : "2024-02-20 08:13:51",
"manager_id" : "0",
"max_zones" : "512",
"name" : "test123",
"notes" : null,
"origin_quota" : "0",
"parent_id" : "13863",
"password" : "$2y$11$y6NtNjdaeTKKx.SGAPbjm.qhECzOI5KVNcaCDxkLaHOfaeTDWbYMu",
"payment_method" : "9",
"secret_key_2fa" : null,
"state" : null,
"status" : "active",
"storage_price" : "0.000000",
"suspended" : "0",
"suspended_for_payment" : "0",
"tax_info" : null,
"timezone" : "Europe/London",
"traffic_bps" : "0",
"trial" : "0",
"type_2fa" : null,
"type_switch_ts" : "0",
"update_ts" : "1708416831",
"username" : "test123",
"zip_code" : null
}
Name | Type | Description |
---|---|---|
zone_name | string | The newly created zone's name |
Status | Type | Description |
---|---|---|
200 | string | A message for successfully created zone and it's name. |
400 | string | An error message. Problem with parameters. |
401 | string | An error message. Problem with the authentication. Invalid token. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_config | array required | Valid JSON structure |
This parameter is required. All parameters are described below. |
Parameter | Type | Description |
---|---|---|
name | string | Name of the zone. Limitations: string, 1-30 characters: a-z, A-Z, 0-9, -, _. There cannot be two or more zones with the same names. (required parameter) |
cnames | array of strings | If not specified, it is set to null. Represents an array of strings, where each element represents a domain. (optional parameter) |
location_of_files | structure | The location_of_files structure specify the location of files. To cache resources, the CDN network needs to fetch and cache the resources from the specified backend server. There are three options - ucdn_storage, custom_location, aws_s3. Only one of these options should be selected. (required structure) |
limit_access | structure | Contains all access limits that can be imposed. (optional structure) |
cache | structure | The cache structure manage caching resources, in order to improve performance. Resources can be cached for a long period of time. Also there is an option for reusing cache from other zone. (optional structure) |
limit_download_speed | structure | With the limit_download_speed structure maxmimum bandwidth can be limited. There are two options - limit by constant rate or limit by URL parameter cdn_bw. Only one of these options should be selected. (optional structure) |
error_pages | structure | The error_pages structure represents urls for pages when error occured. (optional structure) |
cors | structure | Describing the CORS setting for the zone. If not provided, it is sent with a null value. (optional structure) |
Parameter | Type | Description |
---|---|---|
ucdn_storage | structure | It is used when the files are located in UCDN storage. (optional parameter) |
custom_location | structure | It is used when the files are not located in UCDN storage, but in some other location. (optional parameter) |
aws_s3 | structure | Used when you use AWS services and our files are there. (optional parameter) |
Parameter | Type | Description |
---|---|---|
storage_name | string | Represents the name of an existing storage to the user's account. This is the name of the storage where the files are stored. Validations: Must be an existing storage name and no longer than 32 characters. (required parameter) |
region | string | It is used when we have two storages with the same name and different regions. Valid values: “north-america|europe”. (optional parameter) |
Parameter | Type | Description |
---|---|---|
protocol | string | If not selected, it is saved with the default value - "HTTP". Possible values - “HTTP|HTTPS”. Represents the protocol that the domains use. (optional parameter) |
files_at | struct | Contains urls of the locations from where the files will be fetched. (required parameter) |
http_authentication | struct | It is used if the location of the files requires authentication. (optional parameter) |
access_origin_host_header | struct | It is used when different header is needed to access the files. (optional parameter) |
Parameter | Type | Description |
---|---|---|
primary_urls | array of struct | It represents an array of structures. Example: {“first-domain.com”: {“port”: “80”, “weight”: “100”}, “174.202.97.102”: {“port”: “90”, “weight”: “80”}}. The given domain is used as the key of a given structure, and it must be unique regardless of port and weight. If port is not set, it is set with the default value - 80 (If the protocol is HTTPS, then the default value is 443). Validations: port must be between 1 and 65535 inclusive. If weight is not set, it is set with a default value of 100. If you want to set both params with default values - use {} (example: {“first-domain.com”: {}}). Validations: weight must be an integer between 1-100. To remove an origin, ensure it is not the last of primary type. If it is, consider creating a new primary origin before deletion. For now if you want to edit an origin you should delete and recreate it with the new domain. When modifying the last primary origin - you should first create new origin and then delete the old one. (required parameter) |
backup_urls | array of struct | Same as primary_urls parameter. |
Parameter | Type | Description |
---|---|---|
enabled | bool | Indicates whether the option is enabled or not. (required parameter) |
username | string | Represents the username used to access the files. Validations: maximum length 128 characters. (required parameter) |
password | string | Represents the password used to access the files. Validations: maximum length 128 characters. (required parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Indicates whether the option is enabled or not. (required parameter) |
host_header | string | Define different host header with which your origin will be accessed. (required parameter) |
Parameter | Type | Description |
---|---|---|
protocol | string | If not selected, it is saved with the default value - "HTTP". Possible values - “HTTP|HTTPS”. Represents the protocol that the domains use. (optional parameter) |
location | string | Represents the aws_s3 url where the files are located. (required parameter) |
bucket_name | string | It is used if the location of the files requires authentication. (required parameter) |
access_key | string | It is used when different header is needed to access the files. (required parameter) |
with_signing_key | struct | It is used when different header is needed to access the files. Only one of the following options should be selected - with_signing_key or with_secret_key. (optional parameter) |
with_secret_key | struct | It is used when different header is needed to access the files. Only one of the following options should be selected - with_signing_key or with_secret_key. (optional parameter) |
Parameter | Type | Description |
---|---|---|
key_scope | string | Represents a key required by the s3 provider. (required parameter) |
signing_key | string | Represents a signing key required by the s3 provider. (required parameter) |
Parameter | Type | Description |
---|---|---|
secret_key | string | Represents a secret key required by the s3 provider. (required parameter) |
region | string | Represents a region required by the s3 provider. (required parameter) |
Parameter | Type | Description |
---|---|---|
by_referer | structure | Contains all limits by referer that can be imposed. (optional structure) |
by_country | structure | Contains all country limits that can be imposed. (optional structure) |
by_secret_key | structure | Contains all secret key limits that can be imposed. (optional structure) |
by_ip | structure | Contains all ip limits that can be imposed. (optional structure) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Shows whether referer limiting is enabled. Default is false. If by_referer is enabled - at least one parameter 'use_origin_if_no_referer' or 'allowed_domains' should be configured. (optional parameter) |
use_origin_if_no_referer | bool | Default is false. When enabled is true, allows filter to use origin if referer header is missing. (optional parameter) |
allowed_domains | array | Array of regex strings for allowed domains. (optional parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Shows whether country limiting is enabled. Default is false. (optional parameter) |
type | string | Allows or denies countries listed. Values: 'allow' or 'deny'. Active only when enabled is true. Default value: 'allow'. (optional parameter) |
countries | array | Array of allowed/denied country ISO codes. (required when enabled is true.) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Shows whether secret key limiting is enabled. Default is false. (optional parameter) |
hash_secret_key | string | (required if enabled is true) |
hash_algorithm | string | Values: "md5" or "sha1". Default value: 'md5'. (required if enabled is true) |
hash_time_to_live_mins | int | Default is 30. Must be at least 1. (optional parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Shows whether IP limiting is enabled. Default is false. (optional parameter) |
type | string | Allows or blocks IPs listed. Values: 'allow' or 'block'. Active only when enabled is true. Default value: 'allow'. (optional parameter) |
ip_list | array | Array of allowed/blocked IP addresses. (required when enabled is true) |
Parameter | Type | Description |
---|---|---|
cache_for_limited_time | structure | It is used when we want to cache files for a limited time only. (optional parameter) |
reuse_cache_from_other_zone | structure | It's used when we want to reuse cache from another zone. (optional parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Indicates whether the option is enabled or not. (required parameter) |
cache_expire_time_min | int | Represents a time after which files will no longer be cached. Validations: integer greater than or equal to 60. (required parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Indicates whether the option is enabled or not. (required parameter) |
zone_name | string | Represents a zone name that we want to use caching on. Validations: must be a domain of an existing zone to the given account. (required parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Indicates whether the option is enabled or not. (required parameter.) |
by_constant_rate | structure | It's used when we want to limit download speed by given rate. (optional structure) |
by_cdn_bw | bool | It's used when we want to limit download speed by URL parameter cdn_bw. Limit access by secret key should be enabled in order to enable this parameter. (optional parameter) |
Parameter | Type | Description |
---|---|---|
unit | string | Represents the unit of measure of by_constant_rate. Possible values - “KB|MB”. If not submitted, there is a default value - "KB". (optional parameter) |
rate | int | Represents the rate of measure of by_constant_rate. Limits: cannot be less than 1. (optional parameter) |
Parameter | Type | Description |
---|---|---|
error_pages | structure | Represents a structure of urls of various error pages. The keys of this structure are the status codes, and the values are the urls themselves. If not provided, it is set with [ ] (empty array). Validations: possible keys (status codes) - [402, 403, 404, 405, 500, 502]. If we want to remove the 403 url, we submit it with {“error_pages”: {“403”: “”}}. (optional parameter.) |
Parameter | Type | Description |
---|---|---|
mode | string | CORS mode for zone. Values: 'simple', 'advanced', 'passthrough'. Default is 'simple'. (optional parameter) |
allow_origin_mode | string | Values: 'any', 'csv', 'regexp'. Default is 'any'. (optional parameter) |
allow_origin_csv | array | Array of allowed origins. (required if mode is 'advanced' and allow_origin_mode is 'csv') |
allow_origin_regexp | string | Regex for allowed origins. (required if mode is 'advanced' and allow_origin_mode is 'regexp') |
allow_methods | string | Allowed HTTP methods separated by commas. Values: 'GET', 'HEAD', 'POST', 'OPTIONS'. (optional parameter) |
allow_credentials | bool | Default is false if mode is 'advanced'. (optional parameter) |
allow_headers | string | Allowed headers separated by commas. Default is empty string if mode is 'advanced'. (optional parameter) |
expose_headers | string | Exposed headers separated by commas. Default is empty string if mode is 'advanced'. (optional parameter) |
max_age | int | Max age in seconds for preflight requests. Default is null if mode is 'advanced'. (optional parameter) |
-- with minimum params (aws_s3 location)
curl -X POST 'https://api.ucdn.com/v4/account/post_zone?token=acf0230d03f5b71d7252e336106f7338' \
--header "Content-Type: application/json" \
--data '{
"name": "test-zone",
"location_of_files": {
"aws_s3": {
"protocol": "HTTP",
"location": "mydomain.com",
"bucket_name": "bucketName",
"access_key": "x4dE",
"with_signing_key": {
"key_scope": "key",
"signing_key": "signing_key"
},
"with_secret_key": {
"secret_key": "x4SASX42",
"region": "region"
}
}
}
}'
-- with maximum params (custom_location)
curl -X POST 'https://api.ucdn.com/v4/account/post_zone?token=acf0230d03f5b71d7252e336106f7338' \
--header "Content-Type: application/json" \
--data '{
"name": "test-zone",
"cnames": [
"first.cname.name",
"second.cname.name"
],
"location_of_files": {
"custom_location": {
"protocol": "HTTP",
"files_at": {
"primary_urls": {
"first-domain.com": {
"port": "80",
"weight": "100"
},
"second-domain.com": {
"port": "90",
"weight": "80"
}
},
"bacckup_urls": {
"third-domain.com": {
"port": "80",
"weight": "100"
}
}
},
"http_authentication": {
"enabled": true,
"username": "userName",
"password": "passWord"
},
"access_origin_host_header": {
"enabled": true,
"host_header": "header"
}
}
},
"limit_access": {
"by_referer": {
"enabled": true,
"use_origin_if_no_referer": true,
"allowed_domains": [
"test.1",
"test.2"
]
},
"by_country": {
"enabled": true,
"type": "deny",
"countries": [
"us",
"ru"
]
},
"by_secret_key": {
"enabled": true,
"hash_secret_key": "12345_key",
"hash_algorithm": "sha1",
"hash_time_to_live_mins": 37
},
"by_ip": {
"enabled": true,
"type": "allow",
"ip_list": [
"174.202.97.102"
]
}
},
"cache": {
"cache_for_limited_time": {
"enabled": true,
"cache_expire_time_min": 21
},
"reuse_cache_from_other_zone": {
"enabled": true,
"zone_name": "any-zone-name"
}
},
"limit_download_speed": {
"enabled": true,
"by_constant_rate": {
"unit": "MB",
"rate": 25
}
},
"error_pages": {
"402": "http://error-402.net",
"403": "http://error-403.net",
"404": "http://error-404.net",
"405": "http://error-405.net",
"500": "http://error-500.net",
"502": "http://error-502.net"
},
"cors": {
"mode": "advanced",
"allow_origin_mode": "csv",
"allow_origin_csv": "http://test.test",
"allow_origin_regexp": "",
"allow_methods": "GET,HEAD,POST,OPTIONS",
"allow_credentials": "true",
"allow_headers": "HEADER-1,HEADER-2",
"expose_headers": "HEADER-3,HEADER-4",
"max_age": 123
}
}'
{
"message": "Zone created succesfully.",
"zone_name": "test-zone"
}
Name | Type | Description |
---|---|---|
zone_name | string | The newly created zone's name |
Status | Type | Description |
---|---|---|
200 | string | A message for successfully edited zone. |
400 | string | An error message. Problem with parameters. |
401 | string | An error message. Problem with the authentication. Invalid token. |
404 | string | Zone with given name does not exists. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. All parameters are described below. |
-- change location to ucdn_storage
curl -X PATCH 'https://api.ucdn.com/v4/account/patch_zone?zone_name=test-zone&token=acf0230d03f5b71d7252e336106f7338' \
--header "Content-Type: application/json" \
--data '{
"location_of_files": {
"ucdn_storage": {
"storage_name": "TestingContainer",
"region": "north-america"
}
}
}'
-- disable reuse_cache_from_other_zone
curl -X PATCH 'https://api.ucdn.com/v4/account/patch_zone?zone_name=test-zone&token=acf0230d03f5b71d7252e336106f7338' \
--header "Content-Type: application/json" \
--data '{
"cache": {
"reuse_cache_from_other_zone": {
"enabled": false,
"zone_name": "test-zone"
}
}
}'
-- disable error_page for status code 403
curl -X PATCH 'https://api.ucdn.com/v4/account/patch_zone?zone_name=test-zone&token=acf0230d03f5b71d7252e336106f7338' \
--header "Content-Type: application/json" \
--data '{
"error_pages": {
"403": ""
}
}'
{
"message": "Zone patched"
}
Name | Type | Description |
---|---|---|
zone_name | string | The newly created zone's name |
Status | Type | Description |
---|---|---|
200 | string | Config of the given zone. |
401 | string | An error message. Problem with the authentication. Invalid token. |
404 | string | Zone with given name does not exists. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
curl -X GET 'https://api.ucdn.com/v4/account/get_zone?zone_name=test-zone&token=acf0230d03f5b71d7252e336106f7338'
{
"name": "test-zone",
"cnames": [
"first.cname.name",
"second.cname.name"
],
"location_of_files": {
"custom_location": {
"protocol": "HTTP",
"files_at": {
"primary_urls": {
"first-domain.com": {
"port": 80,
"weight": 100
},
"second-domain.com": {
"port": 90,
"weight": 80
}
},
"bacckup_urls": {
"third-domain.com": {
"port": 80,
"weight": 100
}
}
},
"http_authentication": {
"enabled": true,
"username": "userName",
"password": "passWord"
},
"access_origin_host_header": {
"enabled": true,
"host_header": "header"
}
}
},
"limit_access": {
"by_referer": {
"enabled": true,
"use_origin_if_no_referer": true,
"allowed_domains": [
"test.1",
"test.2"
]
},
"by_country": {
"enabled": true,
"type": "deny",
"countries": [
"us",
"ru"
]
},
"by_secret_key": {
"enabled": true,
"hash_secret_key": "12345_key",
"hash_algorithm": "sha1",
"hash_time_to_live_mins": 37
},
"by_ip": {
"enabled": true,
"type": "allow",
"ip_list": [
"174.202.97.102"
]
}
},
"cache": {
"cache_for_limited_time": {
"enabled": true,
"cache_expire_time_min": 21
},
"reuse_cache_from_other_zone": {
"enabled": true,
"zone_name": "any-zone-name"
}
},
"limit_download_speed": {
"enabled": true,
"by_constant_rate": {
"unit": "MB",
"rate": 25
}
},
"error_pages": {
"402": "http://error-402.net",
"403": "http://error-403.net",
"404": "http://error-404.net",
"405": "http://error-405.net",
"500": "http://error-500.net",
"502": "http://error-502.net"
},
"cors": {
"mode": "advanced",
"allow_origin_mode": "csv",
"allow_origin_csv": "http://test.test",
"allow_origin_regexp": "",
"allow_methods": "GET,HEAD,POST,OPTIONS",
"allow_credentials": "true",
"allow_headers": "HEADER-1,HEADER-2",
"expose_headers": "HEADER-3,HEADER-4",
"max_age": 123
}
}
Name | Type | Description |
---|---|---|
zone_active | string | Current zone status. |
Status | Type | Description |
---|---|---|
200 | string | Zone status. |
401 | string | An error message. Problem with the authentication. Invalid token. |
404 | string | Zone with given name does not exists. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
curl -X GET 'https://api.ucdn.com/v4/account/check_zone_status?token=acf0230d03f5b71d7252e336106f7338'
{
"zone_active": "1"
}
Name | Type | Description |
---|---|---|
message | string | The message returned from the api call. |
Status | Type | Description |
---|---|---|
200 | string | Zone deleted succesfully. |
401 | string | Input parameter problem - invalid token, invalid zone name. |
401 | string | An error message. Problem with the authentication. Invalid token. |
404 | string | Zone with given name does not exists. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
curl -X DELETE 'https://api.ucdn.com/v4/account/delete_zone?zone_name=test-zone&token=acf0230d03f5b71d7252e336106f7338'
{
"message": "Zone deleted successfully."
}
Name | Type | Description |
---|---|---|
message | string | The message returned from the api call. |
Status | Type | Description |
---|---|---|
200 | string | Domain deleted succesfully. |
401 | string | Input parameter problem - invalid token, invalid zone name. |
401 | string | An error message. Problem with the authentication. Invalid token. |
404 | string | Zone or origin with given name does not exists. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
|
domain | string required | Existing domain name |
This parameter is required. |
curl -X DELETE 'https://api.ucdn.com/v4/account/delete_origin?zone_name=test-zone&domain=first-domain.com&token=acf0230d03f5b71d7252e336106f7338'
{
"message": "Domain deleted succesfully."
}
Name | Type | Description |
---|---|---|
message | string | The message returned from the api call. |
Status | Type | Description |
---|---|---|
200 | string | Successfully activated letsencrypt. |
401 | string | Input parameter problem - invalid token, invalid zone name. |
401 | string | An error message. Problem with the authentication. Invalid token. |
404 | string | Zone with given name does not exists. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
curl -X POST 'https://api.ucdn.com/v4/account/activate_letsencrypt?zone_name=test-zone&token=acf0230d03f5b71d7252e336106f7338'
{
"message": "Successfully activated letsencrypt."
}
Name | Type | Description |
---|---|---|
message | string | The message returned from the api call. |
Status | Type | Description |
---|---|---|
200 | string | Successfully deactivated letsencrypt. |
401 | string | Input parameter problem - invalid token, invalid zone name. |
401 | string | An error message. Problem with the authentication. Invalid token. |
404 | string | Zone with given name does not exists. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
curl -X DELETE 'https://api.ucdn.com/v4/account/deactivate_letsencrypt?zone_name=test-zone&token=acf0230d03f5b71d7252e336106f7338'
{
"message": "Successfully deactivated letsencrypt."
}
Name | Type | Description |
---|---|---|
letsencrypt_active | string | Current letsencrypt status. |
Status | Type | Description |
---|---|---|
200 | string | Letsencrypt status. |
401 | string | An error message. Problem with the authentication. Invalid token. |
404 | string | Zone with given name does not exists. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
curl -X GET 'https://api.ucdn.com/v4/account/check_letsencrypt_status?token=acf0230d03f5b71d7252e336106f7338'
{
"letsencrypt_active": "0"
}
Name | Type | Description |
---|---|---|
message | string | The message returned from the api call. |
Status | Type | Description |
---|---|---|
200 | string | Successfully enabled/disabled zone. |
401 | string | Input parameter problem - invalid token, invalid zone name |
401 | string | An error message. Problem with the authentication. Invalid token. |
404 | string | Zone with given name does not exists. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
|
enable | bool | Only one paramter (enable/disable) should be passed. |
This parameter enables the zone. |
|
disable | bool | Only one paramter (enable/disable) should be passed. |
This parameter disables the zone. |
curl -X PATCH 'https://api.ucdn.com/v4/account/toggle_zone_status?zone_name=test-zone&token=acf0230d03f5b71d7252e336106f7338' \
--header "Content-Type: application/json" \
--data '{"enable": true}'
{
"message": "Zone enabled"
}
Name | Type | Description |
---|---|---|
message | string | The message returned from the api call. |
Status | Type | Description |
---|---|---|
200 | string | Successfully enabled/disabled zone. |
401 | string | Input parameter problem - invalid token, invalid zone name |
401 | string | An error message. Problem with the authentication. Invalid token. |
404 | string | Zone with given name does not exists. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
|
enable | bool | Only one paramter (enable/disable) should be passed. |
This parameter enables the zone. |
|
disable | bool | Only one paramter (enable/disable) should be passed. |
This parameter disables the zone. |
curl -X PATCH 'https://api.ucdn.com/v4/account/toggle_zone_status?zone_name=test-zone&token=acf0230d03f5b71d7252e336106f7338' \
--header "Content-Type: application/json" \
--data '{"disable": true}'
{
"message": "Zone disabled"
}
Name | Type | Description |
---|---|---|
zone_name | string | The newly created zone's name |
Status | Type | Description |
---|---|---|
200 | string | A message for successfully created zone and it's name. |
400 | string | An error message. Problem with parameters. |
401 | string | An error message. Problem with the authentication. Invalid token. |
403 | string | An error message. The user is not allowed to create livestream zones or he has reached the limit of livestreaming zones. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_config | array required | Existing zone name |
This parameter is required. All parameters are described below. |
-- with minimum params
curl -X POST 'https://api.ucdn.com/v4/livestreaming/post_livestream_zone?token=acf0230d03f5b71d7252e336106f7338' \
--header "Content-Type: application/json" \
--data '{"name": "any-zone-name"}'
-- with maximum params
curl -X POST 'https://api.ucdn.com/v4/livestreaming/post_livestream_zone?token=acf0230d03f5b71d7252e336106f7338' \
--header "Content-Type: application/json" \
-- data '{
"name": "any-zone-name",
"hls_via_cdn": true,
"include_base_stream_in_master_playlist": true,
"recording": {
"keep_copy_of_base_stream_as_mp4": true,
"storage_name": "storage EU",
"region": "europe",
"target_duration_per_file": 60
},
"dvr": {
"enabled": true,
"keep_full_stream": true,
"dvr_session_timeout": "60",
"stream_rewind_window": "720"
},
"streams": {
"base": {
"restreams": {}
},
"1080p-30": {
"transcode": {
"enabled": true,
"upload_on": true,
"framerate": 45,
"video_bitrate": 1234000,
"profile": "high",
"resolution": "720p",
"audio_bitrate": 120000
},
"restreams": {
"youtube_restream": {
"enabled": true,
"new_name": "youtube_restream_new",
"publish_url": "rtmp://b.com",
"stream_key": "12345654321"
}
},
"new_name": "1080p-30-new"
}
},
"cnames": [
"some.cname.name",
"some1.cname.name"
],
"limit_access": {
"by_referer": {
"enabled": true,
"use_origin_if_no_referer": true,
"allowed_domains": [
"test.1",
"test.2"
]
},
"by_country": {
"enabled": true,
"type": "allow|deny",
"countries:": [
"us",
"ru"
]
},
"by_secret_key": {
"enabled": true,
"hash_secret_key": "12345_key",
"hash_algorithm": "md5|sha1",
"hash_time_to_live_mins": 37
},
"by_ip": {
"enabled": true,
"type": "allow|block",
"ip_list": [
"192.168.0.1",
"102.102.102.102"
]
}
},
"cors": {
"mode": "advanced",
"allow_origin_mode": "csv",
"allow_origin_csv": ["http://test.test"],
"allow_origin_regexp": "",
"allow_methods": "GET,HEAD,POST,OPTIONS",
"allow_credentials": "true",
"allow_headers": "HEADER-1,HEADER-2",
"expose_headers": "HEADER-3,HEADER-4",
"max_age": 123
}
}'
{
"message": "Livestream zone created succesfully.",
"zone_name": "any-zone-name"
}
Parameter | Type | Description |
---|---|---|
name | string | Name of the livestreaming zone. Limitations: string, 1-30 characters: a-z, A-Z, 0-9, -, _. There cannot be two or more zones with the same names. (required parameter) |
new_name | string | New name of the livestreaming zone. Limitations are the same as 'name' parameter. Can be used when editing the zone. (optional parameter) |
hls_via_cdn | bool | If not specified, it is set to true. If enabled, it allows HTTP access to the livestreaming zone, enabling HLS over CDN. (optional parameter) |
include_base_stream_in_master_playlist | bool | If not specified, it is not included in the data. If enabled, the index.m3u8 file of the base stream will be included in the master.m3u8. (optional parameter) |
cnames | array of strings | If not specified, it is set to null. Represents an array of strings, where each element represents a domain. (optional parameter) |
recording | structure | The Recording structure sets the rules for how a livestream is stored on servers. It includes options for retaining a copy of the base stream ('keep_copy_of_base_stream_as_mp4'), specifying the storage name ('storage_name'), storage region ('region'), and segment duration ('target_duration_per_file'). If not provided, it will be recorded with the default values described below. (optional structure) |
DVR | structure | The DVR structure configures the recording and time customization options capabilities for live streams. The structure includes options to enable DVR ('enabled'), whether to keep the entire stream ('keep_full_stream'), session timeout settings ('dvr_session_timeout'), and the window size determining how far back viewer can rewind the stream ('stream_rewind_window'). If not provided, it will be recorded with the default values described below. (optional structure) |
streams | structure | The Streams structure defines the individual streams within a livestreaming zone. It includes mandatory and optional settings for stream name ('name'), transcoding (transcode with its subparameters like 'framerate', 'video_bitrate_kbps', etc.), and restreams. The structure also allows you to impose limits on stream access ('limit_access') and configure zone CORS settings ('cors'). If not provided, it will be recorded with the default values described below. (optional structure) |
limit_access | structure | Contains all access limits that can be imposed. (optional structure) |
cors | structure | Describing the CORS setting for the zone. If not provided, it is sent with a null value. (optional structure) |
Parameter | Type | Description |
---|---|---|
keep_copy_of_base_stream_as_mp4 | bool | If not provided, it will be set to false. It represents a boolean value, if enabled - the base stream is uploaded to the storage. However, if it is marked as true, then the storage_name must be provided in the recording structure. (optional parameter) |
storage_name | string | If not provided, it will be set to '' (empty string). It represents the name of an existing storage to the user's account. This is the name of the storage, in which the recorded stream will be uploaded. (optional parameter) |
region | string | It represents the region of an existing storage to the user's account. Possible values: 'europe', 'north-america'. (optional parameter) |
target_duration_per_file | int | If not provided, it will be set to 30. It represents a number showing how long the individual livestream segments should be in minutes, which are uploaded to the storage. Possible values: 30, 60, 90, 120, 150, 180, 240, 300, 360. (optional parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Determines whether to enable/disable DVR for the zone. If DVR is enabled we should have a configured storage and the following parameters are required: (required parameter) |
keep_full_stream | bool | Determines whether to keep the entire DVR of the stream. Default value: false. (optional parameter) |
dvr_session_timeout | int | Determines the time duration of streaming inactivity before the DVR session is considered complete. When the session is considered complete, the system processes and uploads the remaining segments and playlists. Possible values are: 30, 60, 90, 120, 240. (If enabled is true, then the parameter is required.) |
stream_rewind_window | int | Determines the maximum time for which a viewer can rewind within the session of a given stream. The system automatically removes older segments that are outside of this set window. Possible values are: 60, 120, 240, 360, 480, 600, 720, 1440. (If enabled is true, then the parameter is required.) |
Parameter | Type | Description |
---|---|---|
name | structure | Name of the transcoding. Limitations: string, 5-30 characters: a-z, A-Z, 0-9, -, _. (required parameter) |
Parameter | Type | Description |
---|---|---|
transcode | structure | Contains all the settings for transcoding a given stream. (optional structure.) |
restreams | structure | Contains all restreams for a given stream. If not provided, it is set to {}. (optional structure) |
new_name | string | It is used to update the transcoding name. (optional parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Indicates whether the transcode is enabled or disabled. (required parameter) |
keep_copy_as_mp4 | bool | If not provided - has default value false. Indicates whether this transcode should be stored in storage. (optional parameter) |
framerate | int | If not provided - has default value 30. video framerate - number from 2 to 120. (optional parameter) |
video_bitrate_kbps | int | Video bitrate in kbps. Determined by resolution and fps if not provided. Possible values: 100 - 50,000. (optional parameter) |
profile | string | Default is "main". Possible values: "baseline", "main", "high". (optional parameter) |
resolution | string | Video resolution height. Possible values: 144p, 240p, 360p, 480p, 720p, 1080p, 2160p. (required parameter) |
audio_bitrate_kbps | int | Audio bitrate in kbps. Determined by resolution and fps if not provided. Possible values: 48 - 320. (optional parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Shows whether a given restream is enabled. (optional parameter) |
name | string | Name of the restream. (required parameter) |
new_name | string | Used to update restream name. (optional parameter) |
publish_url | string | RTMP URL for restream redirection. (required parameter) |
stream_key | string | Key for restream push to RTMP URL. (required parameter) |
Parameter | Type | Description |
---|---|---|
by_referer | structure | Contains all limits by referer that can be imposed. (optional structure) |
by_country | structure | Contains all country limits that can be imposed. (optional structure) |
by_secret_key | structure | Contains all secret key limits that can be imposed. (optional structure) |
by_ip | structure | Contains all ip limits that can be imposed. (optional structure) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Shows whether referer limiting is enabled. Default is false. If by_referer is enabled - at least one parameter 'use_origin_if_no_referer' or 'allowed_domains' should be configured.(optional parameter) |
use_origin_if_no_referer | bool | Default is false. When enabled is true, allows filter to use origin if referer header is missing. (optional parameter) |
allowed_domains | array | Array of regex strings for allowed domains.(optional parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Shows whether country limiting is enabled. Default is false. (optional parameter) |
type | string | Allows or denies countries listed. Values: 'allow' or 'deny'. Active only when enabled is true. Default value: 'allow'. (optional parameter) |
countries | array | Array of allowed/denied country ISO codes. (required when enabled is true.) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Shows whether secret key limiting is enabled. Default is false. (optional parameter) |
hash_secret_key | string | (required if enabled is true) |
hash_algorithm | string | Values: "md5" or "sha1". Default value: 'md5'. (required if enabled is true) |
hash_time_to_live_mins | int | Default is 30. Must be at least 1. (optional parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Shows whether IP limiting is enabled. Default is false. (optional parameter) |
type | string | Allows or blocks IPs listed. Values: 'allow' or 'block'. Active only when enabled is true. Default value: 'allow'. (optional parameter) |
ip_list | array | Array of allowed/blocked IP addresses. (required when enabled is true) |
Parameter | Type | Description |
---|---|---|
mode | string | CORS mode for zone. Values: 'simple', 'advanced', 'passthrough'. Default is 'simple'. (optional parameter) |
allow_origin_mode | string | Values: 'any', 'csv', 'regexp'. Default is 'any'. (optional parameter) |
allow_origin_csv | array | Array of allowed origins. (required if mode is 'advanced' and allow_origin_mode is 'csv') |
allow_origin_regexp | string | Regex for allowed origins. (required if mode is 'advanced' and allow_origin_mode is 'regexp') |
allow_methods | string | Allowed HTTP methods separated by commas. Values: 'GET', 'HEAD', 'POST', 'OPTIONS'. (optional parameter) |
allow_credentials | bool | Default is false if mode is 'advanced'. (optional parameter) |
allow_headers | string | Allowed headers separated by commas. Default is empty string if mode is 'advanced'. (optional parameter) |
expose_headers | string | Exposed headers separated by commas. Default is empty string if mode is 'advanced'. (optional parameter) |
max_age | int | Max age in seconds for preflight requests. Default is null if mode is 'advanced'. (optional parameter) |
Parameter | Type | Description |
---|---|---|
name | string | Name of the zone. Limitations: string, 1-30 characters: a-z, A-Z, 0-9, -, _. There cannot be two or more zones with the same names. (required parameter) |
cnames | array of strings | If not specified, it is set to null. Represents an array of strings, where each element represents a domain. (optional parameter) |
location_of_files | structure | The location_of_files structure specify the location of files. To cache resources, the CDN network needs to fetch and cache the resources from the specified backend server. There are three options - ucdn_storage, custom_location, aws_s3. Only one of these options should be selected. (required structure) |
limit_access | structure | Contains all access limits that can be imposed. (optional structure) |
cache | structure | The cache structure manage caching resources, in order to improve performance. Resources can be cached for a long period of time. Also there is an option for reusing cache from other zone. (optional structure) |
limit_download_speed | structure | With the limit_download_speed structure maxmimum bandwidth can be limited. There are two options - limit by constant rate or limit by URL parameter cdn_bw. Only one of these options should be selected. (optional structure) |
error_pages | structure | The error_pages structure represents urls for pages when error occured. (optional structure) |
cors | structure | Describing the CORS setting for the zone. If not provided, it is sent with a null value. (optional structure) |
Parameter | Type | Description |
---|---|---|
ucdn_storage | structure | It is used when the files are located in UCDN storage. (optional parameter) |
custom_location | structure | It is used when the files are not located in UCDN storage, but in some other location. (optional parameter) |
aws_s3 | structure | Used when you use AWS services and our files are there. (optional parameter) |
Parameter | Type | Description |
---|---|---|
storage_name | string | Represents the name of an existing storage to the user's account. This is the name of the storage where the files are stored. Validations: Must be an existing storage name and no longer than 32 characters. (required parameter) |
region | string | It is used when we have two storages with the same name and different regions. Valid values: “north-america|europe”. (optional parameter) |
Parameter | Type | Description |
---|---|---|
protocol | string | If not selected, it is saved with the default value - "HTTP". Possible values - “HTTP|HTTPS”. Represents the protocol that the domains use. (optional parameter) |
files_at | struct | Contains urls of the locations from where the files will be fetched. (required parameter) |
http_authentication | struct | It is used if the location of the files requires authentication. (optional parameter) |
access_origin_host_header | struct | It is used when different header is needed to access the files. (optional parameter) |
Parameter | Type | Description |
---|---|---|
primary_urls | array of struct | It represents an array of structures. Example: {“first-domain.com”: {“port”: “80”, “weight”: “100”}, “174.202.97.102”: {“port”: “90”, “weight”: “80”}}. The given domain is used as the key of a given structure, and it must be unique regardless of port and weight. If port is not set, it is set with the default value - 80 (If the protocol is HTTPS, then the default value is 443). Validations: port must be between 1 and 65535 inclusive. If weight is not set, it is set with a default value of 100. If you want to set both params with default values - use {} (example: {“first-domain.com”: {}}). Validations: weight must be an integer between 1-100. To remove an origin, ensure it is not the last of primary type. If it is, consider creating a new primary origin before deletion. For now if you want to edit an origin you should delete and recreate it with the new domain. When modifying the last primary origin - you should first create new origin and then delete the old one. (required parameter) |
backup_urls | array of struct | Same as primary_urls parameter. |
Parameter | Type | Description |
---|---|---|
enabled | bool | Indicates whether the option is enabled or not. (required parameter) |
username | string | Represents the username used to access the files. Validations: maximum length 128 characters. (required parameter) |
password | string | Represents the password used to access the files. Validations: maximum length 128 characters. (required parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Indicates whether the option is enabled or not. (required parameter) |
host_header | string | Define different host header with which your origin will be accessed. (required parameter) |
Parameter | Type | Description |
---|---|---|
protocol | string | If not selected, it is saved with the default value - "HTTP". Possible values - “HTTP|HTTPS”. Represents the protocol that the domains use. (optional parameter) |
location | string | Represents the aws_s3 url where the files are located. (required parameter) |
bucket_name | string | It is used if the location of the files requires authentication. (required parameter) |
access_key | string | It is used when different header is needed to access the files. (required parameter) |
with_signing_key | struct | It is used when different header is needed to access the files. Only one of the following options should be selected - with_signing_key or with_secret_key. (optional parameter) |
with_secret_key | struct | It is used when different header is needed to access the files. Only one of the following options should be selected - with_signing_key or with_secret_key. (optional parameter) |
Parameter | Type | Description |
---|---|---|
key_scope | string | Represents a key required by the s3 provider. (required parameter) |
signing_key | string | Represents a signing key required by the s3 provider. (required parameter) |
Parameter | Type | Description |
---|---|---|
secret_key | string | Represents a secret key required by the s3 provider. (required parameter) |
region | string | Represents a region required by the s3 provider. (required parameter) |
Parameter | Type | Description |
---|---|---|
by_referer | structure | Contains all limits by referer that can be imposed. (optional structure) |
by_country | structure | Contains all country limits that can be imposed. (optional structure) |
by_secret_key | structure | Contains all secret key limits that can be imposed. (optional structure) |
by_ip | structure | Contains all ip limits that can be imposed. (optional structure) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Shows whether referer limiting is enabled. Default is false. If by_referer is enabled - at least one parameter 'use_origin_if_no_referer' or 'allowed_domains' should be configured. (optional parameter) |
use_origin_if_no_referer | bool | Default is false. When enabled is true, allows filter to use origin if referer header is missing. (optional parameter) |
allowed_domains | array | Array of regex strings for allowed domains. (optional parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Shows whether country limiting is enabled. Default is false. (optional parameter) |
type | string | Allows or denies countries listed. Values: 'allow' or 'deny'. Active only when enabled is true. Default value: 'allow'. (optional parameter) |
countries | array | Array of allowed/denied country ISO codes. (required when enabled is true.) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Shows whether secret key limiting is enabled. Default is false. (optional parameter) |
hash_secret_key | string | (required if enabled is true) |
hash_algorithm | string | Values: "md5" or "sha1". Default value: 'md5'. (required if enabled is true) |
hash_time_to_live_mins | int | Default is 30. Must be at least 1. (optional parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Shows whether IP limiting is enabled. Default is false. (optional parameter) |
type | string | Allows or blocks IPs listed. Values: 'allow' or 'block'. Active only when enabled is true. Default value: 'allow'. (optional parameter) |
ip_list | array | Array of allowed/blocked IP addresses. (required when enabled is true) |
Parameter | Type | Description |
---|---|---|
cache_for_limited_time | structure | It is used when we want to cache files for a limited time only. (optional parameter) |
reuse_cache_from_other_zone | structure | It's used when we want to reuse cache from another zone. (optional parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Indicates whether the option is enabled or not. (required parameter) |
cache_expire_time_min | int | Represents a time after which files will no longer be cached. Validations: integer greater than or equal to 60. (required parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Indicates whether the option is enabled or not. (required parameter) |
zone_name | string | Represents a zone name that we want to use caching on. Validations: must be a domain of an existing zone to the given account. (required parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Indicates whether the option is enabled or not. (required parameter.) |
by_constant_rate | structure | It's used when we want to limit download speed by given rate. (optional structure) |
by_cdn_bw | bool | It's used when we want to limit download speed by URL parameter cdn_bw. Limit access by secret key should be enabled in order to enable this parameter. (optional parameter) |
Parameter | Type | Description |
---|---|---|
unit | string | Represents the unit of measure of by_constant_rate. Possible values - “KB|MB”. If not submitted, there is a default value - "KB". (optional parameter) |
rate | int | Represents the rate of measure of by_constant_rate. Limits: cannot be less than 1. (optional parameter) |
Parameter | Type | Description |
---|---|---|
error_pages | structure | Represents a structure of urls of various error pages. The keys of this structure are the status codes, and the values are the urls themselves. If not provided, it is set with [ ] (empty array). Validations: possible keys (status codes) - [402, 403, 404, 405, 500, 502]. If we want to remove the 403 url, we submit it with {“error_pages”: {“403”: “”}}. (optional parameter.) |
Parameter | Type | Description |
---|---|---|
mode | string | CORS mode for zone. Values: 'simple', 'advanced', 'passthrough'. Default is 'simple'. (optional parameter) |
allow_origin_mode | string | Values: 'any', 'csv', 'regexp'. Default is 'any'. (optional parameter) |
allow_origin_csv | array | Array of allowed origins. (required if mode is 'advanced' and allow_origin_mode is 'csv') |
allow_origin_regexp | string | Regex for allowed origins. (required if mode is 'advanced' and allow_origin_mode is 'regexp') |
allow_methods | string | Allowed HTTP methods separated by commas. Values: 'GET', 'HEAD', 'POST', 'OPTIONS'. (optional parameter) |
allow_credentials | bool | Default is false if mode is 'advanced'. (optional parameter) |
allow_headers | string | Allowed headers separated by commas. Default is empty string if mode is 'advanced'. (optional parameter) |
expose_headers | string | Exposed headers separated by commas. Default is empty string if mode is 'advanced'. (optional parameter) |
max_age | int | Max age in seconds for preflight requests. Default is null if mode is 'advanced'. (optional parameter) |
Name | Type | Description |
---|---|---|
message | array | The message returned from the api call. |
Status | Type | Description |
---|---|---|
200 | string | Message for success. |
400 | string | Input parameter problem - invalid token, invalid zone name, invalid transcoding_name. |
401 | string | Problem with the authentication. Invalid token. |
403 | string | The user does not have livestreaming turned on for their account. |
404 | string | Given zone does not exists. |
409 | string | There is currently an active livestream running on the zone, or there is another restriction that prevents the change from going through. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_config | array required | Existing zone name |
This parameter is required. All parameters are described in post livestreaming zones. |
Parameter | Type | Description |
---|---|---|
name | string | Name of the zone. Limitations: string, 1-30 characters: a-z, A-Z, 0-9, -, _. There cannot be two or more zones with the same names. (required parameter) |
cnames | array of strings | If not specified, it is set to null. Represents an array of strings, where each element represents a domain. (optional parameter) |
location_of_files | structure | The location_of_files structure specify the location of files. To cache resources, the CDN network needs to fetch and cache the resources from the specified backend server. There are three options - ucdn_storage, custom_location, aws_s3. Only one of these options should be selected. (required structure) |
limit_access | structure | Contains all access limits that can be imposed. (optional structure) |
cache | structure | The cache structure manage caching resources, in order to improve performance. Resources can be cached for a long period of time. Also there is an option for reusing cache from other zone. (optional structure) |
limit_download_speed | structure | With the limit_download_speed structure maxmimum bandwidth can be limited. There are two options - limit by constant rate or limit by URL parameter cdn_bw. Only one of these options should be selected. (optional structure) |
error_pages | structure | The error_pages structure represents urls for pages when error occured. (optional structure) |
cors | structure | Describing the CORS setting for the zone. If not provided, it is sent with a null value. (optional structure) |
Parameter | Type | Description |
---|---|---|
ucdn_storage | structure | It is used when the files are located in UCDN storage. (optional parameter) |
custom_location | structure | It is used when the files are not located in UCDN storage, but in some other location. (optional parameter) |
aws_s3 | structure | Used when you use AWS services and our files are there. (optional parameter) |
Parameter | Type | Description |
---|---|---|
storage_name | string | Represents the name of an existing storage to the user's account. This is the name of the storage where the files are stored. Validations: Must be an existing storage name and no longer than 32 characters. (required parameter) |
region | string | It is used when we have two storages with the same name and different regions. Valid values: “north-america|europe”. (optional parameter) |
Parameter | Type | Description |
---|---|---|
protocol | string | If not selected, it is saved with the default value - "HTTP". Possible values - “HTTP|HTTPS”. Represents the protocol that the domains use. (optional parameter) |
files_at | struct | Contains urls of the locations from where the files will be fetched. (required parameter) |
http_authentication | struct | It is used if the location of the files requires authentication. (optional parameter) |
access_origin_host_header | struct | It is used when different header is needed to access the files. (optional parameter) |
Parameter | Type | Description |
---|---|---|
primary_urls | array of struct | It represents an array of structures. Example: {“first-domain.com”: {“port”: “80”, “weight”: “100”}, “174.202.97.102”: {“port”: “90”, “weight”: “80”}}. The given domain is used as the key of a given structure, and it must be unique regardless of port and weight. If port is not set, it is set with the default value - 80 (If the protocol is HTTPS, then the default value is 443). Validations: port must be between 1 and 65535 inclusive. If weight is not set, it is set with a default value of 100. If you want to set both params with default values - use {} (example: {“first-domain.com”: {}}). Validations: weight must be an integer between 1-100. To remove an origin, ensure it is not the last of primary type. If it is, consider creating a new primary origin before deletion. For now if you want to edit an origin you should delete and recreate it with the new domain. When modifying the last primary origin - you should first create new origin and then delete the old one. (required parameter) |
backup_urls | array of struct | Same as primary_urls parameter. |
Parameter | Type | Description |
---|---|---|
enabled | bool | Indicates whether the option is enabled or not. (required parameter) |
username | string | Represents the username used to access the files. Validations: maximum length 128 characters. (required parameter) |
password | string | Represents the password used to access the files. Validations: maximum length 128 characters. (required parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Indicates whether the option is enabled or not. (required parameter) |
host_header | string | Define different host header with which your origin will be accessed. (required parameter) |
Parameter | Type | Description |
---|---|---|
protocol | string | If not selected, it is saved with the default value - "HTTP". Possible values - “HTTP|HTTPS”. Represents the protocol that the domains use. (optional parameter) |
location | string | Represents the aws_s3 url where the files are located. (required parameter) |
bucket_name | string | It is used if the location of the files requires authentication. (required parameter) |
access_key | string | It is used when different header is needed to access the files. (required parameter) |
with_signing_key | struct | It is used when different header is needed to access the files. Only one of the following options should be selected - with_signing_key or with_secret_key. (optional parameter) |
with_secret_key | struct | It is used when different header is needed to access the files. Only one of the following options should be selected - with_signing_key or with_secret_key. (optional parameter) |
Parameter | Type | Description |
---|---|---|
key_scope | string | Represents a key required by the s3 provider. (required parameter) |
signing_key | string | Represents a signing key required by the s3 provider. (required parameter) |
Parameter | Type | Description |
---|---|---|
secret_key | string | Represents a secret key required by the s3 provider. (required parameter) |
region | string | Represents a region required by the s3 provider. (required parameter) |
Parameter | Type | Description |
---|---|---|
by_referer | structure | Contains all limits by referer that can be imposed. (optional structure) |
by_country | structure | Contains all country limits that can be imposed. (optional structure) |
by_secret_key | structure | Contains all secret key limits that can be imposed. (optional structure) |
by_ip | structure | Contains all ip limits that can be imposed. (optional structure) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Shows whether referer limiting is enabled. Default is false. If by_referer is enabled - at least one parameter 'use_origin_if_no_referer' or 'allowed_domains' should be configured. (optional parameter) |
use_origin_if_no_referer | bool | Default is false. When enabled is true, allows filter to use origin if referer header is missing. (optional parameter) |
allowed_domains | array | Array of regex strings for allowed domains. (optional parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Shows whether country limiting is enabled. Default is false. (optional parameter) |
type | string | Allows or denies countries listed. Values: 'allow' or 'deny'. Active only when enabled is true. Default value: 'allow'. (optional parameter) |
countries | array | Array of allowed/denied country ISO codes. (required when enabled is true.) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Shows whether secret key limiting is enabled. Default is false. (optional parameter) |
hash_secret_key | string | (required if enabled is true) |
hash_algorithm | string | Values: "md5" or "sha1". Default value: 'md5'. (required if enabled is true) |
hash_time_to_live_mins | int | Default is 30. Must be at least 1. (optional parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Shows whether IP limiting is enabled. Default is false. (optional parameter) |
type | string | Allows or blocks IPs listed. Values: 'allow' or 'block'. Active only when enabled is true. Default value: 'allow'. (optional parameter) |
ip_list | array | Array of allowed/blocked IP addresses. (required when enabled is true) |
Parameter | Type | Description |
---|---|---|
cache_for_limited_time | structure | It is used when we want to cache files for a limited time only. (optional parameter) |
reuse_cache_from_other_zone | structure | It's used when we want to reuse cache from another zone. (optional parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Indicates whether the option is enabled or not. (required parameter) |
cache_expire_time_min | int | Represents a time after which files will no longer be cached. Validations: integer greater than or equal to 60. (required parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Indicates whether the option is enabled or not. (required parameter) |
zone_name | string | Represents a zone name that we want to use caching on. Validations: must be a domain of an existing zone to the given account. (required parameter) |
Parameter | Type | Description |
---|---|---|
enabled | bool | Indicates whether the option is enabled or not. (required parameter.) |
by_constant_rate | structure | It's used when we want to limit download speed by given rate. (optional structure) |
by_cdn_bw | bool | It's used when we want to limit download speed by URL parameter cdn_bw. Limit access by secret key should be enabled in order to enable this parameter. (optional parameter) |
Parameter | Type | Description |
---|---|---|
unit | string | Represents the unit of measure of by_constant_rate. Possible values - “KB|MB”. If not submitted, there is a default value - "KB". (optional parameter) |
rate | int | Represents the rate of measure of by_constant_rate. Limits: cannot be less than 1. (optional parameter) |
Parameter | Type | Description |
---|---|---|
error_pages | structure | Represents a structure of urls of various error pages. The keys of this structure are the status codes, and the values are the urls themselves. If not provided, it is set with [ ] (empty array). Validations: possible keys (status codes) - [402, 403, 404, 405, 500, 502]. If we want to remove the 403 url, we submit it with {“error_pages”: {“403”: “”}}. (optional parameter.) |
Parameter | Type | Description |
---|---|---|
mode | string | CORS mode for zone. Values: 'simple', 'advanced', 'passthrough'. Default is 'simple'. (optional parameter) |
allow_origin_mode | string | Values: 'any', 'csv', 'regexp'. Default is 'any'. (optional parameter) |
allow_origin_csv | array | Array of allowed origins. (required if mode is 'advanced' and allow_origin_mode is 'csv') |
allow_origin_regexp | string | Regex for allowed origins. (required if mode is 'advanced' and allow_origin_mode is 'regexp') |
allow_methods | string | Allowed HTTP methods separated by commas. Values: 'GET', 'HEAD', 'POST', 'OPTIONS'. (optional parameter) |
allow_credentials | bool | Default is false if mode is 'advanced'. (optional parameter) |
allow_headers | string | Allowed headers separated by commas. Default is empty string if mode is 'advanced'. (optional parameter) |
expose_headers | string | Exposed headers separated by commas. Default is empty string if mode is 'advanced'. (optional parameter) |
max_age | int | Max age in seconds for preflight requests. Default is null if mode is 'advanced'. (optional parameter) |
-- change the resolution of the stream 'my-transcode'
curl -X PATCH 'https://api.ucdn.com/v4/livestreaming/patch_livestream_zone/?zone_name=any-zone-name&token=acf0230d03f5b71d7252e336106f7338' \
--header "Content-Type: application/json" \
--data '{"streams":{"my-transcode":{"transcode":{"resolution":"360p"}}}}'
-- add a restream to stream 'my-transcode'
curl -X PATCH 'https://api.ucdn.com/v4/livestreaming/patch_livestream_zone/?zone_name=any-zone-name&token=acf0230d03f5b71d7252e336106f7338' \
--header "Content-Type: application/json" \
--data '{"streams": {"my-transcode": {"restreams": {"third-restream": {"enabled": false,"publish_url": "rtmp://test-url-new.com","stream_key": "12345678"}}}}}'
{
"message": "Zone patched"
}
Name | Type | Description |
---|---|---|
config | array | Fetched zone config |
Status | Type | Description |
---|---|---|
200 | string | Livestream zone config. |
401 | string | Problem with the authentication. Invalid token. |
403 | string | The user does not have livestreaming turned on for their account. |
404 | string | Given zone does not exists. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
curl -X GET 'https://api.ucdn.com/v4/livestreaming/get_livestream_zone?zone_name=any-zone-name&token=acf0230d03f5b71d7252e336106f7338'
{
"name": "any-zone-name",
"hls_via_cdn": true,
"include_base_stream_in_master_playlist": true,
"recording": {
"keep_copy_of_base_stream_as_mp4": true,
"storage_name": "TestingContainer",
"target_duration_per_file": "60"
},
"dvr": {
"enabled": true,
"keep_full_stream": true,
"dvr_session_timeout": "30",
"stream_rewind_window": "120"
},
"streams": {
"base": {
"restreams": []
},
"1080p-60": {
"transcode": {
"enabled": true,
"keep_copy_as_mp4": false,
"framerate": 60,
"video_bitrate_kbps": 25000000,
"profile": "high",
"resolution": "1080p",
"audio_bitrate_kbps": 256000
},
"restreams": {
"youtube_restream": {
"enabled": true,
"publish_url": "rtmp:\/\/b.com",
"stream_key": "123321"
}
}
}
},
"cnames": [
"my-domain.com"
],
"limit_access": {
"by_referer": {
"enabled": true,
"use_origin_if_no_referer": true,
"allowed_domains": [
"test-domain.com"
]
},
"by_country": {
"enabled": true,
"type": "deny",
"countries": [
"ro"
]
},
"by_secret_key": {
"enabled": true,
"hash_secret_key": "myKey2",
"hash_algorithm": "md5",
"hash_time_to_live_mins": "30"
},
"by_ip": {
"enabled": true,
"type": "deny",
"ip_list": [
"111.151.161.171"
]
}
},
"cors": {
"mode": "advanced",
"allow_origin_mode": "any",
"allow_origin_csv": "",
"allow_origin_regexp": "",
"allow_methods": "",
"allow_credentials": "false",
"allow_headers": "",
"expose_headers": "",
"max_age": ""
}
}
Name | Type | Description |
---|---|---|
zone_active | string | Current zone status. |
Status | Type | Description |
---|---|---|
200 | string | Zone status. |
401 | string | An error message. Problem with the authentication. Invalid token. |
404 | string | Zone with given name does not exists. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
curl -X GET 'https://api.ucdn.com/v4/livestreaming/check_zone_status?token=acf0230d03f5b71d7252e336106f7338'
{
"zone_active": "1"
}
Name | Type | Description |
---|---|---|
message | string | The message returned from the api call. |
Status | Type | Description |
---|---|---|
200 | string | Livestream zone deleted succesfully. |
400 | string | Input parameter problem - invalid token, invalid zone name, invalid transcoding_name. |
401 | string | Problem with the authentication. Invalid token. |
403 | string | The user does not have livestreaming turned on for their account. |
404 | string | Given zone does not exists. |
409 | string | There is currently an active livestream running on the zone, or there is another restriction that prevents the change from going through. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
curl -X DELETE 'https://api.ucdn.com/v4/livestreaming/delete_livestream_zone?zone_name=any-zone-name&token=acf0230d03f5b71d7252e336106f7338'
{
"messgae": "Zone deleted succesfully",
}
Name | Type | Description |
---|---|---|
message | string | The message returned from the api call. |
Status | Type | Description |
---|---|---|
200 | string | Transcode deleted succesfully. |
400 | string | Input parameter problem - invalid token, invalid zone name, invalid transcoding_name. |
401 | string | Problem with the authentication. Invalid token. |
403 | string | The user does not have livestreaming turned on for their account. |
404 | string | Given zone or transcoding does not exists. |
409 | string | There is currently an active livestream running on the zone, or there is another restriction that prevents the change from going through. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
|
transcoding_name | string required | Existing transcoding name |
This parameter is required. |
curl -X DELETE 'https://api.ucdn.com/v4/livestreaming/delete_transcoding?zone_name=any-zone-name&transcoding_name=my-transcode&token=acf0230d03f5b71d7252e336106f7338'
{
"message": "Transcode deleted succesfully."
}
Name | Type | Description |
---|---|---|
message | string | The message returned from the api call. |
Status | Type | Description |
---|---|---|
200 | string | Restream deleted succesfully. |
400 | string | Input parameter problem - invalid token, invalid zone name, invalid transcoding_name. |
401 | string | Problem with the authentication. Invalid token. |
403 | string | The user does not have livestreaming turned on for their account. |
404 | string | Given zone or transcoding does not exists. |
409 | string | There is currently an active livestream running on the zone, or there is another restriction that prevents the change from going through. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
|
restream_name | string required | Existing restream name |
This parameter is required. |
|
transcoding_name | string required | Existing transcoding name |
This parameter is required. |
curl -X DELETE 'https://api.ucdn.com/v4/livestreaming/delete_restream?zone_name=any-zone-name&restream_name=first-restream&transcoding_name=my-transcoding&token=acf0230d03f5b71d7252e336106f7338'
{
"message": "Restream deleted succesfully."
}
Name | Type | Description |
---|---|---|
account_id | integer | Your account id |
zone_id | integer | The newly created zone's id |
config | array | Fetched zone config |
Status | Type | Description |
---|---|---|
200 | string | A list of livestream zones |
401 | string | User api key not specified |
532 | string | An error message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string | Existing zone name |
This parameter is optional. The name of the zone. |
curl -X GET "https://api.ucdn.com/v4/livestreaming/get_zones/?zone_name=any-zone-name&token=acf0230d03f5b71d7252e336106f7338"
[
{
"account_id": 11,
"zone_id": 1,
"config": {
"name": "test_livestream",
"publish_pop": "US-DAL",
"enable_http_access": true,
"upload": {
"on": false,
"max_file_duration_mins": 30
},
"dvr": {
"on": false
},
"streams": {
"base": {
"type": "base",
"transcode": [],
"upload": {
"on": false
},
"restreams": {
"c1a430c40d200d4015b1": {
"on": true,
"name": "test_base_restream",
"url": "rtmp:\/\/baserestream.com",
"key": "mlliasjdakbdakosixakdsfnalfjaf"
}
}
},
"360p-30": {
"type": "sub",
"transcode": {
"on": true,
"v_c": "h264",
"v_fps": 30,
"v_prof": "high",
"v_w": 640,
"v_h": 360,
"a_c": "aac",
"v_br": 500000,
"preset": "medium",
"a_br": 128000,
"v_kf": 2,
"v_cq": 23,
"f_mr": 550000
},
"upload": {
"on": false
},
"restreams": {
"179fb1a3a3a2b222cfe6": {
"on": true,
"name": "test_transc_restream",
"url": "rtmp:\/\/transc_restream.com",
"key": "lkjiasudkadmaslkjaslfjsalkfmasldkasldasmas"
}
}
}
},
"publish_domains": [
{
"domain": "11-1-0.lsp.cdn13.com"
}
],
"streamkey": "4fa7a28adb5b3380b0544d8bb2d9f4ba11ee031c",
"rtmp_port": "2113",
"http_port": "2114",
"publish_rtmp_app": "ulive",
"play_uri_prefix": "hls\/2b78db2098.ulive",
"publish_hosts": [
61
]
}
}
]
Name | Type | Description |
---|---|---|
events | array | A list of livestreaming events for the given zone |
Status | Type | Description |
---|---|---|
200 | string | A list of livestreaming events |
400 | string | An error message |
401 | string | User api key not specified |
532 | string | An error message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required |
The name of the zone. |
||
type | string |
Filter events by the type of event. Valid types are 'publish', 'transcode', 'restream', 'upload'. |
||
session_id | string/integer |
Include events from all streams within a specific session. Useful for retrieving grouped events related to the same session. |
||
stream_id | string/integer |
Filter events to include only those that match the given stream ID. |
||
start_ts |
Filter events to include only those that have started on or after this timestamp. |
|||
stop_ts |
Filter events to include only those that have stopped on or before this timestamp. |
curl -X GET "https://api.ucdn.com/v4/livestreaming/get_events?zone_name=any-zone-name&token=acf0230d03f5b71d7252e336106f7338"
{
"events": {
"33a4e61a9f151497c9a92200cb75a2a7": [
{
"id": "1",
"session_id": "33a4e61a9f151497c9a92200cb75a2a7",
"session_group_id": "7c7728bdcce89cc609fee3c922746780",
"stream_id": "base",
"sub_id": "base",
"event": "publish",
"start_ts": "1688716033",
"stop_ts": "0",
"host_id": "1479",
"pop_id": "4",
"meta_info": {
"dvr": {
"on": false
}
}
},
{
"id": "2",
"session_id": "33a4e61a9f151497c9a92200cb75a2a7",
"session_group_id": "7c7728bdcce89cc609fee3c922746780",
"stream_id": "360p-30",
"sub_id": "base",
"event": "transcode",
"start_ts": "1688716033",
"stop_ts": "0",
"host_id": "1479",
"pop_id": "4",
"meta_info": {
"v_c": "h264",
"v_fps": 60,
"v_prof": "main",
"v_w": 1920,
"v_h": 1080,
"a_c": "aac",
"v_br": 3000000,
"preset": "medium",
"a_br": 128000,
"v_kf": 2,
"v_cq": 23,
"f_mr": 3300001
}
}
]
}
}
Name | Type | Description |
---|---|---|
* | array | A list of active sessions for the given zone |
Status | Type | Description |
---|---|---|
200 | string | Information about the requested livestreaming session |
400 | string | An error message |
401 | string | User api key not specified |
532 | string | An error message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
The name of the zone. |
|
include_session_group | bool |
Include session_group info in the response. |
curl -X GET "https://api.ucdn.com/v4/livestreaming/get_active_session?zone_name=any-zone-name&include_session_group=true&token=acf0230d03f5b71d7252e336106f7338"
{
"1": {
"id": "ec0331bcfee0a6e3165063bc952cdb66",
"session_group_id": "2b41dd9f1dccf81fc0ef56842635dd55",
"transcode": {
"first-transcode": {
"base": {
"id": "8",
"session_id": "ec0331bcfee0a6e3165063bc952cdb66",
"account_id": "1",
"event": "transcode",
"start_ts": "1695126124",
"stop_ts": "0",
"host_id": "1479",
"pop_id": "4",
"meta_info": {
"v_c": "h264",
"v_fps": 60,
"v_prof": "main",
"v_w": 1920,
"v_h": 1080,
"a_c": "aac",
"v_br": 3000000,
"preset": "medium",
"a_br": 128000,
"v_kf": 2,
"v_cq": 23,
"f_mr": 3300001
}
}
},
"second-transcode": {
"base": {
"id": "7",
"session_id": "ec0331bcfee0a6e3165063bc952cdb66",
"account_id": "1",
"event": "transcode",
"start_ts": "1695126124",
"stop_ts": "0",
"host_id": "1479",
"pop_id": "4",
"meta_info": {
"v_c": "h264",
"v_fps": 60,
"v_prof": "main",
"v_w": 1920,
"v_h": 1080,
"a_c": "aac",
"v_br": 3000000,
"preset": "medium",
"a_br": 128000,
"v_kf": 2,
"v_cq": 23,
"f_mr": 3300001
}
}
}
},
"publish": {
"base": {
"base": {
"id": "6",
"session_id": "ec0331bcfee0a6e3165063bc952cdb66",
"account_id": "1",
"event": "publish",
"start_ts": "1695126124",
"stop_ts": "0",
"host_id": "1479",
"pop_id": "4",
"meta_info": {
"dvr": {
"on": true,
"session_distinction_interval_mins": "240",
"max_window_duration_mins": "60",
"keep_full_playlist": false
}
}
}
}
},
"statuses": {
"streams": {
"base": {
"status": "live"
},
"first-transcode": {
"status": "live"
},
"second-transcode": {
"status": "live"
}
}
},
"session_group_active": true
}
}
Name | Type | Description |
---|---|---|
session_group_id | string | ID of the requested DVR session |
account_id | string | ID of the ZONE |
start_ts | string | UNIX timestamp of when the requested DVR session started |
stop_ts | string | UNIX timestamp of when the requested DVR session ended |
Status | Type | Description |
---|---|---|
200 | string | Information about the requested session group, contains timestamps of when it started and ended. If the session is ongoing the end timestamp is '0' |
400 | string | An error message |
401 | string | User api key not specified |
532 | string | An error message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
The name of the zone. |
|
session_group_id | integer required | Existing session group id |
The id of this sessoin group. |
curl -X GET " https://api.ucdn.com/v4/livestreaming/get_session_group?zone_name=any-zone-name&session_group_id=621c21d50c340a26f6ea8806b82aea87&token=acf0230d03f5b71d7252e336106f7338"
{
"session_group_id": "7c7728bdcce89cc609fee3c922746780",
"account_id": "1",
"start_ts": "1688716033",
"stop_ts": "0"
}
Status | Type | Description |
---|---|---|
200 | string | Success message |
400 | string | An error message |
401 | string | User api key not specified |
532 | string | An error message |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
The name of the zone. |
curl -X POST "https://api.ucdn.com/v4/livestreaming/post_active_session_group_reset?zone_name=any-zone-name&token=acf0230d03f5b71d7252e336106f7338" --header "Content-Type: application/json" --data ''
{
"message": "OK"
}
Name | Type | Description |
---|---|---|
message | string | The message returned from the api call. |
Status | Type | Description |
---|---|---|
200 | string | Successfully enabled/disabled zone. |
401 | string | Input parameter problem - invalid token, invalid zone name |
401 | string | An error message. Problem with the authentication. Invalid token. |
404 | string | Zone with given name does not exists. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
|
enable | bool | Only one paramter (enable/disable) should be passed. |
This parameter enables the zone. |
curl -X PATCH 'https://api.ucdn.com/v4/livestreaming/toggle_zone_status?zone_name=test-zone&token=acf0230d03f5b71d7252e336106f7338' \
--header "Content-Type: application/json" \
--data '{"enable": true}'
{
"message": "Zone enabled"
}
Name | Type | Description |
---|---|---|
message | string | The message returned from the api call. |
Status | Type | Description |
---|---|---|
200 | string | Successfully enabled/disabled zone. |
401 | string | Input parameter problem - invalid token, invalid zone name |
401 | string | An error message. Problem with the authentication. Invalid token. |
404 | string | Zone with given name does not exists. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
|
disable | bool | Only one paramter (enable/disable) should be passed. |
This parameter disables the zone. |
curl -X PATCH 'https://api.ucdn.com/v4/livestreaming/toggle_zone_status?zone_name=test-zone&token=acf0230d03f5b71d7252e336106f7338' \
--header "Content-Type: application/json" \
--data '{"disable": true}'
{
"message": "Zone disabled"
}
Name | Type | Description |
---|---|---|
message | string | The message returned from the api call. |
Status | Type | Description |
---|---|---|
200 | string | Successfully activated letsencrypt. |
401 | string | Input parameter problem - invalid token, invalid zone name. |
401 | string | An error message. Problem with the authentication. Invalid token. |
404 | string | Zone with given name does not exists. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
curl -X POST 'https://api.ucdn.com/v4/livestreaming/activate_letsencrypt?zone_name=test-zone&token=acf0230d03f5b71d7252e336106f7338'
{
"message": "Successfully activated letsencrypt."
}
Name | Type | Description |
---|---|---|
message | string | The message returned from the api call. |
Status | Type | Description |
---|---|---|
200 | string | Successfully deactivated letsencrypt. |
401 | string | Input parameter problem - invalid token, invalid zone name. |
401 | string | An error message. Problem with the authentication. Invalid token. |
404 | string | Zone with given name does not exists. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
curl -X DELETE 'https://api.ucdn.com/v4/livestreaming/deactivate_letsencrypt?zone_name=test-zone&token=acf0230d03f5b71d7252e336106f7338'
{
"message": "Successfully deactivated letsencrypt."
}
Name | Type | Description |
---|---|---|
letsencrypt_active | string | Current letsencrypt status. |
Status | Type | Description |
---|---|---|
200 | string | Letsencrypt status. |
401 | string | An error message. Problem with the authentication. Invalid token. |
404 | string | Zone with given name does not exists. |
Name | Type | Validation | Default | Description |
---|---|---|---|---|
zone_name | string required | Existing zone name |
This parameter is required. |
curl -X GET 'https://api.ucdn.com/v4/livestreaming/check_letsencrypt_status?token=acf0230d03f5b71d7252e336106f7338'
{
"letsencrypt_active": "0"
}