Skip to content

CDN

All operations require authentication.

16 operationsv1/hosting/web
Agent setup

List available log kindsProduction

GET
/1.0/hosting/web/cdn/log/kind

Response

200string[]successful operation

Reads your token from $OVH_TOKEN

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/cdn/log/kind \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "string"]

Get a log kindProduction

GET
/1.0/hosting/web/cdn/log/kind/{name}

Path parameters

name
required
string

Name

Response

200LogKindsuccessful operation
additionalReturnedFields
read-only
string[]

List of additional log fields managed in this log kind

createdAt
read-only
stringdate-time

Creation date of the log kind

displayName
read-only
string

Log kind display name

kindId
read-only
stringuuid

Log kind ID

name
read-only
string

Log kind name

updatedAt
read-only
stringdate-time

Last update date of the log kind

Example uses name = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/cdn/log/kind/{name} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "additionalReturnedFields": [ "string" ], "createdAt": "2024-01-01T12:00:00Z", "displayName": "string", "kindId": "00000000-0000-0000-0000-000000000000", "name": "string", "updatedAt": "2024-01-01T12:00:00Z"}

List available options for a Shared CDN serviceProduction

GET
/1.0/hosting/web/{serviceName}/cdn/availableOptions

Path parameters

serviceName
required
string

Service name

Response

200availableOptions[]successful operation
category
read-only
OptionCategoryEnum

Option category

Valuescacheperformancesecurity
config
read-only
config

Option configuration

maxItems
read-only
integer

Max option items

type
read-only
string

Option type

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/availableOptions \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "category": "cache", "config": { "destination": { "length": 0, "maximum": 0, "message": "string", "minimum": 0, "type": "bool" }, "followUri": { "length": 0, "maximum": 0, "message": "string", "minimum": 0, "type": "bool" }, "origins": { "length": 0, "maximum": 0, "message": "string", "minimum": 0, "type": "bool" }, "patternType": { "length": 0, "maximum": 0, "message": "string", "minimum": 0, "type": "bool" }, "priority": { "length": 0, "maximum": 0, "message": "string", "minimum": 0, "type": "bool" }, "queryParameters": { "length": 0, "maximum": 0, "message": "string", "minimum": 0, "type": "bool" }, "resources": { "length": 0, "maximum": 0, "message": "string", "minimum": 0, "type": "bool" }, "statusCode": { "length": 0, "maximum": 0, "message": "string", "minimum": 0, "type": "bool" }, "ttl": { "length": 0, "maximum": 0, "message": "string", "minimum": 0, "type": "bool" } }, "maxItems": 0, "type": "string" }]

List all domains for a Shared CDN serviceProduction

GET
/1.0/hosting/web/{serviceName}/cdn/domain

Path parameters

serviceName
required
string

Service name

Response

200domain[]successful operation
creationDate
read-only
stringdate-time

Creation date

name
read-only
string

Domain name

needRefresh
read-only
boolean

The domain configuration has been updated, it needs a refresh

status
read-only
DomainStatusEnum

Domain status

Valuesdeletingdisableddisablingokrefreshingto_deleteto_disableto_refresh
updatedDate
read-only
stringdate-time

Last update date

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "creationDate": "2024-01-01T12:00:00Z", "name": "string", "needRefresh": true, "status": "deleting", "updatedDate": "2024-01-01T12:00:00Z" }]

Get details for a domain on a Shared CDN serviceProduction

GET
/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}

Path parameters

domainName
required
string

Domain name

serviceName
required
string

Service name

Response

200domainsuccessful operation
creationDate
read-only
stringdate-time

Creation date

name
read-only
string

Domain name

needRefresh
read-only
boolean

The domain configuration has been updated, it needs a refresh

status
read-only
DomainStatusEnum

Domain status

Valuesdeletingdisableddisablingokrefreshingto_deleteto_disableto_refresh
updatedDate
read-only
stringdate-time

