GET https://api.ucdn.com/v3/account/?token=your-api-token
.
application/json
or
application/x-www-form-urlencoded
.
Content-Type header in the request is required.Name | Flags | Description |
---|---|---|
*** | array | All certificates for this account. |
Status | Flags | Description |
---|---|---|
200 | array | success message |
curl --include --request GET "https://api.ucdn.com/v3/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 | Flags | 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 | Flags | Description |
---|---|---|
200 | object | success message |
404 | string | certificate did not exists |
curl --include --request GET "https://api.ucdn.com/v3/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 | Flags | Description |
---|---|---|
200 | string | success message |
409 | string | Error message |
Name | Flags | Validation | Default | Description |
---|---|---|---|---|
hostname | string required | It should be valid host name. Such as domain or IP. Examples: example.com, 234.234.234.234, *.example.com |
Show even if the zone has been deleted. |
|
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 --include --request POST "https://api.ucdn.com/v3/certificate/?token=acf0230d03f5b71d7252e336106f7338" --header "Content-Type: application/json" -d '{"hostname": "cdn2.section9.com", "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 | Flags | Description |
---|---|---|
200 | string | success message |
404 | string | certificate did not exists |
curl --include --request DELETE "https://api.ucdn.com/v3/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 | Flags | Description |
---|---|---|
bytes_served | int | Bytes served for the requested period |
hits | int | File hits for the requested period |
Status | Flags | Description |
---|---|---|
200 | json | data |
400 | json | Fail message |
404 | json | Fail message |
532 | json | Fail message |
Name | Flags | Validation | Default | Description |
---|---|---|---|---|
date_from | required 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 | required string | GMT date in format YYYY-MM-DD or a Unix timestamp | Now |
To which date to generate the reports. Exclusive. |
curl --include "https://api.ucdn.com/v3/reports/1/?date_from=2015-08-12&date_to=2015-08-13&token=a1cceef964910f10947c09257e87ca40"
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 | Flags | Description |
---|---|---|
elements | array | An array with the generated data. Every element in the array represents a time slot. See the `element_description` field for 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 | Flags | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Flags | 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 id or a list of zone ids separated with comma. Example: 1,2,3,4 | 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. |
by | string | One of to following: 5min, hour, day | hour |
Group the reported elements in slots with particular time length. |
curl --include "https://api.ucdn.com/v3/reports/cache/hits/?token=a1cceef964910f10947c09257e87ca40"
HTTP/1.1 200 OK
Date: Wed, 12 Aug 2015 11:04:50 GMT
Server: Apache
Vary: Accept-Encoding
Content-Length: 960
Content-Type: application/json; charset=utf-8
{
"element_description": [
"unix timestamp of the time slot start",
"cache hits",
"cache misses"
],
"element_duration": 3600,
"elements": [
[
1439290800,
0,
0
],
[
1439294400,
5396496593,
899416094
],
[
1439298000,
5247521743,
874586953
],
[
1439301600,
5162247017,
860374498
],
[
1439305200,
5152343919,
858723984
],
[
1439308800,
5249369554,
874894920
],
[
1439312400,
5552153129,
925358850
],
[
1439316000,
6019501815,
1003250298
],
[
1439319600,
6515737416,
1085956233
],
[
1439323200,
6707771973,
1117961992
],
[
1439326800,
7180243032,
1196707169
],
[
1439330400,
7016808093,
1169468011
],
[
1439334000,
6704402747,
1117400453
],
[
1439337600,
6369665676,
1061610943
],
[
1439341200,
6353130634,
1058855104
],
[
1439344800,
6856277563,
1142712923
],
[
1439348400,
7442160406,
1240360064
],
[
1439352000,
7223771374,
1203961891
],
[
1439355600,
6098735079,
1016455844
],
[
1439359200,
4812403956,
802067323
],
[
1439362800,
4172597099,
695432846
],
[
1439366400,
4111374288,
685229044
],
[
1439370000,
4391737590,
731956260
],
[
1439373600,
4073831201,
678971863
],
[
1439377200,
0,
0
]
]
}
Name | Flags | Description |
---|---|---|
elements | object | A key-value pairs. The key in the pair is a ISO 3166-1 country code. The value an array with the generated data. Every element in the array represents a time slot. See the `element_description` field for 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 | Flags | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Flags | 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 id or a list of zone ids separated with comma. Example: 1,2,3,4 | 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. |
by | string | One of to following: 5min, hour, day | hour |
Group the reported elements in slots with particular time length. |
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. |
curl --include "https://api.ucdn.com/v3/reports/countries/?token=a1cceef964910f10947c09257e87ca40"
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": 3600,
"elements": {
"CH": [
[
1439290800,
0,
0
],
[
1439294400,
384465,
19224985
],
[
1439298000,
373860,
18694275
],
[
1439301600,
367775,
18390470
],
[
1439305200,
367080,
18355200
],
[
1439308800,
373990,
18700850
],
[
1439312400,
395555,
19779515
],
[
1439316000,
428855,
21444440
],
[
1439319600,
464220,
23212285
],
[
1439323200,
477890,
23896410
],
[
1439326800,
511555,
25579590
],
[
1439330400,
499925,
24997345
],
[
1439334000,
477660,
23884405
],
[
1439337600,
453815,
22691905
],
[
1439341200,
452635,
22632990
],
[
1439344800,
488485,
24425460
],
[
1439348400,
530235,
26512670
],
[
1439352000,
514665,
25734655
],
[
1439355600,
434510,
21726715
],
[
1439359200,
342845,
17144165
],
[
1439362800,
297270,
14864850
],
[
1439366400,
292910,
14646740
],
[
1439370000,
312875,
15645535
],
[
1439373600,
290240,
14513000
],
[
1439377200,
0,
0
]
],
"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
],
[
1439326800,
568410,
28421770
],
[
1439330400,
555470,
27774840
],
[
1439334000,
530735,
26538230
],
[
1439337600,
504230,
25213225
],
[
1439341200,
502930,
25147775
],
[
1439344800,
542765,
27139400
],
[
1439348400,
589135,
29458515
],
[
1439352000,
571850,
28594060
],
[
1439355600,
482785,
24140800
],
[
1439359200,
380950,
19049070
],
[
1439362800,
330290,
16516505
],
[
1439366400,
325450,
16274160
],
[
1439370000,
347645,
17383935
],
[
1439373600,
322490,
16125560
],
[
1439377200,
0,
0
]
],
"MX": [
[
1439290800,
0,
0
],
[
1439294400,
261435,
13072990
],
[
1439298000,
254210,
12712090
],
[
1439301600,
250090,
12505515
],
[
1439305200,
249605,
12481520
],
[
1439308800,
254305,
12716565
],
[
1439312400,
268970,
13450060
],
[
1439316000,
291615,
14582210
],
[
1439319600,
315660,
15784340
],
[
1439323200,
324955,
16249550
],
[
1439326800,
347845,
17394115
],
[
1439330400,
339935,
16998190
],
[
1439334000,
324800,
16241380
],
[
1439337600,
308580,
15430480
],
[
1439341200,
307775,
15390430
],
[
1439344800,
332155,
16609305
],
[
1439348400,
360550,
18028610
],
[
1439352000,
349965,
17499560
],
[
1439355600,
295450,
14774155
],
[
1439359200,
233140,
11658020
],
[
1439362800,
202135,
10108085
],
[
1439366400,
199170,
9959775
],
[
1439370000,
212745,
10638965
],
[
1439373600,
197355,
9868830
],
[
1439377200,
0,
0
]
],
"RU": [
[
1439290800,
0,
0
],
[
1439294400,
326800,
16341240
],
[
1439298000,
317775,
15890115
],
[
1439301600,
312615,
15631895
],
[
1439305200,
312020,
15601915
],
[
1439308800,
317880,
15895725
],
[
1439312400,
336225,
16812575
],
[
1439316000,
364530,
18227770
],
[
1439319600,
394585,
19730440
],
[
1439323200,
406205,
20311945
],
[
1439326800,
434830,
21742650
],
[
1439330400,
424925,
21247740
],
[
1439334000,
406010,
20301735
],
[
1439337600,
385735,
19288100
],
[
1439341200,
384725,
19238045
],
[
1439344800,
415190,
20761630
],
[
1439348400,
450685,
22535765
],
[
1439352000,
437460,
21874445
],
[
1439355600,
369335,
18467715
],
[
1439359200,
291435,
14572525
],
[
1439362800,
252685,
12635120
],
[
1439366400,
248960,
12449735
],
[
1439370000,
265945,
13298700
],
[
1439373600,
246695,
12336040
],
[
1439377200,
0,
0
]
],
"US": [
[
1439290800,
0,
0
],
[
1439294400,
449685,
22485365
],
[
1439298000,
437260,
21864645
],
[
1439301600,
430150,
21509335
],
[
1439305200,
429335,
21468070
],
[
1439308800,
437415,
21872345
],
[
1439312400,
462655,
23133930
],
[
1439316000,
501595,
25081230
],
[
1439319600,
542950,
27148880
],
[
1439323200,
558955,
27949025
],
[
1439326800,
598325,
29917650
],
[
1439330400,
584710,
29236665
],
[
1439334000,
558665,
27934990
],
[
1439337600,
530770,
26540240
],
[
1439341200,
529400,
26471355
],
[
1439344800,
571320,
28567790
],
[
1439348400,
620150,
31008980
],
[
1439352000,
601955,
30099015
],
[
1439355600,
508200,
25411365
],
[
1439359200,
400995,
20051655
],
[
1439362800,
347695,
17385790
],
[
1439366400,
342585,
17130695
],
[
1439370000,
365945,
18298885
],
[
1439373600,
339460,
16974280
],
[
1439377200,
0,
0
]
],
"VN": [
[
1439290800,
0,
0
],
[
1439294400,
196060,
9804735
],
[
1439298000,
190655,
9534070
],
[
1439301600,
187550,
9379120
],
[
1439305200,
187185,
9361135
],
[
1439308800,
190730,
9537415
],
[
1439312400,
201715,
10087535
],
[
1439316000,
218700,
10936660
],
[
1439319600,
236740,
11838255
],
[
1439323200,
243710,
12187150
],
[
1439326800,
260885,
13045570
],
[
1439330400,
254950,
12748630
],
[
1439334000,
243590,
12181035
],
[
1439337600,
231425,
11572860
],
[
1439341200,
230825,
11542820
],
[
1439344800,
249110,
12456965
],
[
1439348400,
270395,
13521445
],
[
1439352000,
262465,
13124655
],
[
1439355600,
221585,
11080610
],
[
1439359200,
174850,
8743510
],
[
1439362800,
151590,
7581045
],
[
1439366400,
149365,
7469825
],
[
1439370000,
159550,
7979210
],
[
1439373600,
148010,
7401615
],
[
1439377200,
0,
0
]
]
}
}
Name | Flags | Description |
---|---|---|
elements | array | An array with the generated data. Every element in the array represents a time slot. See the `element_description` field for 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 | Flags | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Flags | 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 --include "https://api.ucdn.com/v3/reports/storages/?token=a1cceef964910f10947c09257e87ca40"
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 | Flags | Description |
---|---|---|
elements | object | A key-value pairs. The key in the pair is a HTTP status code. The value an array with the generated data. Every element in the array represents a time slot. See the `element_description` field for 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 | Flags | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Flags | 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 id or a list of zone ids separated with comma. Example: 1,2,3,4 | 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. |
by | string | One of to following: 5min, hour, day | hour |
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. |
curl --include "https://api.ucdn.com/v3/reports/status/codes/?from=2015-08-12&to=2015-08-13&token=a1cceef964910f10947c09257e87ca40&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 | Flags | Description |
---|---|---|
elements | array | An array with the generated data. Every element in the array represents a time slot. See the `element_description` field for 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 | Flags | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Flags | 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 id or a list of zone ids separated with comma. Example: 1,2,3,4 | 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. |
by | string | One of to following: 5min, hour, day | hour |
Group the reported elements in slots with particular time length. |
curl --include "https://api.ucdn.com/v3/reports/hits/?token=a1cceef964910f10947c09257e87ca40"
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 | Flags | Description |
---|---|---|
elements | array | An array with the generated data. Every element in the array represents a time slot. See the `element_description` field for 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 | Flags | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Flags | 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 id or a list of zone ids separated with comma. Example: 1,2,3,4 | 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. |
by | string | One of to following: 5min, hour, day | hour |
Group the reported elements in slots with particular time length. |
curl --include "https://api.ucdn.com/v3/reports/bytes/?from=2015-08-12&to=2015-08-13&token=a1cceef964910f10947c09257e87ca40&zones=1,3"
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 | Flags | Description |
---|---|---|
elements | array | An array with the generated data. Every element in the array represents a time slot. See the `element_description` field for 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 | Flags | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Flags | 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 id or a list of zone ids separated with comma. Example: 1,2,3,4 | 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. |
by | string | One of to following: 5min, hour, day | hour |
Group the reported elements in slots with particular time length. |
Name | Flags | Description |
---|---|---|
elements | array | An array with the generated data. Every element in the array represents a time slot. See the `element_description` field for 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 | Flags | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Flags | 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 id or a list of zone ids separated with comma. Example: 1,2,3,4 | 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. |
by | string | One of to following: 5min, hour, day | hour |
Group the reported elements in slots with particular time length. |
Name | Flags | Description |
---|---|---|
elements | array | An array with the generated data. Every element in the array represents a time slot. See the `element_description` field for 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 | Flags | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Flags | 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 id or a list of zone ids separated with comma. Example: 1,2,3,4 | 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. |
by | string | One of to following: 5min, hour, day | hour |
Group the reported elements in slots with particular time length. |
Name | Flags | Description |
---|---|---|
elements | array | An array with the generated data. Every element in the array represents a time slot. See the `element_description` field for 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 | Flags | Description |
---|---|---|
200 | object | Reports data |
400 | string | Fail message |
532 | string | Fail message |
Name | Flags | 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 id or a list of zone ids separated with comma. Example: 1,2,3,4 | 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. |
by | string | One of to following: 5min, hour, day | hour |
Group the reported elements in slots with particular time length. |
Name | Flags | Description |
---|---|---|
job_id | string | The ID of the newly created purge job |
Status | Flags | Description |
---|---|---|
204 | json | Success message |
532 | json | Fail message |
Name | Flags | Validation | Default | Description |
---|---|---|---|---|
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 |
POST https://api.ucdn.com/v3/purge/{zone_id}/ |
They will be supported as long as it is technically possible. Regardless, consider them deprecated and make sure you are using the new URI.
curl --include --request POST "https://api.ucdn.com/v3/purge/1/?token=a1cceef964910f10947c09257e87ca40" --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 | Flags | Description |
---|---|---|
job_id | string | The ID of this purge job |
files | array | List of 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 | Flags | Description |
---|---|---|
200 | string | Success message |
532 | string | Fail message |
Name | Flags | Validation | Default | Description |
---|---|---|---|---|
job_id | string | - |
A purge job id as returned by the job creation call |
GET https://api.ucdn.com/v3/purge/{job_id}/ |
They will be supported as long as it is technically possible. Regardless, consider them deprecated and make sure you are using the new URI.
curl --include "https://api.ucdn.com/v3/purge/2170dd23decc45691adf28987282d0bc/?token=a1cceef964910f10947c09257e87ca40"
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 | Flags | Description |
---|---|---|
200 | array | Array with purge jobs |
532 | string | Fail message |
Name | Flags | Validation | Default | Description |
---|---|---|---|---|
status | string | Supporeted 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/v3/purge/?token=a1cceef964910f10947c09257e87ca40&status=finished"
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 | Flags | Description |
---|---|---|
200 | string | Success message |
532 | string | Fail message |
Name | Flags | Validation | Default | Description |
---|---|---|---|---|
job_id | string | - |
A purge job id as returned by the job creation call |
DELETE https://api.ucdn.com/v3/purge/{job_id} |
They will be supported as long as it is technically possible. Regardless, consider them deprecated and make sure you are using the new URI.
curl --include --request DELETE "https://api.ucdn.com/v3/purge/cd704ed605964e55a2a3c64162f94b05/?token=a1cceef964910f10947c09257e87ca40"
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 | Flags | Description |
---|---|---|
id | int | The id of the created storage |
status | string | Operation success message |
Status | Flags | Description |
---|---|---|
200 | json | Message for successful creation |
532 | json | Error message |
504 | json | Storage backend failed |
Name | Flags | 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 --include --request POST "https://api.ucdn.com/v3/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 | Flags | 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 | Flags | Description |
---|---|---|
200 | array | Array with information for all storages |
532 | json | Error message |
curl --include --request GET "https://api.ucdn.com/v3/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 | Flags | 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 | Flags | 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 | Flags | Validation | Default | Description |
---|---|---|---|---|
region | string required | "europe" or "north-america". |
The region in which will storages 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 --include --request PATCH "https://api.ucdn.com/v3/storages/?token=jasdhjshad234234jh" --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 | Flags | 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 | Flags | Description |
---|---|---|
200 | json | Information for this storage |
404 | json | No active storage found message |
532 | json | Error message |
curl --include --request GET "https://api.ucdn.com/v3/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 | Flags | Description |
---|---|---|
bytes | int | Number of bytes consumed on this storage |
objects | int | Number files and folders on this storage |
Status | Flags | Description |
---|---|---|
200 | json | Consumed size |
404 | json | No active storage found message |
532 | json | Error message |
curl --include --request GET "https://api.ucdn.com/v3/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 | Flags | Description |
---|---|---|
200 | json | Message for successful deletion |
404 | json | No active storage found message |
532 | json | Error message |
504 | json | Storage backend failed |
curl --include --request DELETE "https://api.ucdn.com/v3/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"
}
Status | Flags | Description |
---|---|---|
200 | json | Message for successful synchronization |
532 | json | Error message |
504 | json | Storage backend failed |
Name | Flags | Validation | Default | Description |
---|---|---|---|---|
synchronize_with | integer required | Valid id of an other storage container. |
Identifies the container with which this one will be synchronized. |
curl --include --request PATCH "https://api.ucdn.com/v3/storage/1/sync/?token=acf0230d03f5b71d7252e336106f7338" --header "Content-Type: application/json" -d '{"synchronize_with": 2}'
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2015 08:10:32 GMT
Server: Apache
X-Powered-By: PHP/5.6.8-pl0-gentoo
Vary: Accept-Encoding
Content-Length: 40
Content-Type: application/json; charset=utf-8
{
"message": "Storages were synchronized"
}
Status | Flags | Description |
---|---|---|
200 | json | Message for success |
404 | json | No such storage found message |
532 | json | Error message |
504 | json | Storage backend failed |
curl --include --request DELETE --header "X-UCDN-Token: jasdhjshad234234jh" "https://api.ucdn.com/v3/storage/2/sync/"
HTTP/1.1 200 OK
Date: Tue, 24 Nov 2015 11:09:05 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.14
Content-Length: 63
Content-Type: application/json; charset=utf-8
{
"message": "Synchronization between storages has been removed"
}
Name | Flags | 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 | Flags | Description |
---|---|---|
200 | string | Message |
401 | string | Invalid login credentials |
532 | string | An error message |
Name | Flags | 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 --include --request POST "https://api.ucdn.com/v3/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 | Flags | 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 | Flags | Description |
---|---|---|
200 | object | Account Information |
curl --include --request GET "https://api.ucdn.com/v3/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 | Flags | Description |
---|---|---|
200 | object | Account Information |
Name | Flags | Description |
---|---|---|
* | array | A list of your zones |
Status | Flags | Description |
---|---|---|
200 | array | A list of zones |
Name | Description |
---|---|
count | Returns the count of your zones |
curl --include --request GET "https://api.ucdn.com/v3/zones/?token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2015 08:03:10 GMT
Server: Apache
X-Powered-By: PHP/5.3.10-1ubuntu3.16
X-Cache: miss
Vary: Accept-Encoding
Content-Length: 1594
Content-Type: application/json; charset=utf-8
[
{
"id": "1",
"cdn_domain": "a1-121.so.clients.cdn13.com",
"object_size": "small",
"upstream": {
"endpoints": [
{
"host": "news.com",
"port": 80
}
],
"type": "own",
"proto": "http",
"host_header": "news.com",
"auth": {
"type": "none"
}
},
"is_active": "1",
"create_ts": "1423139335",
"update_ts": "1435564990",
"storage_id": null,
"error_pages": [],
"referers": [],
"geo_filter": [],
"limit_rate": [],
"custom_domains": [
"cdn.section9.com"
],
"cache_reuse_from": null,
"expiration": 3600,
"hash_secret": null,
"hash_algorithm": null,
"hash_ttl": null,
"reconfig_status": "reconfiguring"
},
{
"id": "3",
"cdn_domain": "a3-121.so.clients.cdn13.com",
"object_size": "small",
"upstream": {
"endpoints": [
{
"host": "test.com",
"port": 80
}
],
"type": "own",
"proto": "http",
"host_header": "test.com",
"auth": {
"type": "none"
}
},
"is_active": "1",
"create_ts": "1429620438",
"update_ts": "1429620438",
"storage_id": null,
"error_pages": [],
"referers": [],
"geo_filter": [],
"limit_rate": [],
"custom_domains": [],
"cache_reuse_from": null,
"expiration": null,
"hash_secret": null,
"hash_algorithm": null,
"hash_ttl": null,
"reconfig_status": "ready"
},
{
"id": "4",
"cdn_domain": "a4-121.so.clients.cdn13.com",
"object_size": "small",
"upstream": {
"endpoints": [
{
"host": "test.com",
"port": 443
}
],
"type": "own",
"proto": "https",
"host_header": "test.com",
"auth": {
"type": "none"
}
},
"is_active": "1",
"create_ts": "1435316148",
"update_ts": "1435316148",
"storage_id": null,
"error_pages": [],
"referers": [],
"geo_filter": [],
"limit_rate": [],
"custom_domains": [],
"cache_reuse_from": null,
"expiration": null,
"hash_secret": null,
"hash_algorithm": null,
"hash_ttl": null,
"reconfig_status": "ready"
}
]
Name | Flags | Description |
---|---|---|
id | int | This zone ID |
cdn_domain | string | Unique domain name with which you can access your files |
object_size | string | File size for this zone. Small (= 20MB) |
is_active | int | Whether this zone is enabled (1) or disabled (0) |
error_pages | object | Custom error pages activated for this zone |
upstream | object | Upstream for this zone(where to pull files from) |
referers | array | Allowed referers for files in this zone |
geo_filter | object | Geo filtering configuration |
limit_rate | object | Limit rates configuration |
custom_domains | array | Array with custom domains for this zone. They must be CNAMEs this zone's cdn_domain |
cache_reuse_from | int | zone_id of the zone this account reuses cache from |
expiration | int | Forced expiration time of files in this zone |
hash_secret | string | Security token's secret key |
hash_algorithm | string | They hashing algorithm with which the security token is hashed |
hash_ttl | int | Number of seconds for which URLs generated with security token work |
create_ts | int | Unix time of the moment this zone was created |
update_ts | int | Unix time. Last time this zone was edited in any way |
storage_id | int | If this zone uses UCDN Storage as its origin, this is the ID of this storage |
Status | Flags | Description |
---|---|---|
200 | object | Information for thsi zone |
curl --include --request GET "https://api.ucdn.com/v3/zone/1/?token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2015 08:03:09 GMT
Server: Apache
X-Powered-By: PHP/5.3.10-1ubuntu3.16
X-Cache: miss
Vary: Accept-Encoding
Content-Length: 538
Content-Type: application/json; charset=utf-8
{
"id": "1",
"cdn_domain": "a1-121-so.ssl.cdn13.com",
"object_size": "small",
"upstream": {
"endpoints": [
{
"host": "news.com",
"port": 80
}
],
"type": "own",
"proto": "http",
"host_header": "news.com",
"auth": {
"type": "none"
}
},
"is_active": "1",
"create_ts": "1423139335",
"update_ts": "1435564989",
"storage_id": null,
"error_pages": {},
"referers": [],
"geo_filter": [],
"limit_rate": [],
"custom_domains": [
"cdn.section9.com"
],
"cache_reuse_from": null,
"expiration": 3600,
"ssl_type": "own",
"hash_secret": null,
"hash_algorithm": null,
"hash_ttl": null,
"reconfig_status": "reconfiguring"
}
Name | Flags | Description |
---|---|---|
zone_id | int | The ID of the newly created zone |
Status | Flags | Description |
---|---|---|
200 | json | The new zone's id |
532 | json | An error message |
Name | Flags | Validation | Default | Description |
---|---|---|---|---|
object_size | required string |
big small |
File size for this zone. Small objects are those less than 20MB |
|
upstream | required object | valid upstream object |
Discribes where to pull files from. See the example for more info. |
|
custom_domains | string array | domain,domain,domain... |
Custom domains for your zone. They must be CNAMEs to this zone's cdn_domain. This field does not have any effect when using shared SSL. |
|
error_pages | string array | status:url |
Custom URLs to besed for redirecting from various HTTP error statuses (e.g. 404) |
|
referers | string array | valid domains |
Allow access only from certain referers |
|
geo_filter_allow | string array | ISO 3166-1 country code |
Allow access only from certain countries |
|
geo_filter_deny | string array | ISO 3166-1 country code |
Deny access to certain countries |
|
limit_rate_global | string | NNk, e.g. 20k |
Limit rate for every connection in this zone. It is mutually exclusive with limit_rate_security |
|
limit_rate_security | string |
on off |
Use security token's limit rate. It is mutually exclusive with limit_rate_global |
|
hash_secret | string | valid url query string |
Access security token, used in conjuction with hash_algorithm and hash_ttl |
|
hash_algorithm | string |
md5 sha1 |
Hashing algorithm of the security token |
|
hash_ttl | integer | in seconds |
Time to live of the security token hash |
|
cache_reuse_from | integer | valid zone id |
Zone id of another zone. You cane use it to force this zone into using the other's cache. |
|
expiration | integer | in seconds |
Forced cache expiration in seconds. When this is set expire and cache-control headers from the origin are ignored |
## Zone with own origin
curl --include --request POST "https://api.ucdn.com/v3/zone/?token=acf0230d03f5b71d7252e336106f7338" --header "Content-Type: application/json" -d '{"object_size":"small", "upstream":{"endpoints":[{"host":"news.com","port":80}],"type":"own","proto":"http","host_header":"news.com","auth":{"type":"none"}}}'
## Zone with own origin and basic auth
curl --include --request POST "https://api.ucdn.com/v3/zone/?token=acf0230d03f5b71d7252e336106f7338" --header "Content-Type: application/json" -d '{"object_size":"small", "upstream":{"endpoints":[{"host":"news.com","port":80}],"type":"own","proto":"http","host_header":"news.com","auth":{"type":"http_basic", "username":"a", "password": "b"}}}'
## Zone with aws origin and signing key auth
curl --include --request POST "https://api.ucdn.com/v3/zone/?token=acf0230d03f5b71d7252e336106f7338" --header "Content-Type: application/json" -d '{"object_size":"small", "upstream":{"endpoints":[{"host":"s3.eu-central-1.domain.com"}],"type":"aws-s3","proto":"http","auth":{"type":"aws_signing_key","access_key":"examplekey","key_scope":"example_scope","signing_key":"skey1"}}}'
## Zone with aws origin and secret key auth
curl --include --request POST "https://api.ucdn.com/v3/zone/?token=acf0230d03f5b71d7252e336106f7338" --header "Content-Type: application/json" -d '{"object_size":"small", "upstream":{"endpoints":[{"host":"s3.eu-central-1.domain.com", "bucket":"test","region":"test"}],"type":"aws-s3","proto":"http","auth":{"type":"aws_secret_key","access_key":"examplekey","secret_key":"skey1"}}}'
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2015 08:10:37 GMT
Server: Apache
X-Powered-By: PHP/5.3.10-1ubuntu3.16
X-Cache: miss
Vary: Accept-Encoding
Content-Length: 13
Content-Type: application/json; charset=utf-8
{
"zone_id": 5
}
Status | Flags | Description |
---|---|---|
200 | json | Success message |
532 | json | Fail message |
Name | Flags | Validation | Default | Description |
---|---|---|---|---|
upstream | required object | valid upstream object |
Discribes where to pull files from. See the example for more info. |
|
custom_domains | string array | domain,domain,domain... |
Custom domains for your zone. They must be CNAMEs to this zone's cdn_domain. This field does not have any effect when using shared SSL. |
|
error_pages | string array | status:url |
Custom URLs to besed for redirecting from various HTTP error statuses (e.g. 404) |
|
referers | string array | valid domains |
Allow access only from certain referers |
|
geo_filter_allow | string array | ISO 3166-1 country code |
Allow access only from certain countries |
|
geo_filter_deny | string array | ISO 3166-1 country code |
Deny access to certain countries |
|
limit_rate_global | string | NNk, e.g. 20k |
Limit rate for every connection in this zone. It is mutually exclusive with limit_rate_security |
|
limit_rate_security | string |
on off |
Use security token's limit rate. It is mutually exclusive with limit_rate_global |
|
hash_secret | string | valid url query string |
Access security token, used in conjuction with hash_algorithm and hash_ttl |
|
hash_algorithm | string |
md5 sha1 |
Hashing algorithm of the security token |
|
hash_ttl | integer | in seconds |
Time to live of the security token hash |
|
cache_reuse_from | integer | valid zone id |
Zone id of another zone. You cane use it to force this zone into using the other's cache. |
|
expiration | integer | in seconds |
Forced cache expiration in seconds. When this is set expire and cache-control headers from the origin are ignored |
curl --include --request PUT "https://api.ucdn.com/v3/zone/1/?token=acf0230d03f5b71d7252e336106f7338" --header "Content-Type: application/json" -d '{"object_size": "small", "upstream":{"endpoints":[{"host":"news.com","port":80}],"type":"own","proto":"http","host_header":"news.com","auth":{"type":"none"}}, "expiration": 3600, "custom_domains": ["cdn.section9.com"]}'
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2015 08:03:09 GMT
Server: Apache
X-Powered-By: PHP/5.3.10-1ubuntu3.16
X-Cache: miss
Vary: Accept-Encoding
Content-Length: 27
Content-Type: application/json; charset=utf-8
{
"message": "Zone replaced"
}
Status | Flags | Description |
---|---|---|
200 | json | Success message |
532 | json | Fail message |
Name | Description |
---|---|
enable | Enable the zone |
disable | Disable the zone |
clear_security_token | Unset the security token |
clear_geo_filters | Unset the geo filters |
clear_limit_rates | Unset the limit rates |
clear_origins_auth | Unset origin authentication |
clear_referers | Unset referers and referer_filter_rules filter |
clear_referer_filter_rules | Unset referers and referer_filter_rules filter |
clear_custom_domains | Unset all additional domains |
clear_origins_header | Unset the origin "Host:" header |
clear_reuse_cache | Stop reusing another zone's cache |
Name | Flags | Validation | Default | Description |
---|---|---|---|---|
upstream | object | valid upstream object |
Discribes where to pull files from. See the example for more info. |
|
custom_domains | string array | domain,domain,domain... |
Custom domains for your zone. They must be CNAMEs to this zone's cdn_domain. This field does not have any effect when using shared SSL. |
|
error_pages | string array | status:url |
Custom URLs to besed for redirecting from various HTTP error statuses (e.g. 404) |
|
referers | string array | valid domains |
Allow access only from certain referers |
|
geo_filter_allow | string array | ISO 3166-1 country code |
Allow access only from certain countries |
|
geo_filter_deny | string array | ISO 3166-1 country code |
Deny access to certain countries |
|
limit_rate_global | string | NNk, e.g. 20k |
Limit rate for every connection in this zone. It is mutually exclusive with limit_rate_security |
|
limit_rate_security | string |
on off |
Use security token's limit rate. It is mutually exclusive with limit_rate_global |
|
hash_secret | string | valid url query string |
Access security token, used in conjuction with hash_algorithm and hash_ttl |
|
hash_algorithm | string |
md5 sha1 |
Hashing algorithm of the security token |
|
hash_ttl | integer | in seconds |
Time to live of the security token hash |
|
cache_reuse_from | integer | valid zone id |
Zone id of another zone. You cane use it to force this zone into using the other's cache. |
|
expiration | integer | in seconds |
Forced cache expiration in seconds. When this is set expire and cache-control headers from the origin are ignored |
curl --include --request PATCH "https://api.ucdn.com/v3/zone/1/?token=acf0230d03f5b71d7252e336106f7338" --header "Content-Type: application/json" -d '{"expiration": 3600}'
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: 26
Content-Type: application/json; charset=utf-8
{
"message": "Zone patched"
}
Status | Flags | Description |
---|---|---|
200 | json | Success message |
406 | json | Fail message |
532 | json | Fail message |
curl --include --request DELETE "https://api.ucdn.com/v3/zone/4/?token=acf0230d03f5b71d7252e336106f7338"
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2015 08:10:38 GMT
Server: Apache
X-Powered-By: PHP/5.3.10-1ubuntu3.16
X-Cache: miss
Vary: Accept-Encoding
Content-Length: 26
Content-Type: application/json; charset=utf-8
{
"message": "Zone deleted"
}
Status | Flags | Description |
---|---|---|
202 | string | Success message |
200 | string | Nothing changed message |
400 | string | Bad request |
532 | string | Fail message |
Name | Flags | Validation | Default | Description |
---|---|---|---|---|
zone_id | integer required | Existing zone id |
Create letsencrypt for this zone_id |