Skip to main content

Cache policies

GET Cache Policies#

Gets the cache policies of the organization.

GET ALL
MethodGET ALL
URL or EndPoint/api/v{version}/projects/{projectId}/cachepolicies
HeadersAuthorization
ParametersprojectId, version
BodyNot Applicable

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}Yesstring($uuid)3fa85f64-5717-4562-b3fc-2c963f66afa6The project's ID. If the ID is empty, an empty distribution configuration is returned

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
projctIdYesstring3fa85f64-5717-4562-b3fc-2c963f66afa6The project's ID. If the ID is empty, an empty project configuration is returned
VersionYesstring($uuid)v1Shows the version of API

Request Body#

The request does not have a request body.

Responses#

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in json format by the service.

{  "success": true,  "errors": [    "string"  ],  "messages": [    "string"  ],  "result": [    {      "id": 0,      "name": "string",      "comment": "string",      "distributions": 0,      "lastModified": "2021-03-31T10:34:49.496Z"    }  ],  "resultInfo": {    "totalCount": 0,    "pageIndex": 0,    "pageSize": 0,    "totalPages": 0,    "hasNextPage": true,    "hasPreviousPage": true  }}
Field NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsarray []"string"Indicate if there was an error
messagesarray []"string"Returns the response message from back-end
resultarray [object]Returns a cache policies object
idinteger($int32)0Returns the identifiers for the current cache policies
namestring"string"Returns the names of cache policies
commentstring"string"Returns the comments of cache policies
distributionsinteger($int32)0Returns how many distributions use those cache policies
lastModifieddate2021-03-30 T 09:30:22.892ZReturns last modified date of cache policies
resultInfoobjectReturs information about distribution
totalCountinteger($int32)0Total number of objects in database
pageIndexinteger($int32)0Returns Current pageop paganed data
pageSizeinteger($int32)0Returns Objects per page
totalPagesinteger($int32)0Returns Total pages
hasNextPagebooltrueReturns true if it has a next page, otherwise returns false
hasPreviousPagebooltrueReturns true if it has a previous page, otherwise returns false

Errors

For information about the errors that are common to all actions, see Common Errors:

  • HTTP Status Code: 401 Unauthorized
  • HTTP Status Code: 403 Forbidden
  • HTTP Status Code: 404 Not found

POST Cache Policies#

Creates a new cache policy.

GET ALL
MethodGET ALL
URL or EndPoint/api/v{version}/projects/{projectId}/cachepolicies
HeadersAuthorization
ParametersprojectId, version
Body{ id, name, comment, minimumTtl, maximumTtl, defaultTtl, headerPolicyId, headers[], cookiePolicyId, cookies [ ], queryStringPolicyId , queryStrings[]}

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}Yesstring($uuid)3fa85f64-5717-4562-b3fc-2c963f66afa6The project's ID. If the ID is empty, an empty distribution configuration is returned

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
projctIdYesstring3fa85f64-5717-4562-b3fc-2c963f66afa6The project's ID. If the ID is empty, an empty project configuration is returned
VersionYesstring($uuid)v1Shows the version of API

Request body#

{  "id": 0,  "name": "string",  "comment": "string",  "minimumTtl": 0,  "maximumTtl": 0,  "defaultTtl": 0,  "headerPolicyId": 0,  "headers": [    "string"  ],  "cookiePolicyId": 0,  "cookies": [    "string"  ],  "queryStringPolicyId": 0,  "queryStrings": [    "string"  ]}

The description of the parameters is as follows:

Body Parameter NameMandatoryTypeExampleDescription
idYesinteger($int32)0Sends the identifier of cache policy
nameYesstring"string"Sends name of cache policy
commentYesstring"string"Sends comment of cache policy
minimumTtlYesinteger($int32)0Sends the minimum time to live of the cache policy. Minimum TTL is the minimum amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
maximumTtlYesinteger($int32)0Sends the maximum time to live of the cache policy. Maximum TTL is the maximum amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
defaultTtlYesinteger($int32)0Sends the default time to live of the cache policy. Default TTL is the default amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
headerPolicyIdYesinteger($int32)0Sends the identifier of the header inside the cache policy
headersYesarray []"string"Sends the specified headers that you want CDN to base caching on. All the headers are forwarded to origin
cookiePolicyIdYesinteger($int32)0Sends the identifier of the cookie policy inside the cache policy
cookiesYesarray []"string"Sends the specified cookies that you want CDN to include in the cache policy and in origin requests
queryStringPolicyIdYesinteger($int32)0Sends the identifier of the query string policy inside the cache policy
queryStringsYesarray []Sends the specified query strings parameters that you want CDN to forward to the origin (All or None) and which parameters you want CDN to base caching on (Whitelist of parameters or All)

