CDNShark Documentation

Customer API

← Back to Documentation

API Reference

Every customer endpoint. The base URL is https://cdnshark.com/api. Authenticate with your API token: see API Authentication & Tokens. Send Accept: application/json. Errors and limits are covered in Rate Limits & Errors.

Tokens

MethodPathPermissionDescription
GET/api/tokensany API tokenList tokens
POST/api/tokensany API tokenIssue a new API token, replacing the current one
DELETE/api/tokens/{id}any API tokenRevoke one token
DELETE/api/tokens/allany API tokenRevoke all tokens

Domains: Domains API

MethodPathPermissionDescription
GET/api/domainsdomains:readList domains
POST/api/domainsdomains:writeAdd a domain (creates its DNS zone)
PUT/api/domains/{id}domains:writeChange nameservers or name
DELETE/api/domains/{domain_name}domains:writeDelete a domain and its zone

DNS: DNS API

MethodPathPermissionDescription
GET/api/dnsdns:readList zones
GET/api/dns/{zone}dns:readList a zone's records
POST/api/dns/{zone}/recordsdns:writeAdd a record
PUT/api/dns/{zone}/recordsdns:writeChange a record
DELETE/api/dns/{zone}/recordsdns:writeDelete a record

Pull zones: Pull Zones API

MethodPathPermissionDescription
GET/api/pullzonespullzones:readList pull zones
POST/api/pullzonespullzones:writeCreate a pull zone
PUT/api/pullzones/{id}pullzones:writeChange a pull zone
POST/api/pullzones/{id}/purgepullzones:writePurge the cache: Purge Cache via API
DELETE/api/pullzones/{id}pullzones:writeDelete a pull zone

Storage: Storage Buckets API

MethodPathPermissionDescription
GET/api/storage/bucketsstorage:readList buckets
POST/api/storage/bucketsstorage:writeCreate a bucket
GET/api/storage/buckets/{bucket_name}/credentialsstorage:readS3 endpoint and keys
DELETE/api/storage/buckets/{bucket_name}storage:writeDelete a bucket and its objects

Video: Video Libraries & Playback Tokens API

MethodPathPermissionDescription
GET/api/video/librariesstreams:readList libraries
POST/api/video/librariesstreams:writeCreate a library
DELETE/api/video/libraries/{id}streams:writeDelete a library
GET/api/video/playback-tokensstreams:readList playback tokens
POST/api/video/playback-tokenstreams:writeCreate a playback token
GET/api/video/playback-token/{id}streams:readGet a playback token
POST/api/video/playback-token/{id}/refreshstreams:writeNew expiry and URL
DELETE/api/video/playback-token/{id}streams:writeRevoke
GET/api/video/playback-token/{id}/logsstreams:readAccess log

Live streams: Live Streams API

MethodPathPermissionDescription
GET/api/live/streamsstreams:readList streams
POST/api/live/streamsstreams:writeCreate a stream
GET/api/live/streams/{id}streams:readGet a stream, including its key
POST/api/live/streams/{id}/rotate-keystreams:writeNew stream key (playback URL unchanged)
DELETE/api/live/streams/{id}streams:writeDelete a stream

Webhooks: Webhooks API

MethodPathPermissionDescription
GET/api/webhookswebhooks:readList webhooks
POST/api/webhookswebhooks:writeCreate a webhook
PUT/api/webhooks/{id}webhooks:writeChange a webhook
DELETE/api/webhooks/{id}webhooks:writeDelete a webhook
GET/api/webhooks/{id}/logswebhooks:readRecent deliveries
GET/api/webhooks/eventswebhooks:readEvent names