Origin request policies
GET Origin Request Policies#
Gets the origin request policies of the organization.
| GET ALL | |
|---|---|
| Method | GET ALL |
| URL or EndPoint | /api/v{version}/projects/{projectId}/requestpolicies |
| Headers | Authorization |
| Parameters | projectId, version |
| Body | Not Applicable |
The description of the URL parameters is as follows:
| URL Parameter Name | Mandatory | Type | Example | Description |
|---|---|---|---|---|
| v{version} | Yes | string | v1 | Shows the version of API |
| {projectId} | Yes | string($uuid) | 3fa85f64-5717-4562-b3fc-2c963f66afa6 | The project's ID. If the ID is empty, an empty distribution configuration is returned |
The description of the parameters is as follows:
| Parameter Name | Mandatory | Type | Example | Description |
|---|---|---|---|---|
| projctId | Yes | string | 3fa85f64-5717-4562-b3fc-2c963f66afa6 | The project's ID. If the ID is empty, an empty project configuration is returned |
| Version | Yes | string($uuid) | v1 | Shows 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 Name | Type | Example | Description |
|---|---|---|---|
| success | bool | true | If response is success will return true otherwise will return false |
| errors | array [] | "string" | Indicate if there was an error |
| messages | array [] | "string" | Returns the response message from back-end |
| result | array [object] | Returns a behavior object | |
| id | integer($int32) | 0 | Returns the identifier of the origin request policy |
| name | string | "string" | Returns the user input name of the origin request policy |
| comment | string | "string" | Returns the user input comment of the origin request policy |
| distributions | integer($int32) | 0 | Returns all the distributions |
| lastModified | date | 2021-03-30T09:30:22.892Z | Returns the last modified date of origin request policy |
| resultInfo | array [object] | Returns an object of behavior | |
| totalCount | integer($int32) | 0 | How many records of behavior entity are in database |
| pageIndex | integer($int32) | 0 | Returns how many pages of paganed data are |
| pageSize | integer($int32) | 0 | Returns paganed data |
| totalPages | integer($int32) | 0 | How many pages |
| hasNextPage | bool | true | Returns the next page of paganed data |
| hasPreviousPage | bool | true | Returns 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 | |
|---|---|
| Method | POST |
| URL or EndPoint | /api/v{version}/projects/{projectId}/requestpolicies |
| Headers | Authorization |
| Parameters | projectId, version |
| Body | {id, name, comment, headerPolicyId, headers, cookiePolicyId, cookies, queryStringPolicyId, queryStrings } |
The description of the URL parameters is as follows:
| URL Parameter Name | Mandatory | Type | Example | Description |
|---|---|---|---|---|
| v{version} | Yes | string | v1 | Shows the version of API |
| {projectId} | Yes | string($uuid) | 3fa85f64-5717-4562-b3fc-2c963f66afa6 | The project's ID. If the ID is empty, an empty distribution configuration is returned |
The description of the parameters is as follows:
| Parameter Name | Mandatory | Type | Example | Description |
|---|---|---|---|---|
| projctId | Yes | string | 3fa85f64-5717-4562-b3fc-2c963f66afa6 | The project's ID. If the ID is empty, an empty project configuration is returned |
| Version | Yes | string($uuid) | v1 | Shows 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 Name | Mandatory | Type | Example | Description |
|---|---|---|---|---|
| id | Yes | integer($int32) | 0 | Sends the identifier of the origin request policy |
| name | Yes | string | "string" | Sends the user input name of the origin request policy |
| comment | No | string | "string" | Sends the user input comment of the origin request policy |
| headerPolicyId | Yes | integer($int32) | 0 | Sends the identifier for Whitelist or None headers, depends on what you've selected |
| headers | Yes | array [] | "string" | Sends an array of selected headers |
| cookiePolicyId | Yes | integer($int32) | 0 | Sends the identifier for Whitelist or None cookies, depends on what you've selected |
| cookies | Yes | array [] | "string" | Sends an array of selected cookies |
| queryStringPolicyId | Yes | integer($int32) | 0 | Sends the identifier for Whitelist or None query strings, depends on what you've selected |
| queryStrings | Yes | array [] | "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 Name | Type | Example | Description |
|---|---|---|---|
| success | bool | true | If response is success will return true otherwise will return false |
| errors | array [] | "string" | Indicate if there was an error |
| messages | array [] | "string" | Returns the response message from back-end |
| result | array [object] | Returns a behavior object | |
| id | integer($int32) | 0 | Returns the identifier of the origin request policy |
| name | string | "string" | Returns the user input name of the origin request policy |
| comment | string | "string" | Returns the user input comment of the origin request policy |
| headerPolicyId | integer($int32) | 0 | Returns the identifier for Whitelist or None headers, depends on what you've selected |
| headers | array [] | "string" | Returns an array of selected headers |
| headerOptions | array [object] | Returns the listed headers that you can select | |
| id | integer($int32) | 0 | Returns the id of selected header option |
| value | string | "string" | Return the value of selected header option |
| cookiePolicyId | integer($int32) | 0 | Returns the identifier for Whitelist or None cookies, depends on what you've selected |
| cookies | array [] | "string " | Returns an array of selected cookies |
| cookieOptions | array [] | Returns the listed cookies that you can select | |
| id | integer($int32) | 0 | Returns the id of selected cookie option |
| value | string | "string" | Return the value of selected cookie option |
| queryStringPolicyId | integer($int32) | 0 | Returns the identifier for Whitelist or None query strings, depends on what you've selected |
| queryStrings | array [] | Returns an array of selected query strings | |
| queryStringOptions | array [object] | Returns the listed query strings that you can sele | |
| id | integer($int32) | 0 | Returns the identifier of the origin request policy |
| value | string | "string" | Returns the selected query string option depends on user input |
| resultInfo | array [object] | Returns an object of behavior | |
| totalCount | integer($int32) | 0 | How many records of behavior entity are in database |
| pageIndex | integer($int32) | 0 | Returns how many pages of paganed data are |
| pageSize | integer($int32) | 0 | Returns paganed data |
| totalPages | integer($int32) | 0 | How many pages |
| hasNextPage | bool | true | Returns the next page of paganed data |
| hasPreviousPage | bool | true | Returns 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 | |
|---|---|
| Method | GET |
| URL or EndPoint | /api/v{version}/projects/{projectId}/distributions/{distributionId} |
| Headers | Authorization |
| Parameters | distributionId, version, projectId |
| Body | Not Applicable |
The description of the URL parameters is as follows:
| URL Parameter Name | Mandatory | Type | Example | Description |
|---|---|---|---|---|
| v{version} | Yes | string | v1 | Shows the version of API |
| {projectId} | Yes | string | 3fa85f64-5717-4562-b3fc-2c963f66afa6 | The project's ID. If the ID is empty, an empty distribution configuration is returned |
| {distributionId} | Yes | string | "string" | The distribution's ID. If the ID is empty, an empty distribution configuration is returned |
| {id} | Yes | integer($int32) | 0 | The origin request policies's ID |
The description of the parameters is as follows:
| Parameter Name | Mandatory | Type | Example | Description |
|---|---|---|---|---|
| projectId | Yes | string | 3fa85f64-5717-4562-b3fc-2c963f66afa6 | The project's ID. If the ID is empty, an empty distribution configuration is returned |
| version | Yes | string | v1 | Shows the version of API |
| distributionId | Yes | string | "string" | The distribution's ID. If the ID is empty, an empty distribution configuration is returned |
| id | Yes | integer($int32) | 0 | The 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 Name | Type | Example | Description |
|---|---|---|---|
| success | bool | true | If response is success will return true otherwise will return false |
| errors | array [] | "string" | Indicate if there was an error |
| messages | array [] | "string" | Returns the response message from back-end |
| result | array [object] | Returns a behavior object | |
| id | integer($int32) | 0 | Returns the identifier of the origin request policy |
| name | string | "string" | Returns the user input name of the origin request policy |
| comment | string | "string" | Returns the user input comment of the origin request policy |
| headerPolicyId | integer($int32) | 0 | Returns the identifier for Whitelist or None headers, depends on what you've selected |
| headers | array [] | "string" | Returns an array of selected headers |
| headerOptions | array [object] | Returns the listed headers that you can select | |
| id | integer($int32) | 0 | Returns the id of selected header option |
| value | string | "string" | Return the value of selected header option |
| cookiePolicyId | integer($int32) | 0 | Returns the identifier for Whitelist or None cookies, depends on what you've selected |
| cookies | array [] | "string " | Returns an array of selected cookies |
| cookieOptions | array [] | Returns the listed cookies that you can select | |
| id | integer($int32) | 0 | Returns the id of selected cookie option |
| value | string | "string" | Return the value of selected cookie option |
| queryStringPolicyId | integer($int32) | 0 | Returns the identifier for Whitelist or None query strings, depends on what you've selected |
| queryStrings | array [] | Returns an array of selected query strings | |
| queryStringOptions | array [object] | Returns the listed query strings that you can sele | |
| id | integer($int32) | 0 | Returns the identifier of the origin request policy |
| value | string | "string" | Returns the selected query string option depends on user input |
| resultInfo | array [object] | Returns an object of behavior | |
| totalCount | integer($int32) | 0 | How many records of behavior entity are in database |
| pageIndex | integer($int32) | 0 | Returns how many pages of paganed data are |
| pageSize | integer($int32) | 0 | Returns paganed data |
| totalPages | integer($int32) | 0 | How many pages |
| hasNextPage | bool | true | Returns the next page of paganed data |
| hasPreviousPage | bool | true | Returns 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 | |
|---|---|
| Method | PUT |
| URL or EndPoint | /api/v{version}/projects/{projectId}/distributions/{distributionId}/invalidations/{id} |
| Headers | Authorization |
| Parameters | distributionId, version, projectId, id |
| Body | {distributionId, originGroupId, origins, id, randomRoutingPercentage, originOptions, id, value, originRoutingType} |
The description of the URL parameters is as follows:
| URL Parameter Name | Mandatory | Type | Example | Description |
|---|---|---|---|---|
| v{version} | Yes | string | v1 | Shows the version of API |
| {projectId} | Yes | string | 3fa85f64-5717-4562-b3fc-2c963f66afa6 | The project's ID. If the ID is empty, an empty distribution configuration is returned |
| {distributionId} | Yes | string | "string" | The distribution's ID. If the ID is empty, an empty distribution configuration is returned |
| {id} | Yes | integer($int32) | 0 | The origin request policies's ID |
The description of the parameters is as follows:
| Parameter Name | Mandatory | Type | Example | Description |
|---|---|---|---|---|
| projectId | Yes | string | 3fa85f64-5717-4562-b3fc-2c963f66afa6 | The project's ID. If the ID is empty, an empty distribution configuration is returned |
| version | Yes | string | v1 | Shows the version of API |
| distributionId | Yes | string | "string" | The distribution's ID. If the ID is empty, an empty distribution configuration is returned |
| id | Yes | integer($int32) | 0 | The 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 Name | Mandatory | Type | Example | Description |
|---|---|---|---|---|
| id | Yes | integer($int32) | 0 | Sends the identifier of the origin request policy |
| name | Yes | string | "string" | Sends the user input name of the origin request policy |
| comment | No | string | "string" | Sends the user input comment of the origin request policy |
| headerPolicyId | Yes | integer($int32) | 0 | Sends the identifier for Whitelist or None headers, depends on what you've selected |
| headers | Yes | array [] | "string" | Sends an array of selected headers |
| cookiePolicyId | integer($int32) | 0 | Sends the identifier for Whitelist or None cookies, depends on what you've selected | |
| cookies | Yes | array [] | "string" | Sends an array of selected cookies |
| queryStringPolicyId | integer($int32) | 0 | Sends the identifier for Whitelist or None query strings, depends on what you've selected | |
| queryStrings | Yes | array [] | "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 Name | Type | Example | Description |
|---|---|---|---|
| success | bool | true | If response is success will return true otherwise will return false |
| errors | array [] | "string" | Indicate if there was an error |
| messages | array [] | "string" | Returns the response message from back-end |
| result | array [object] | Returns a behavior object | |
| id | integer($int32) | 0 | Returns the identifier of the origin request policy |
| name | string | "string" | Returns the user input name of the origin request policy |
| comment | string | "string" | Returns the user input comment of the origin request policy |
| headerPolicyId | integer($int32) | 0 | Returns the identifier for Whitelist or None headers, depends on what you've selected |
| headers | array [] | "string" | Returns an array of selected headers |
| headerOptions | array [object] | Returns the listed headers that you can select | |
| id | integer($int32) | 0 | Returns the id of selected header option |
| value | string | "string" | Return the value of selected header option |
| cookiePolicyId | integer($int32) | 0 | Returns the identifier for Whitelist or None cookies, depends on what you've selected |
| cookies | array [] | "string " | Returns an array of selected cookies |
| cookieOptions | array [] | Returns the listed cookies that you can select | |
| id | integer($int32) | 0 | Returns the id of selected cookie option |
| value | string | "string" | Return the value of selected cookie option |
| queryStringPolicyId | integer($int32) | 0 | Returns the identifier for Whitelist or None query strings, depends on what you've selected |
| queryStrings | array [] | Returns an array of selected query strings | |
| queryStringOptions | array [object] | Returns the listed query strings that you can sele | |
| id | integer($int32) | 0 | Returns the identifier of the origin request policy |
| value | string | "string" | Returns the selected query string option depends on user input |
| resultInfo | array [object] | Returns an object of behavior | |
| totalCount | integer($int32) | 0 | How many records of behavior entity are in database |
| pageIndex | integer($int32) | 0 | Returns how many pages of paganed data are |
| pageSize | integer($int32) | 0 | Returns paganed data |
| totalPages | integer($int32) | 0 | How many pages |
| hasNextPage | bool | true | Returns the next page of paganed data |
| hasPreviousPage | bool | true | Returns 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 | |
|---|---|
| Method | DELETE |
| URL or EndPoint | /api/v{version}/projects/{projectId}/distributions/{distributionId}/invalidations/{id} |
| Headers | Authorization |
| Parameters | distributionId, version, projectId, id |
| Body | Not Applicable |
The description of the URL parameters is as follows:
| URL Parameter Name | Mandatory | Type | Example | Description |
|---|---|---|---|---|
| v{version} | Yes | string | v1 | Shows the version of API |
| {projectId} | Yes | string | 3fa85f64-5717-4562-b3fc-2c963f66afa6 | The project's ID. If the ID is empty, an empty distribution configuration is returned |
| {distributionId} | Yes | string | "string" | The distribution's ID. If the ID is empty, an empty distribution configuration is returned |
| {id} | Yes | integer($int32) | 0 | The origin request policies's ID |
The description of the parameters is as follows:
| Parameter Name | Mandatory | Type | Example | Description |
|---|---|---|---|---|
| projectId | Yes | string | 3fa85f64-5717-4562-b3fc-2c963f66afa6 | The project's ID. If the ID is empty, an empty distribution configuration is returned |
| version | Yes | string | v1 | Shows the version of API |
| distributionId | Yes | string | "string" | The distribution's ID. If the ID is empty, an empty distribution configuration is returned |
| id | Yes | integer($int32) | 0 | The 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 Name | Type | Example | Description |
|---|---|---|---|
| success | bool | true | If response is success will return true otherwise will return false |
| errors | array [] | "string" | Indicate if there was an error |
| messages | array [] | "string" | Returns the response message from back-end |
| result | array [object] | Returns a behavior object | |
| id | integer($int32) | 0 | Returns the identifier of the origin request policy |
| name | string | "string" | Returns the user input name of the origin request policy |
| comment | string | "string" | Returns the user input comment of the origin request policy |
| headerPolicyId | integer($int32) | 0 | Returns the identifier for Whitelist or None headers, depends on what you've selected |
| headers | array [] | "string" | Returns an array of selected headers |
| headerOptions | array [object] | Returns the listed headers that you can select | |
| id | integer($int32) | 0 | Returns the id of selected header option |
| value | string | "string" | Return the value of selected header option |
| cookiePolicyId | integer($int32) | 0 | Returns the identifier for Whitelist or None cookies, depends on what you've selected |
| cookies | array [] | "string " | Returns an array of selected cookies |
| cookieOptions | array [] | Returns the listed cookies that you can select | |
| id | integer($int32) | 0 | Returns the id of selected cookie option |
| value | string | "string" | Return the value of selected cookie option |
| queryStringPolicyId | integer($int32) | 0 | Returns the identifier for Whitelist or None query strings, depends on what you've selected |
| queryStrings | array [] | Returns an array of selected query strings | |
| queryStringOptions | array [object] | Returns the listed query strings that you can sele | |
| id | integer($int32) | 0 | Returns the identifier of the origin request policy |
| value | string | "string" | Returns the selected query string option depends on user input |
| resultInfo | array [object] | Returns an object of behavior | |
| totalCount | integer($int32) | 0 | How many records of behavior entity are in database |
| pageIndex | integer($int32) | 0 | Returns how many pages of paganed data are |
| pageSize | integer($int32) | 0 | Returns paganed data |
| totalPages | integer($int32) | 0 | How many pages |
| hasNextPage | bool | true | Returns the next page of paganed data |
| hasPreviousPage | bool | true | Returns 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