Responses#

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in json format by the service.

{  "success": true,  "errors": [    "string"  ],  "messages": [    "string"  ],  "result": {    "id": 0,    "name": "string",    "comment": "string",    "minimumTtl": 0,    "maximumTtl": 0,    "defaultTtl": 0,    "headerPolicyId": 0,    "headers": [      "string"    ],    "headerOptions": [      {        "id": 0,        "value": "string"      }    ],    "cookiePolicyId": 0,    "cookies": [      "string"    ],    "cookieOptions": [      {        "id": 0,        "value": "string"      }    ],    "queryStringPolicyId": 0,    "queryStrings": [      "string"    ],    "queryStringOptions": [      {        "id": 0,        "value": "string"      }    ]  },  "resultInfo": {    "totalCount": 0,    "pageIndex": 0,    "pageSize": 0,    "totalPages": 0,    "hasNextPage": true,    "hasPreviousPage": true  }}
Field NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsarray []"string"Indicate if there was an error
messagesarray []"string"Returns the response message from back-end
resultarray [object]Returns a cache policies object
idinteger($int32)0Returns the identifiers for the current cache policies
namestring"string"Returns the names of cache policies
commentstring"string"Returns the comments of cache policies
minimumTtlinteger($int32)0Sends the minimum time to live of the cache policy. Minimum TTL is the minimum amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
maximumTtlinteger($int32)0Sends the maximum time to live of the cache policy. Maximum TTL is the maximum amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
defaultTtlinteger($int32)0Sends the default time to live of the cache policy. Default TTL is the default amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
headerPolicyIdinteger($int32)0Returns the identifier for Whitelist or None headers, depends on what you've selected
headersarray []"string"Returns an array of selected headers
headerOptionsarray [object]Returns the listed headers that you can select
idinteger($int32)0Returns the id of selected header option
valuestring"string"Return the value of selected header option
cookiePolicyIdinteger($int32)0Returns the identifier for Whitelist or None cookies, depends on what you've selected
cookiesarray []"string "Returns an array of selected cookies
cookieOptionsarray []Returns the listed cookies that you can select
idinteger($int32)0Returns the id of selected cookie option
valuestring"string"Return the value of selected cookie option
queryStringPolicyIdinteger($int32)0Returns the identifier for Whitelist or None query strings, depends on what you've selected
queryStringsarray []Returns an array of selected query strings
queryStringOptionsarray [object]Returns the listed query strings that you can select
resultInfoobjectReturs information about distribution
totalCountinteger($int32)0Total number of objects in database
pageIndexinteger($int32)0Returns Current pageop paganed data
pageSizeinteger($int32)0Returns Objects per page
totalPagesinteger($int32)0Returns Total pages
hasNextPagebooltrueReturns true if it has a next page, otherwise returns false
hasPreviousPagebooltrueReturns true if it has a previous page, otherwise returns false

Errors

For information about the errors that are common to all actions, see Common Errors:

  • HTTP Status Code: 400 Bad Request
  • HTTP Status Code: 401 Unauthorized
  • HTTP Status Code: 403 Forbidden
  • HTTP Status Code: 404 Not found

GET Cache Policy#

Gets the specified cache policy

GET
MethodGET
URL or EndPoint/api/v{version}/projects/{projectId}/cachepolicies/{id}
HeadersAuthorization
ParametersprojectId, version, id
BodyNot Applicable

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
{id}Yesinteger($int32)0The cache policy'ID
v{version}Yesstringv1Shows the version of API
{projectId}Yesstring($uuid)3fa85f64-5717-4562-b3fc-2c963f66afa6The project's ID. If the ID is empty, an empty distribution configuration is returned

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
projctIdYesstring3fa85f64-5717-4562-b3fc-2c963f66afa6The project's ID. If the ID is empty, an empty project configuration is returned
VersionYesstring($uuid)v1Shows the version of API
idYesinteger($int32)0The cache policy'ID

