Skip to content

Cache

All operations require authentication.

7 operationsv1/cdn/dedicated
Agent setup

List cache rulesProduction

GET
/1.0/cdn/dedicated/{serviceName}/domains/{domain}/cacheRules

Path parameters

domain
required
string

Domain of this object

serviceName
required
string

The internal name of your CDN offer

Query parameters

fileMatch
string

Filter the value of fileMatch property (like)

Response

200integer[]successful operation

Example uses domain = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/cdn/dedicated/{serviceName}/domains/{domain}/cacheRules \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ 0]

Create a cache ruleProduction

POST
/1.0/cdn/dedicated/{serviceName}/domains/{domain}/cacheRules

Path parameters

domain
required
string

Domain of this object

serviceName
required
string

The internal name of your CDN offer

Request body (required)

cacheType
required
CacheRuleCacheTypeEnum

Type of cache rule to add to the domain

ValuesforceCachenoCache
fileMatch
required
string

File match for cache rule to add to the domain

fileType
required
CacheRuleFileTypeEnum

File type for cache rule to add to the domain

Valuesextensionfilefolder
ttl
required
integer

ttl for cache rule to add to the domain

Response

200CacheRulesuccessful operation
cacheRuleId
read-only
integer

Id for this cache rule

cacheType
read-only
CacheRuleCacheTypeEnum

All type a cache can be in

ValuesforceCachenoCache
domain
read-only
string
—
fileMatch
read-only
string
—
fileType
read-only
CacheRuleFileTypeEnum

All states an anycast pool can be in

Valuesextensionfilefolder
status
CacheRuleStatusEnum

All states a status can be in

Valuescreatingdeletingerroroffonupdating
ttl
integer
—

Example uses domain = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/cdn/dedicated/{serviceName}/domains/{domain}/cacheRules \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "cacheRuleId": 0, "cacheType": "forceCache", "domain": "string", "fileMatch": "string", "fileType": "extension", "status": "creating", "ttl": 0}

Get a cache ruleProduction

GET
/1.0/cdn/dedicated/{serviceName}/domains/{domain}/cacheRules/{cacheRuleId}

Path parameters

cacheRuleId
required
integer

Id for this cache rule

domain
required
string

Domain of this object

serviceName
required
string

The internal name of your CDN offer

Response

200CacheRulesuccessful operation
cacheRuleId
read-only
integer

Id for this cache rule

cacheType
read-only
CacheRuleCacheTypeEnum

All type a cache can be in

ValuesforceCachenoCache
domain
read-only
string
—
fileMatch
read-only
string
—
fileType
read-only
CacheRuleFileTypeEnum

All states an anycast pool can be in

Valuesextensionfilefolder
status
CacheRuleStatusEnum

All states a status can be in

Valuescreatingdeletingerroroffonupdating
ttl
integer
—

Example uses cacheRuleId = 0, domain = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/cdn/dedicated/{serviceName}/domains/{domain}/cacheRules/{cacheRuleId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "cacheRuleId": 0, "cacheType": "forceCache", "domain": "string", "fileMatch": "string", "fileType": "extension", "status": "creating", "ttl": 0}

Delete a cache ruleProduction

DELETE
/1.0/cdn/dedicated/{serviceName}/domains/{domain}/cacheRules/{cacheRuleId}

Path parameters

cacheRuleId
required
integer

Id for this cache rule

domain
required
string

Domain of this object

serviceName
required
string

The internal name of your CDN offer

Response

200Tasksuccessful operation
comment
read-only
string
—
function
read-only
TaskFunctionEnum

All function CDN task can be

ValuesflushflushAllgenerateSslinstallSslreinstallSslremoveDomainuninstallSslupdateCacheRule
status
read-only
TaskStateEnum

All states a CDN task can be in

Valuescancelleddoingdoneerrortodo
taskId
read-only
integer
—

Example uses cacheRuleId = 0, domain = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/cdn/dedicated/{serviceName}/domains/{domain}/cacheRules/{cacheRuleId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "comment": "string", "function": "flush", "status": "cancelled", "taskId": 0}

Update a cache ruleProduction

PUT
/1.0/cdn/dedicated/{serviceName}/domains/{domain}/cacheRules/{cacheRuleId}

Path parameters

cacheRuleId
required
integer

Id for this cache rule

domain
required
string

Domain of this object

serviceName
required
string

The internal name of your CDN offer

Request body (required)

cacheRuleId
read-only
integer

Id for this cache rule

cacheType
read-only
CacheRuleCacheTypeEnum

All type a cache can be in

ValuesforceCachenoCache
domain
read-only
string
—
fileMatch
read-only
string
—
fileType
read-only
CacheRuleFileTypeEnum

All states an anycast pool can be in

Valuesextensionfilefolder
status
CacheRuleStatusEnum

All states a status can be in

Valuescreatingdeletingerroroffonupdating
ttl
integer
—

Response

200—successful operation

Example uses cacheRuleId = 0, domain = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/cdn/dedicated/{serviceName}/domains/{domain}/cacheRules/{cacheRuleId} \
  -H "authorization: Bearer $OVH_TOKEN"

Flush the cache of a ruleProduction

POST
/1.0/cdn/dedicated/{serviceName}/domains/{domain}/cacheRules/{cacheRuleId}/flush

Path parameters

cacheRuleId
required
integer

Id for this cache rule

domain
required
string

Domain of this object

serviceName
required
string

The internal name of your CDN offer

Response

200Tasksuccessful operation
comment
read-only
string
—
function
read-only
TaskFunctionEnum

All function CDN task can be

ValuesflushflushAllgenerateSslinstallSslreinstallSslremoveDomainuninstallSslupdateCacheRule
status
read-only
TaskStateEnum

All states a CDN task can be in

Valuescancelleddoingdoneerrortodo
taskId
read-only
integer
—

Example uses cacheRuleId = 0, domain = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/cdn/dedicated/{serviceName}/domains/{domain}/cacheRules/{cacheRuleId}/flush \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "comment": "string", "function": "flush", "status": "cancelled", "taskId": 0}

Flush the domain cacheProduction

POST
/1.0/cdn/dedicated/{serviceName}/domains/{domain}/flush

Path parameters

domain
required
string

Domain of this object

serviceName
required
string

The internal name of your CDN offer

Response

200Tasksuccessful operation
comment
read-only
string
—
function
read-only
TaskFunctionEnum

All function CDN task can be

ValuesflushflushAllgenerateSslinstallSslreinstallSslremoveDomainuninstallSslupdateCacheRule
status
read-only
TaskStateEnum

All states a CDN task can be in

Valuescancelleddoingdoneerrortodo
taskId
read-only
integer
—

Example uses domain = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/cdn/dedicated/{serviceName}/domains/{domain}/flush \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "comment": "string", "function": "flush", "status": "cancelled", "taskId": 0}