Last update date

Example uses domainName = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "creationDate": "2024-01-01T12:00:00Z", "name": "string", "needRefresh": true, "status": "deleting", "updatedDate": "2024-01-01T12:00:00Z"}

Generate URL to logs archiveProduction

GET
/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/logs

Path parameters

domainName
required
string

Domain name

serviceName
required
string

Service name

Query parameters

date
stringdate

Logs date (default is yesterday)

Response

200logssuccessful operation
url
read-only
string

URL to logs archive

validity
read-only
stringdate-time

URL validity

Example uses domainName = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/logs \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "url": "string", "validity": "2024-01-01T12:00:00Z"}

List all options for a domainProduction

GET
/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option

Path parameters

domainName
required
string

Domain name

serviceName
required
string

Service name

Response

200option[]successful operation
config
config

Option configuration

enabled
required
boolean

Enable / Disable the option

extra
extra

Additional information about option

name
read-only
string

Option name

pattern
string

Url pattern

type
required
OptionTypeEnum

Option type

Valuesbrotlicache_rulecorsdevmodegeo_headershstshttps_redirectmixed_contentmobile_redirectprefetchprewarmquerystringwaf

Example uses domainName = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "config": { "destination": "string", "followUri": true, "origins": "string", "patternType": "extension", "priority": 0, "queryParameters": "ignored", "resources": [ "string" ], "statusCode": 0, "ttl": 0 }, "enabled": true, "extra": { "quota": 0, "usage": 0 }, "name": "string", "pattern": "string", "type": "brotli" }]

Add an option on a domainProduction

POST
/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option

Path parameters

domainName
required
string

Domain name

serviceName
required
string

Service name

Request body (required)

config
config

Option configuration

enabled
required
boolean

Enable / Disable the option

name
required
string

Option name

pattern
string

Url pattern

type
required
OptionTypePostEnum

Option type

Valuescache_rule

Response

200optionsuccessful operation
config
config

Option configuration

enabled
required
boolean

Enable / Disable the option

extra
extra

Additional information about option

name
read-only
string

Option name

pattern
string

Url pattern

type
required
OptionTypeEnum

Option type

Valuesbrotlicache_rulecorsdevmodegeo_headershstshttps_redirectmixed_contentmobile_redirectprefetchprewarmquerystringwaf

Example uses domainName = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "config": { "destination": "string", "followUri": true, "origins": "string", "patternType": "extension", "priority": 0, "queryParameters": "ignored", "resources": [ "string" ], "statusCode": 0, "ttl": 0 }, "enabled": true, "extra": { "quota": 0, "usage": 0 }, "name": "string", "pattern": "string", "type": "brotli"}

Get details for an option on a domainProduction

GET
/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}

Path parameters

domainName
required
string

Domain name

optionName
required
string

Option name

serviceName
required
string

Service name

Response

200optionsuccessful operation
config
config

Option configuration

enabled
required
boolean

Enable / Disable the option

extra
extra

Additional information about option

name
read-only
string

Option name

pattern
string

Url pattern

type
required
OptionTypeEnum

Option type

Valuesbrotlicache_rulecorsdevmodegeo_headershstshttps_redirectmixed_contentmobile_redirectprefetchprewarmquerystringwaf

Example uses domainName = string, optionName = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "config": { "destination": "string", "followUri": true, "origins": "string", "patternType": "extension", "priority": 0, "queryParameters": "ignored", "resources": [ "string" ], "statusCode": 0, "ttl": 0 }, "enabled": true, "extra": { "quota": 0, "usage": 0 }, "name": "string", "pattern": "string", "type": "brotli"}

Update an option on a domainProduction

PUT
/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}

Path parameters

domainName
required
string

Domain name

optionName
required
string

Option name

serviceName
required
string

Service name

Request body (required)

config
config

Option configuration

enabled
required
boolean

Enable / Disable the option

extra
extra

Additional information about option