Request Body#

The request does not have a request body.

Responses#

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in json format by the service.


{  "success": true,  "errors": [    "string"  ],  "messages": [    "string"  ],  "result": {    "id": 0,    "name": "string",    "comment": "string",    "minimumTtl": 0,    "maximumTtl": 0,    "defaultTtl": 0,    "headerPolicyId": 0,    "headers": [      "string"    ],    "headerOptions": [      {        "id": 0,        "value": "string"      }    ],    "cookiePolicyId": 0,    "cookies": [      "string"    ],    "cookieOptions": [      {        "id": 0,        "value": "string"      }    ],    "queryStringPolicyId": 0,    "queryStrings": [      "string"    ],    "queryStringOptions": [      {        "id": 0,        "value": "string"      }    ]  },  "resultInfo": {    "totalCount": 0,    "pageIndex": 0,    "pageSize": 0,    "totalPages": 0,    "hasNextPage": true,    "hasPreviousPage": true  }}
Field NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsarray []"string"Indicate if there was an error
messagesarray []"string"Returns the response message from back-end
resultarray [object]Returns a cache policies object
idinteger($int32)0Returns the identifiers for the current cache policies
namestring"string"Returns the names of cache policies
commentstring"string"Returns the comments of cache policies
minimumTtlinteger($int32)0Sends the minimum time to live of the cache policy. Minimum TTL is the minimum amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
maximumTtlinteger($int32)0Sends the maximum time to live of the cache policy. Maximum TTL is the maximum amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
defaultTtlinteger($int32)0Sends the default time to live of the cache policy. Default TTL is the default amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
headerPolicyIdinteger($int32)0Returns the identifier for Whitelist or None headers, depends on what you've selected
headersarray []"string"Returns an array of selected headers
headerOptionsarray [object]Returns the listed headers that you can select
idinteger($int32)0Returns the id of selected header option
valuestring"string"Return the value of selected header option
cookiePolicyIdinteger($int32)0Returns the identifier for Whitelist or None cookies, depends on what you've selected
cookiesarray []"string "Returns an array of selected cookies
cookieOptionsarray []Returns the listed cookies that you can select
idinteger($int32)0Returns the id of selected cookie option
valuestring"string"Return the value of selected cookie option
queryStringPolicyIdinteger($int32)0Returns the identifier for Whitelist or None query strings, depends on what you've selected
queryStringsarray []Returns an array of selected query strings
queryStringOptionsarray [object]Returns the listed query strings that you can select
resultInfoobjectReturs information about distribution
totalCountinteger($int32)0Total number of objects in database
pageIndexinteger($int32)0Returns Current pageop paganed data
pageSizeinteger($int32)0Returns Objects per page
totalPagesinteger($int32)0Returns Total pages
hasNextPagebooltrueReturns true if it has a next page, otherwise returns false
hasPreviousPagebooltrueReturns true if it has a previous page, otherwise returns false

Errors

For information about the errors that are common to all actions, see Common Errors:

  • HTTP Status Code: 401 Unauthorized
  • HTTP Status Code: 403 Forbidden
  • HTTP Status Code: 404 Not found

PUT Cache Policies#

Updates the specified cache policy.

PUT
MethodPUT
URL or EndPoint/api/v{version}/projects/{projectId}/cachepolicies/{id}
HeadersAuthorization
ParametersprojectId, version, id
Body{ id, name, comment, minimumTtl, maximumTtl, defaultTtl, headerPolicyId, headers[], cookiePolicyId, cookies [ ], queryStringPolicyId , queryStrings[]}

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
{id}Yesinteger($int32)0The cache policy'ID
v{version}Yesstringv1Shows the version of API
{projectId}Yesstring($uuid)3fa85f64-5717-4562-b3fc-2c963f66afa6The project's ID. If the ID is empty, an empty distribution configuration is returned

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
projctIdYesstring3fa85f64-5717-4562-b3fc-2c963f66afa6The project's ID. If the ID is empty, an empty project configuration is returned
VersionYesstring($uuid)v1Shows the version of API
idYesinteger($int32)0The cache policy'ID

Request Body#

{  "id": 0,  "name": "string",  "comment": "string",  "minimumTtl": 0,  "maximumTtl": 0,  "defaultTtl": 0,  "headerPolicyId": 0,  "headers": [    "string"  ],  "cookiePolicyId": 0,  "cookies": [    "string"  ],  "queryStringPolicyId": 0,  "queryStrings": [    "string"  ]}

