Skip to main content

Origin request policies

GET Origin Request Policies#

Gets the origin request policies of the organization.

GET ALL
MethodGET ALL
URL or EndPoint/api/v{version}/projects/{projectId}/requestpolicies
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-31T15:06:13.431Z"    }  ],  "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 behavior object
idinteger($int32)0Returns the identifier of the origin request policy
namestring"string"Returns the user input name of the origin request policy
commentstring"string"Returns the user input comment of the origin request policy
distributionsinteger($int32)0Returns all the distributions
lastModifieddate2021-03-30T09:30:22.892ZReturns the last modified date of origin request policy
resultInfoarray [object]Returns an object of behavior
totalCountinteger($int32)0How many records of behavior entity are in database
pageIndexinteger($int32)0Returns how many pages of paganed data are
pageSizeinteger($int32)0Returns paganed data
totalPagesinteger($int32)0How many pages
hasNextPagebooltrueReturns the next page of paganed data
hasPreviousPagebooltrueReturns the previous page of paganed data

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 Origin Request Policies#

Creates a new origin request policy.

POST
MethodPOST
URL or EndPoint/api/v{version}/projects/{projectId}/requestpolicies
HeadersAuthorization
ParametersprojectId, version
Body{id, name, comment, 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",  "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 the origin request policy
nameYesstring"string"Sends the user input name of the origin request policy
commentNostring"string"Sends the user input comment of the origin request policy
headerPolicyIdYesinteger($int32)0Sends the identifier for Whitelist or None headers, depends on what you've selected
headersYesarray []"string"Sends an array of selected headers
cookiePolicyIdYesinteger($int32)0Sends the identifier for Whitelist or None cookies, depends on what you've selected
cookiesYesarray []"string"Sends an array of selected cookies
queryStringPolicyIdYesinteger($int32)0Sends the identifier for Whitelist or None query strings, depends on what you've selected
queryStringsYesarray []"string"Sends an array of selected query strings

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",    "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 behavior object
idinteger($int32)0Returns the identifier of the origin request policy
namestring"string"Returns the user input name of the origin request policy
commentstring"string"Returns the user input comment of the origin request policy
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 sele
idinteger($int32)0Returns the identifier of the origin request policy
valuestring"string"Returns the selected query string option depends on user input
resultInfoarray [object]Returns an object of behavior
totalCountinteger($int32)0How many records of behavior entity are in database
pageIndexinteger($int32)0Returns how many pages of paganed data are
pageSizeinteger($int32)0Returns paganed data
totalPagesinteger($int32)0How many pages
hasNextPagebooltrueReturns the next page of paganed data
hasPreviousPagebooltrueReturns the previous page of paganed data

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

GET Origin Group#

Get the specified origin group

GET
MethodGET
URL or EndPoint/api/v{version}/projects/{projectId}/distributions/{distributionId}
HeadersAuthorization
ParametersdistributionId, 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)0The origin request policies's ID

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
distributionIdYesstring"string"The distribution's ID. If the ID is empty, an empty distribution configuration is returned
idYesinteger($int32)0The origin request policies's 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",    "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 behavior object
idinteger($int32)0Returns the identifier of the origin request policy
namestring"string"Returns the user input name of the origin request policy
commentstring"string"Returns the user input comment of the origin request policy
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 sele
idinteger($int32)0Returns the identifier of the origin request policy
valuestring"string"Returns the selected query string option depends on user input
resultInfoarray [object]Returns an object of behavior
totalCountinteger($int32)0How many records of behavior entity are in database
pageIndexinteger($int32)0Returns how many pages of paganed data are
pageSizeinteger($int32)0Returns paganed data
totalPagesinteger($int32)0How many pages
hasNextPagebooltrueReturns the next page of paganed data
hasPreviousPagebooltrueReturns the previous page of paganed data

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 Origin Request Policies#

Updates the specified origin request policy.

PUT
MethodPUT
URL or EndPoint/api/v{version}/projects/{projectId}/distributions/{distributionId}/invalidations/{id}
HeadersAuthorization
ParametersdistributionId, version, projectId, id
Body{distributionId, originGroupId, origins, id, randomRoutingPercentage, originOptions, id, value, originRoutingType}

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)0The origin request policies's ID

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
distributionIdYesstring"string"The distribution's ID. If the ID is empty, an empty distribution configuration is returned
idYesinteger($int32)0The origin request policies's ID

Request Body#

{  "id": 0,  "name": "string",  "comment": "string",  "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 the origin request policy
nameYesstring"string"Sends the user input name of the origin request policy
commentNostring"string"Sends the user input comment of the origin request policy
headerPolicyIdYesinteger($int32)0Sends the identifier for Whitelist or None headers, depends on what you've selected
headersYesarray []"string"Sends an array of selected headers
cookiePolicyIdinteger($int32)0Sends the identifier for Whitelist or None cookies, depends on what you've selected
cookiesYesarray []"string"Sends an array of selected cookies
queryStringPolicyIdinteger($int32)0Sends the identifier for Whitelist or None query strings, depends on what you've selected
queryStringsYesarray []"string"Sends an array of selected query strings

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",    "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 behavior object
idinteger($int32)0Returns the identifier of the origin request policy
namestring"string"Returns the user input name of the origin request policy
commentstring"string"Returns the user input comment of the origin request policy
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 sele
idinteger($int32)0Returns the identifier of the origin request policy
valuestring"string"Returns the selected query string option depends on user input
resultInfoarray [object]Returns an object of behavior
totalCountinteger($int32)0How many records of behavior entity are in database
pageIndexinteger($int32)0Returns how many pages of paganed data are
pageSizeinteger($int32)0Returns paganed data
totalPagesinteger($int32)0How many pages
hasNextPagebooltrueReturns the next page of paganed data
hasPreviousPagebooltrueReturns the previous page of paganed data

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

DELETE Origin Request Policies#

Deletes the origin request policy

DELETE
MethodDELETE
URL or EndPoint/api/v{version}/projects/{projectId}/distributions/{distributionId}/invalidations/{id}
HeadersAuthorization
ParametersdistributionId, version, projectId, id
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)0The origin request policies's ID

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
distributionIdYesstring"string"The distribution's ID. If the ID is empty, an empty distribution configuration is returned
idYesinteger($int32)0The origin request policies'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",    "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 behavior object
idinteger($int32)0Returns the identifier of the origin request policy
namestring"string"Returns the user input name of the origin request policy
commentstring"string"Returns the user input comment of the origin request policy
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 sele
idinteger($int32)0Returns the identifier of the origin request policy
valuestring"string"Returns the selected query string option depends on user input
resultInfoarray [object]Returns an object of behavior
totalCountinteger($int32)0How many records of behavior entity are in database
pageIndexinteger($int32)0Returns how many pages of paganed data are
pageSizeinteger($int32)0Returns paganed data
totalPagesinteger($int32)0How many pages
hasNextPagebooltrueReturns the next page of paganed data
hasPreviousPagebooltrueReturns the previous page of paganed data

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