name
read-only
string

Option name

pattern
string

Url pattern

type
required
OptionTypeEnum

Option type

Valuesbrotlicache_rulecorsdevmodegeo_headershstshttps_redirectmixed_contentmobile_redirectprefetchprewarmquerystringwaf

Response

200optionsuccessful operation
config
config

Option configuration

enabled
required
boolean

Enable / Disable the option

extra
extra

Additional information about option

name
read-only
string

Option name

pattern
string

Url pattern

type
required
OptionTypeEnum

Option type

Valuesbrotlicache_rulecorsdevmodegeo_headershstshttps_redirectmixed_contentmobile_redirectprefetchprewarmquerystringwaf

Example uses domainName = string, optionName = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "config": { "destination": "string", "followUri": true, "origins": "string", "patternType": "extension", "priority": 0, "queryParameters": "ignored", "resources": [ "string" ], "statusCode": 0, "ttl": 0 }, "enabled": true, "extra": { "quota": 0, "usage": 0 }, "name": "string", "pattern": "string", "type": "brotli"}

Remove or Reset an option to his default valueProduction

DELETE
/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName}

Path parameters

domainName
required
string

Domain name

optionName
required
string

Option name

serviceName
required
string

Service name

Response

200—successful operation

Example uses domainName = string, optionName = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/option/{optionName} \
  -H "authorization: Bearer $OVH_TOKEN"

Flush cache content on CDN for a domainProduction

POST
/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/purge

Path parameters

domainName
required
string

Domain name

serviceName
required
string

Service name

Query parameters

pattern
string

Purge pattern

patternType
PurgeTypeEnum

Purge Pattern Type (default is regex)

Valuesextensionfolderregexuri

Response

200operationsuccessful operation
comment
read-only
string

Comment

creationDate
read-only
stringdate-time

Creation date

function
read-only
OperationFunctionEnum

Operation function

Valuesanalytics_deleteanalytics_recomputedomain_deletedomain_disabledomain_purgedomain_refreshservice_installssl_deletessl_install
id
read-only
integer

Operation id

parameter
read-only
parameter

Operation parameter

service
read-only
string

Shared CDN service

status
read-only
OperationStatusEnum

Operation status

Valuescancelleddoingdoneerrortodo
todoDate
read-only
stringdate-time

Next execution date

updatedDate
read-only
stringdate-time

Last execution date

Example uses domainName = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/purge \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "comment": "string", "creationDate": "2024-01-01T12:00:00Z", "function": "analytics_delete", "id": 0, "parameter": { "anycastIp": "192.0.2.0", "cluster": "string", "date": "2024-01-01", "domainName": "string", "fingerprint": "string", "offer": "advanced", "pattern": "string", "service": "string", "sslId": 0 }, "service": "string", "status": "cancelled", "todoDate": "2024-01-01T12:00:00Z", "updatedDate": "2024-01-01T12:00:00Z"}

Trigger a refresh for a domainProduction

POST
/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/refresh

Path parameters

domainName
required
string

Domain name

serviceName
required
string

Service name

Response

200operationsuccessful operation
comment
read-only
string

Comment

creationDate
read-only
stringdate-time

Creation date

function
read-only
OperationFunctionEnum

Operation function

Valuesanalytics_deleteanalytics_recomputedomain_deletedomain_disabledomain_purgedomain_refreshservice_installssl_deletessl_install
id
read-only
integer

Operation id

parameter
read-only
parameter

Operation parameter

service
read-only
string

Shared CDN service

status
read-only
OperationStatusEnum

Operation status

Valuescancelleddoingdoneerrortodo
todoDate
read-only
stringdate-time

Next execution date

updatedDate
read-only
stringdate-time

Last execution date