The description of the parameters is as follows:

Body Parameter NameMandatoryTypeExampleDescription
idYesinteger($int32)0Sends the identifier of cache policy
nameYesstring"string"Sends name of cache policy
commentYesstring"string"Sends comment of cache policy
minimumTtlYesinteger($int32)0Sends the minimum time to live of the cache policy. Minimum TTL is the minimum amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
maximumTtlYesinteger($int32)0Sends the maximum time to live of the cache policy. Maximum TTL is the maximum amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
defaultTtlYesinteger($int32)0Sends the default time to live of the cache policy. Default TTL is the default amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
headerPolicyIdYesinteger($int32)0Sends the identifier of the header inside the cache policy
headersYesarray []"string"Sends the specified headers that you want CDN to base caching on. All the headers are forwarded to origin
cookiePolicyIdYesinteger($int32)0Sends the identifier of the cookie policy inside the cache policy
cookiesYesarray []"string"Sends the specified cookies that you want CDN to include in the cache policy and in origin requests
queryStringPolicyIdYesinteger($int32)0Sends the identifier of the query string policy inside the cache policy
queryStringsYesarray []Sends the specified query strings parameters that you want CDN to forward to the origin (All or None) and which parameters you want CDN to base caching on (Whitelist of parameters or All)

Responses#

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in json format by the service.


{  "success": true,  "errors": [    "string"  ],  "messages": [    "string"  ],  "result": {    "id": 0,    "name": "string",    "comment": "string",    "minimumTtl": 0,    "maximumTtl": 0,    "defaultTtl": 0,    "headerPolicyId": 0,    "headers": [      "string"    ],    "headerOptions": [      {        "id": 0,        "value": "string"      }    ],    "cookiePolicyId": 0,    "cookies": [      "string"    ],    "cookieOptions": [      {        "id": 0,        "value": "string"      }    ],    "queryStringPolicyId": 0,    "queryStrings": [      "string"    ],    "queryStringOptions": [      {        "id": 0,        "value": "string"      }    ]  },  "resultInfo": {    "totalCount": 0,    "pageIndex": 0,    "pageSize": 0,    "totalPages": 0,    "hasNextPage": true,    "hasPreviousPage": true  }}
Field NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsarray []"string"Indicate if there was an error
messagesarray []"string"Returns the response message from back-end
resultarray [object]Returns a cache policies object
idinteger($int32)0Returns the identifiers for the current cache policies
namestring"string"Returns the names of cache policies
commentstring"string"Returns the comments of cache policies
minimumTtlinteger($int32)0Sends the minimum time to live of the cache policy. Minimum TTL is the minimum amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
maximumTtlinteger($int32)0Sends the maximum time to live of the cache policy. Maximum TTL is the maximum amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
defaultTtlinteger($int32)0Sends the default time to live of the cache policy. Default TTL is the default amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
headerPolicyIdinteger($int32)0Returns the identifier for Whitelist or None headers, depends on what you've selected
headersarray []"string"Returns an array of selected headers
headerOptionsarray [object]Returns the listed headers that you can select
idinteger($int32)0Returns the id of selected header option
valuestring"string"Return the value of selected header option
cookiePolicyIdinteger($int32)0Returns the identifier for Whitelist or None cookies, depends on what you've selected
cookiesarray []"string "Returns an array of selected cookies
cookieOptionsarray []Returns the listed cookies that you can select
idinteger($int32)0Returns the id of selected cookie option
valuestring"string"Return the value of selected cookie option
queryStringPolicyIdinteger($int32)0Returns the identifier for Whitelist or None query strings, depends on what you've selected
queryStringsarray []Returns an array of selected query strings
queryStringOptionsarray [object]Returns the listed query strings that you can select
resultInfoobjectReturs information about distribution
totalCountinteger($int32)0Total number of objects in database
pageIndexinteger($int32)0Returns Current pageop paganed data
pageSizeinteger($int32)0Returns Objects per page
totalPagesinteger($int32)0Returns Total pages
hasNextPagebooltrueReturns true if it has a next page, otherwise returns false
hasPreviousPagebooltrueReturns true if it has a previous page, otherwise returns false

Errors

