- Distribution
- Headers
- origin
- SSL Certificates
- Let's Encrypt
- Cache Controls
- Access Controls
- Prefetch
- Purge
- usages
- Traffic Usage
Create CDN Distribution
POST
https://apistream.gotipath.com/v1/distributions
cdndistribution
Last modified:2023-09-19 14:46:20
Maintainer:Not configured
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer 2f68dbbf-519d-4f01-9636-e2421b68f379
Header Params
X-Auth-ClientId
string
required
Default:
ebe8bac0-eaef-4548-8b59-96c9ec38a22b
X-Auth-LibraryId
string
required
Default:
89898172-d32b-49f8-a94a-bdf0c6ca1bd9
X-Auth-ApiKey
string
required
Default:
pEBPYVUNMbP7uDsb0W2h3oTjpEqr32fFh/3TNUhvFcJt7/J/hyV+5LctVWONgzaw+w+PpQ
Body Params application/json
label
string
required
>= 1 characters<= 100 characters
Example:
VOD CDN
description
string
optional
>= 1 characters<= 255 characters
Example:
using for video cdn
type
enum<string>
required
Allowed values:
multigotipath
origin_type
enum<string>
required
Allowed values:
s3http
domain_type
enum<string>
required
Allowed values:
subdomaincustom
domain
string
write-onlyoptional
Example:
cdn.xyz.com
acceleration_type
enum<string>
required
Allowed values:
staticmedialivestreamdiy
Example:
static
is_http2
boolean
optional
Default:
false
is_http3
boolean
optional
Default:
false
is_livestream
boolean
optional
Default:
false
is_redirect_http_to_https
boolean
optional
Default:
false
enable_ssl
boolean
optional
Default:
false
le_issue
boolean
optional
Default:
false
certificate_id
string
optional
origin
object
required
label
string
required
url
string
required
Examples:
https://gotipath.comhttp://gotipath.comhttp://gotipath.com:80http://gotipaht.com:80/hello.jpg
type
string
required
host_header
string <hostname> | null
optional
Example:
gotipath.com
Example
{
"type": "gotipath",
"label": "Gotipath CDN",
"description": "New Gotipath CDN",
"origin_type": "custom",
"domain_type": "custom",
"domain": "cdn234.sohel.pro",
"acceleration_type": "static",
"is_http2": false,
"is_http3": false,
"is_livestream": false,
"is_redirect_http_to_https": false,
"enable_ssl": true,
"le_issue": false,
"host_header": "hello.com",
"origin": {
"label": "Gotipath",
"url": "gotipath.com",
"type": "custom",
"port": 80,
"protocol": "http"
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://apistream.gotipath.com/v1/distributions' \
--header 'X-Auth-ClientId;' \
--header 'X-Auth-LibraryId;' \
--header 'X-Auth-ApiKey;' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "gotipath",
"label": "Gotipath CDN",
"description": "New Gotipath CDN",
"origin_type": "custom",
"domain_type": "custom",
"domain": "cdn234.sohel.pro",
"acceleration_type": "static",
"is_http2": false,
"is_http3": false,
"is_livestream": false,
"is_redirect_http_to_https": false,
"enable_ssl": true,
"le_issue": false,
"host_header": "hello.com",
"origin": {
"label": "Gotipath",
"url": "gotipath.com",
"type": "custom",
"port": 80,
"protocol": "http"
}
}'
Responses
🟢201Created
application/json
Body
status
integer
required
message
string
required
result
object
required
id
string
required
delivery_domain
string
required
acme_challenge_domain
null
required
delivery_domain_ttl
integer
required
acme_challenge_domain_ttl
integer
required
is_cname_valid
boolean
required
is_acme_challenge_valid
boolean
required
customer_id
string
required
certificate_id
null
optional
label
string
required
description
string
required
origin_type
string
required
cdn_type
string
required
domain
string
required
domain_type
string
required
acceleration_type
string
required
enable_ssl
boolean
required
is_http2
boolean
required
le_issue
boolean
required
is_redirect_http_to_https
boolean
required
status
string
required
origins
array [object {7}]
required
host_header
string
required
sni
string
required
certificate
null
required
created_by
string
required
updated_by
null
required
created_at
string
required
updated_at
string
required
success
boolean
required
Example
{
"status": 0,
"message": "string",
"result": {
"id": "string",
"delivery_domain": "string",
"acme_challenge_domain": null,
"delivery_domain_ttl": 0,
"acme_challenge_domain_ttl": 0,
"is_cname_valid": true,
"is_acme_challenge_valid": true,
"customer_id": "string",
"certificate_id": null,
"label": "string",
"description": "string",
"origin_type": "string",
"cdn_type": "string",
"domain": "string",
"domain_type": "string",
"acceleration_type": "string",
"enable_ssl": true,
"is_http2": true,
"le_issue": true,
"is_redirect_http_to_https": true,
"status": "string",
"origins": [
{
"id": "string",
"distribution_id": "string",
"type": "string",
"label": "string",
"url": "string",
"protocol": "string",
"load_balancer_type": "string"
}
],
"host_header": "string",
"sni": "string",
"certificate": null,
"created_by": "string",
"updated_by": null,
"created_at": "string",
"updated_at": "string"
},
"success": true
}
🟠400Bad Request
🟠422Parameter Error
Modified at 2023-09-19 14:46:20