Example uses domainName = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/refresh \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "comment": "string", "creationDate": "2024-01-01T12:00:00Z", "function": "analytics_delete", "id": 0, "parameter": { "anycastIp": "192.0.2.0", "cluster": "string", "date": "2024-01-01", "domainName": "string", "fingerprint": "string", "offer": "advanced", "pattern": "string", "service": "string", "sslId": 0 }, "service": "string", "status": "cancelled", "todoDate": "2024-01-01T12:00:00Z", "updatedDate": "2024-01-01T12:00:00Z"}

Get CDN statistics for a domainDeprecated

GET
/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/statistics

Deprecated since Nov 3, 2023, will be removed on Jan 1, 2024.

Path parameters

domainName
required
string

Domain name

serviceName
required
string

Service name

Query parameters

period
DomainStatisticsPeriodEnum

Period (default is day)

Valuesdaymonthweekyear

Response

200statistics[]successful operation
name
read-only
DomainStatisticsNameEnum

name of the serie

Valueshitmiss
points
read-only
point[]

List of DataPoints

unit
read-only
DomainStatisticsUnitEnum

Unit of the serie

Valuesreq/min

Example uses domainName = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/domain/{domainName}/statistics \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "name": "hit", "points": [ { "timestamp": 0, "value": 0 } ], "unit": "req/min" }]

List all operations for a Shared CDN serviceProduction

GET
/1.0/hosting/web/{serviceName}/cdn/operation

Path parameters

serviceName
required
string

Service name

Response

200operation[]successful operation
comment
read-only
string

Comment

creationDate
read-only
stringdate-time

Creation date

function
read-only
OperationFunctionEnum

Operation function

Valuesanalytics_deleteanalytics_recomputedomain_deletedomain_disabledomain_purgedomain_refreshservice_installssl_deletessl_install
id
read-only
integer

Operation id

parameter
read-only
parameter

Operation parameter

service
read-only
string

Shared CDN service

status
read-only
OperationStatusEnum

Operation status

Valuescancelleddoingdoneerrortodo
todoDate
read-only
stringdate-time

Next execution date

updatedDate
read-only
stringdate-time

Last execution date

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/operation \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "comment": "string", "creationDate": "2024-01-01T12:00:00Z", "function": "analytics_delete", "id": 0, "parameter": { "anycastIp": "192.0.2.0", "cluster": "string", "date": "2024-01-01", "domainName": "string", "fingerprint": "string", "offer": "advanced", "pattern": "string", "service": "string", "sslId": 0 }, "service": "string", "status": "cancelled", "todoDate": "2024-01-01T12:00:00Z", "updatedDate": "2024-01-01T12:00:00Z" }]

Get details for a Shared CDN operationProduction

GET
/1.0/hosting/web/{serviceName}/cdn/operation/{id}

Path parameters

id
required
integer

Id

serviceName
required
string

Service name

Response

200operationsuccessful operation
comment
read-only
string

Comment

creationDate
read-only
stringdate-time

Creation date

function
read-only
OperationFunctionEnum

Operation function

Valuesanalytics_deleteanalytics_recomputedomain_deletedomain_disabledomain_purgedomain_refreshservice_installssl_deletessl_install
id
read-only
integer

Operation id

parameter
read-only
parameter

Operation parameter

service
read-only
string

Shared CDN service

status
read-only
OperationStatusEnum

Operation status

Valuescancelleddoingdoneerrortodo
todoDate
read-only
stringdate-time

Next execution date

updatedDate
read-only
stringdate-time

Last execution date

Example uses id = 0, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cdn/operation/{id} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "comment": "string", "creationDate": "2024-01-01T12:00:00Z", "function": "analytics_delete", "id": 0, "parameter": { "anycastIp": "192.0.2.0", "cluster": "string", "date": "2024-01-01", "domainName": "string", "fingerprint": "string", "offer": "advanced", "pattern": "string", "service": "string", "sslId": 0 }, "service": "string", "status": "cancelled", "todoDate": "2024-01-01T12:00:00Z", "updatedDate": "2024-01-01T12:00:00Z"}