For information about the errors that are common to all actions, see Common Errors:

  • HTTP Status Code: 401 Unauthorized
  • HTTP Status Code: 403 Forbidden
  • HTTP Status Code: 404 Not found

DELETE Cache Policy#

Deletes the cache policy.

DELETE
MethodDELETE
URL or EndPoint/api/v{version}/projects/{projectId}/cachepolicies/{id}
HeadersAuthorization
ParametersdistributionId, id, version, projectId
BodyNot Applicable

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeExampleDescription
v{version}Yesstringv1Shows the version of API
{projectId}Yesstring3fa85f64-5717-4562-b3fc-2c963f66afa6The project's ID. If the ID is empty, an empty distribution configuration is returned
{distributionId}Yesstring"string"The distribution's ID. If the ID is empty, an empty distribution configuration is returned
{id}Yesinteger($int32)0Shows the version of API

The description of the parameters is as follows:

Parameter NameMandatoryTypeExampleDescription
projectIdYesstring3fa85f64-5717-4562-b3fc-2c963f66afa6The project's ID. If the ID is empty, an empty distribution configuration is returned
versionYesstringv1Shows the version of API
idYesinteger($int32)0The behavior's ID.
Responses#

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in json format by the service.


{  "success": true,  "errors": [    "string"  ],  "messages": [    "string"  ],  "result": {    "id": 0,    "name": "string",    "comment": "string",    "minimumTtl": 0,    "maximumTtl": 0,    "defaultTtl": 0,    "headerPolicyId": 0,    "headers": [      "string"    ],    "headerOptions": [      {        "id": 0,        "value": "string"      }    ],    "cookiePolicyId": 0,    "cookies": [      "string"    ],    "cookieOptions": [      {        "id": 0,        "value": "string"      }    ],    "queryStringPolicyId": 0,    "queryStrings": [      "string"    ],    "queryStringOptions": [      {        "id": 0,        "value": "string"      }    ]  },  "resultInfo": {    "totalCount": 0,    "pageIndex": 0,    "pageSize": 0,    "totalPages": 0,    "hasNextPage": true,    "hasPreviousPage": true  }}
Field NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsarray []"string"Indicate if there was an error
messagesarray []"string"Returns the response message from back-end
resultarray [object]Returns a cache policies object
idinteger($int32)0Returns the identifiers for the current cache policies
namestring"string"Returns the names of cache policies
commentstring"string"Returns the comments of cache policies
minimumTtlinteger($int32)0Sends the minimum time to live of the cache policy. Minimum TTL is the minimum amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
maximumTtlinteger($int32)0Sends the maximum time to live of the cache policy. Maximum TTL is the maximum amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
defaultTtlinteger($int32)0Sends the default time to live of the cache policy. Default TTL is the default amount of time in seconds that object stays in CDN cache before CDN checks with origin to see if the object has been updated
headerPolicyIdinteger($int32)0Returns the identifier for Whitelist or None headers, depends on what you've selected
headersarray []"string"Returns an array of selected headers
headerOptionsarray [object]Returns the listed headers that you can select
idinteger($int32)0Returns the id of selected header option
valuestring"string"Return the value of selected header option
cookiePolicyIdinteger($int32)0Returns the identifier for Whitelist or None cookies, depends on what you've selected
cookiesarray []"string "Returns an array of selected cookies
cookieOptionsarray []Returns the listed cookies that you can select
idinteger($int32)0Returns the id of selected cookie option
valuestring"string"Return the value of selected cookie option
queryStringPolicyIdinteger($int32)0Returns the identifier for Whitelist or None query strings, depends on what you've selected
queryStringsarray []Returns an array of selected query strings
queryStringOptionsarray [object]Returns the listed query strings that you can select
resultInfoobjectReturs information about distribution
totalCountinteger($int32)0Total number of objects in database
pageIndexinteger($int32)0Returns Current pageop paganed data
pageSizeinteger($int32)0Returns Objects per page
totalPagesinteger($int32)0Returns Total pages
hasNextPagebooltrueReturns true if it has a next page, otherwise returns false
hasPreviousPagebooltrueReturns true if it has a previous page, otherwise returns false

Errors

For information about the errors that are common to all actions, see Common Errors:

  • HTTP Status Code: 401 Unauthorized
  • HTTP Status Code: 403 Forbidden
  • HTTP Status Code: 404 Not found