Behaviors
GET Behaviors#
Gets the distribution behaviors.
| GET ALL | |
|---|---|
| Method | GET ALL |
| URL or EndPoint | /api/v{version}/projects/{projectId}/distributions/{distributionId}/behaviors |
| Headers | Authorization |
| Parameters | distributionId, projectId, version, PageIndex, PageSize |
| 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 |
| {distributionId} | Yes | string | "string" | The distribution'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 |
|---|---|---|---|---|
| projectId | Yes | string | 3fa85f64-5717-4562-b3fc-2c963f66afa6 | The project's ID. If the ID is empty, an empty project configuration is returned |
| distributionId | Yes | string | "string" | The distribution's ID. If the ID is empty, an empty distribution configuration is returned |
| Version | Yes | string($uuid) | v1 | Shows the version of API |
| PageIndex | No | integer($int32) | 1 | How many pages |
| PageSize | No | integer($int32) | 2 | Paganed Data |
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, "precedence": 0, "pathPattern": "string", "origin": "string", "viewerProtocolPolicy": "string", "cachePolicyName": "string", "originRequestPolicyName": "string", "trustedKeyGroups": "string", "trustedSigners": "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) | "string" | The identifier for the behavior |
| precedence | integer($int32) | 0 | Changes the order of behavior's precedence |
| pathPattern | string | "string" | Returns pathPattern that you've specified in the configuration |
| origin | string | "string" | Returns origin name that you've specified in the configuration |
| viewerProtocolPolicy | string | "string" | Returns viewer protocol policy selection in behavior configuration, e.g returns HTTP and HTTPS, redirect HTTP to HTTPS or HTTPS only |
| cachePolicyName | string | "string" | Returns the cache policy name that you choose in the dropdown list in the configuration of behavior |
| originRequestPolicyName | string | "string" | Returns the origin request policy name that you choose in the dropdown list in the configuration of behavior |
| 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 Behaviors#
Creates a new behavior for the specified distribution.
| POST | |
|---|---|
| Method | POST |
| URL or EndPoint | /api/v{version}/projects/{projectId}/distributions/{distributionId}/behaviors |
| Headers | Authorization |
| Parameters | projectId, distributionId, version |
| Body | {id,distributionId,pathPattern, isOriginGroup, originId, viewerProtocolPolicy, allowedHttpMethods, cachedHttpMethods, compressObjectsAutomatically, useCacheAndOriginRequestPolicy, cachePolicyId, originRequestPolicyId, objectCaching, minimumTtl, maximumTtl, defaultTtl, forwardCookies, queryStringForwardingAndCaching} |
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 |
| {distributionId} | Yes | string | "string" | The distribution'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 |
|---|---|---|---|---|
| projectId | Yes | string | 3fa85f64-5717-4562-b3fc-2c963f66afa6 | The project's ID. If the ID is empty, an empty project configuration is returned |
| distributionId | Yes | string | "string" | The distribution's ID. If the ID is empty, an empty distribution configuration is returned |
| Version | Yes | string($uuid) | v1 | Shows the version of API |
Request body#
{ "id": 0, "distributionId": "string", "pathPattern": "string", "isOriginGroup": true, "originId": 0, "viewerProtocolPolicy": 0, "allowedHttpMethods": 0, "cachedHttpMethods": 0, "compressObjectsAutomatically": true, "cachePolicyId": 0, "originRequestPolicyId": 0,
}
The description of the parameters is as follows:
| Body Parameter Name | Mandatory | Type | Example | Description |
|---|---|---|---|---|
| id | Yes | integer($int32) | 0 | The identifier for the behavior |
| distributionId | Yes | string | "string" | The identifier for distribution |
| pathPattern | Yes | string | "string" | Sends path pattern that you've specified in the configuration |
| isOriginGroup | Yes | bool | true | Sends true if it is a origin group otherwise for the origin it returns false |
| originId | No | integer($int32) | 0 | The identifier of the origin |
| viewerProtocolPolicy | Yes | integer($int32) | 0 | Sends viewer protocol policy selection in behavior configuration, e.g returns HTTP and HTTPS, redirect HTTP to HTTPS or HTTPS only |
| allowedHttpMethods | Yes | integer($int32) | 0 | Sends selected http methods in behavior configuration |
| cachedHttpMethods | Yes | integer($int32) | 0 | Sends the http methods the user wants to cache for the cache behavior |
| compressObjectsAutomatically | Yes | bool | true | Sends true if it is compressed automatically, otherwise turns false |
| cachePolicyId | No | integer($int32) | 0 | Sends the identifier for the selected cache policy id |
| originRequestPolicyId | Yes | integer($int32) | 0 | Sends the identifier for the selected origin request policy 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, "distributionId": "string", "pathPattern": "string", "isOriginGroup": true, "originId": 0, "originOptions": [ { "id": 0, "value": "string" } ], "originGroupOptions": [ { "id": 0, "value": "string" } ], "viewerProtocolPolicy": 0, "viewerProtocolPolicyOptions": [ { "id": 0, "value": "string" } ], "allowedHttpMethods": 0, "allowedHttpMethodsOptions": [ { "id": 0, "value": "string" } ], "cachedHttpMethods": 0, "cachedHttpMethodsOptions": [ { "id": 0, "value": "string" } ], "cachePolicyId": 0, "cachePolicyOptions": [ { "id": 0, "value": "string" } ], "originRequestPolicyId": 0, "originRequestPolicyOptions": [ { "id": 0, "value": "string" } ], "objectCaching": true, "minimumTtl": 0, "maximumTtl": 0, "defaultTtl": 0, "forwardCookies": 0, "forwardCookiesOptions": [ { "id": 0, "value": "string" } ], "queryStringForwardingAndCaching": 0, "queryStringForwardingAndCachingOptions": [ { "id": 0, "value": "string" } ], "compressObjectsAutomatically": true }, "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 | string | "string" | Indicate if there was an error |
| messages | string | "string" | Returns the response message from back-end |
| result | array [object] | Returns a behavior object | |
| id | integer($int32) | 0 | The identifier for the behavior |
| distributionId | string | "string" | Returns the identifier of distribution in behaviors |
| pathPattern | string | "string" | Returns pathPattern that you've specified in the configuration |
| isOriginGroup | bool | true | Returns true if it is a origin group otherwise for the origin it returns false |
| originId | integer($int32) | 0 | Returns the identifier of the origin |
| originOptions | array [object] | Returns the selected origin options in behaviors configuration | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected origin options in behaviors configuration |
| originGroupOptions | array [object] | 0 | Returns the selected origin group options in behaviors configuration |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected origin group |
| viewerProtocolPolicy | string | "string" | Returns viewer protocol policy selection in behavior configuration, e.g returns HTTP and HTTPS, redirect HTTP to HTTPS or HTTPS only |
| viewerProtocolPolicyOptions | array [object] | Returns viewer protocol policy selected options in behavior configuration, e.g returns HTTP and HTTPS, redirect HTTP to HTTPS or HTTPS only | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected viewer protocol policy |
| allowedHttpMethods | integer($int32) | 0 | Returns selected http methods in behavior configuration |
| allowedHttpMethodsOptions | array [object] | Returns an object of selected http methods in behavior configuration | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected http method |
| cachedHttpMethods | integer($int32) | 0 | Returns the http methods the user wants to cache for the cache behavior |
| cachedHttpMethodsOptions | array [object] | Returns an object of selected http method options the user wants to cache for the cache behavior | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected cached http method |
| useCacheAndOriginRequestPolicy | bool | true | Returns the selected use a cache policy and origin request policy |
| cachePolicyId | integer($int32) | 0 | Returns the user input of the cache policy identifier |
| cachePolicyOptions | array [object] | Returns an object of cache policy options which is "Disabled", "Optimized" or "Custom" | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected cache policy |
| originRequestPolicyId | integer($int32) | 0 | |
| originRequestPolicyOptions | array [object] | ||
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | |
| compressObjectsAutomatically | bool | true | Returns true if object is compressed automatically otherwise it returns false |
| 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
GET Behavior#
Gets the distribution behavior with the specified id
| GET | |
|---|---|
| Method | GET By Id |
| URL or EndPoint | /api/v{version}/projects/{projectId}/distributions/{distributionId}/behaviors/{id} |
| Headers | Authorization |
| Parameters | distributionId, id, 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 | Shows the version of API |
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 behavior'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, "distributionId": "string", "pathPattern": "string", "isOriginGroup": true, "originId": 0, "originOptions": [ { "id": 0, "value": "string" } ], "originGroupOptions": [ { "id": 0, "value": "string" } ], "viewerProtocolPolicy": 0, "viewerProtocolPolicyOptions": [ { "id": 0, "value": "string" } ], "allowedHttpMethods": 0, "allowedHttpMethodsOptions": [ { "id": 0, "value": "string" } ], "cachedHttpMethods": 0, "cachedHttpMethodsOptions": [ { "id": 0, "value": "string" } ], "useCacheAndOriginRequestPolicy": true, "cachePolicyId": 0, "cachePolicyOptions": [ { "id": 0, "value": "string" } ], "originRequestPolicyId": 0, "originRequestPolicyOptions": [ { "id": 0, "value": "string" } ], "objectCaching": true, "minimumTtl": 0, "maximumTtl": 0, "defaultTtl": 0, "forwardCookies": 0, "forwardCookiesOptions": [ { "id": 0, "value": "string" } ], "queryStringForwardingAndCaching": 0, "queryStringForwardingAndCachingOptions": [ { "id": 0, "value": "string" } ], "compressObjectsAutomatically": true }, "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 | string | "string" | Indicate if there was an error |
| messages | string | "string" | Returns the response message from back-end |
| result | array [object] | Returns a behavior object | |
| id | integer($int32) | 0 | The identifier for the behavior |
| distributionId | string | "string" | Returns the identifier of distribution in behaviors |
| pathPattern | string | "string" | Returns pathPattern that you've specified in the configuration |
| isOriginGroup | bool | true | Returns true if it is a origin group otherwise for the origin it returns false |
| originId | integer($int32) | 0 | Returns the identifier of the origin |
| originOptions | array [object] | Returns the selected origin options in behaviors configuration | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected origin options in behaviors configuration |
| originGroupOptions | array [object] | 0 | Returns the selected origin group options in behaviors configuration |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected origin group |
| viewerProtocolPolicy | string | "string" | Returns viewer protocol policy selection in behavior configuration, e.g returns HTTP and HTTPS, redirect HTTP to HTTPS or HTTPS only |
| viewerProtocolPolicyOptions | array [object] | Returns viewer protocol policy selected options in behavior configuration, e.g returns HTTP and HTTPS, redirect HTTP to HTTPS or HTTPS only | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected viewer protocol policy |
| allowedHttpMethods | integer($int32) | 0 | Returns selected http methods in behavior configuration |
| allowedHttpMethodsOptions | array [object] | Returns an object of selected http methods in behavior configuration | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected http method |
| cachedHttpMethods | integer($int32) | 0 | Returns the http methods the user wants to cache for the cache behavior |
| cachedHttpMethodsOptions | array [object] | Returns an object of selected http method options the user wants to cache for the cache behavior | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected cached http method |
| useCacheAndOriginRequestPolicy | bool | true | Returns the selected use a cache policy and origin request policy |
| cachePolicyId | integer($int32) | 0 | Returns the user input of the cache policy identifier |
| cachePolicyOptions | array [object] | Returns an object of cache policy options which is "Disabled", "Optimized" or "Custom" | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected cache policy |
| originRequestPolicyId | integer($int32) | 0 | |
| originRequestPolicyOptions | array [object] | ||
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | |
| compressObjectsAutomatically | bool | true | Returns true if object is compressed automatically otherwise it returns false |
| 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 Behaviors#
Updates the specified behavior.
| PUT | |
|---|---|
| Method | PUT |
| URL or EndPoint | /api/v{version}/projects/{projectId}/distributions/{distributionId}/behaviors/{id} |
| Headers | Authorization |
| Parameters | distributionId, id, version, projectId |
| Body | {id,distributionId,pathPattern, isOriginGroup, originId, viewerProtocolPolicy, allowedHttpMethods, cachedHttpMethods, compressObjectsAutomatically, useCacheAndOriginRequestPolicy, cachePolicyId, originRequestPolicyId, objectCaching, minimumTtl, maximumTtl, defaultTtl, forwardCookies, queryStringForwardingAndCaching} |
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 | Shows the version of API |
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 behavior's ID. |
Request body#
{ "id": 0, "distributionId": "string", "pathPattern": "string", "isOriginGroup": true, "originId": 0, "viewerProtocolPolicy": 0, "allowedHttpMethods": 0, "cachedHttpMethods": 0, "compressObjectsAutomatically": true, "useCacheAndOriginRequestPolicy": true, "cachePolicyId": 0, "originRequestPolicyId": 0,
}
The description of the parameters is as follows:
| Body Parameter Name | Mandatory | Type | Example | Description |
|---|---|---|---|---|
| id | Yes | integer($int32) | 0 | |
| distributionId | Yes | string | "string" | The identifier for distribution |
| pathPattern | Yes | string | "string" | Sends path pattern that you've specified in the configuration |
| isOriginGroup | Yes | bool | true | Sends true if it is a origin group otherwise for the origin it returns false |
| originId | No | integer($int32) | 0 | The identifier of the origin |
| viewerProtocolPolicy | Yes | integer($int32) | 0 | Sends viewer protocol policy selection in behavior configuration, e.g returns HTTP and HTTPS, redirect HTTP to HTTPS or HTTPS only |
| allowedHttpMethods | Yes | integer($int32) | 0 | Sends selected http methods in behavior configuration |
| cachedHttpMethods | Yes | integer($int32) | 0 | Sends the http methods the user wants to cache for the cache behavior |
| compressObjectsAutomatically | Yes | bool | true | Sends true if it is compressed automatically, otherwise turns false |
| cachePolicyId | No | integer($int32) | 0 | Sends the identifier for the selected cache policy id |
| originRequestPolicyId | Yes | integer($int32) | 0 | Sends the identifier for the selected origin request policy 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
Media type
text/plainControls Accept header.Example ValueSchema{"success": true,"errors": [ "string"],"messages": [ "string"],"result": { "id": 0, "distributionId": "string", "pathPattern": "string", "isOriginGroup": true, "originId": 0, "originOptions": [ { "id": 0, "value": "string" } ], "originGroupOptions": [ { "id": 0, "value": "string" } ], "viewerProtocolPolicy": 0, "viewerProtocolPolicyOptions": [ { "id": 0, "value": "string" } ], "allowedHttpMethods": 0, "allowedHttpMethodsOptions": [ { "id": 0, "value": "string" } ], "cachedHttpMethods": 0, "cachedHttpMethodsOptions": [ { "id": 0, "value": "string" } ], "useCacheAndOriginRequestPolicy": true, "cachePolicyId": 0, "cachePolicyOptions": [ { "id": 0, "value": "string" } ], "originRequestPolicyId": 0, "originRequestPolicyOptions": [ { "id": 0, "value": "string" } ], "objectCaching": true, "minimumTtl": 0, "maximumTtl": 0, "defaultTtl": 0, "forwardCookies": 0, "forwardCookiesOptions": [ { "id": 0, "value": "string" } ], "queryStringForwardingAndCaching": 0, "queryStringForwardingAndCachingOptions": [ { "id": 0, "value": "string" } ], "compressObjectsAutomatically": true},"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 | string | "string" | Indicate if there was an error |
| messages | string | "string" | Returns the response message from back-end |
| result | array [object] | Returns a behavior object | |
| id | integer($int32) | 0 | The identifier for the behavior |
| distributionId | string | "string" | Returns the identifier of distribution in behaviors |
| pathPattern | string | "string" | Returns pathPattern that you've specified in the configuration |
| isOriginGroup | bool | true | Returns true if it is a origin group otherwise for the origin it returns false |
| originId | integer($int32) | 0 | Returns the identifier of the origin |
| originOptions | array [object] | Returns the selected origin options in behaviors configuration | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected origin options in behaviors configuration |
| originGroupOptions | array [object] | 0 | Returns the selected origin group options in behaviors configuration |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected origin group |
| viewerProtocolPolicy | string | "string" | Returns viewer protocol policy selection in behavior configuration, e.g returns HTTP and HTTPS, redirect HTTP to HTTPS or HTTPS only |
| viewerProtocolPolicyOptions | array [object] | Returns viewer protocol policy selected options in behavior configuration, e.g returns HTTP and HTTPS, redirect HTTP to HTTPS or HTTPS only | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected viewer protocol policy |
| allowedHttpMethods | integer($int32) | 0 | Returns selected http methods in behavior configuration |
| allowedHttpMethodsOptions | array [object] | Returns an object of selected http methods in behavior configuration | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected http method |
| cachedHttpMethods | integer($int32) | 0 | Returns the http methods the user wants to cache for the cache behavior |
| cachedHttpMethodsOptions | array [object] | Returns an object of selected http method options the user wants to cache for the cache behavior | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected cached http method |
| useCacheAndOriginRequestPolicy | bool | true | Returns the selected use a cache policy and origin request policy |
| cachePolicyId | integer($int32) | 0 | Returns the user input of the cache policy identifier |
| cachePolicyOptions | array [object] | Returns an object of cache policy options which is "Disabled", "Optimized" or "Custom" | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected cache policy |
| originRequestPolicyId | integer($int32) | 0 | |
| originRequestPolicyOptions | array [object] | ||
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | |
| compressObjectsAutomatically | bool | true | Returns true if object is compressed automatically otherwise it returns false |
| 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
DELETE Behaviors#
Deletes the behavior associated with this id.
| DELETE | |
|---|---|
| Method | DELETE |
| URL or EndPoint | /api/v{version}/projects/{projectId}/distributions/{distributionId}/behaviors/{id} |
| Headers | Authorization |
| Parameters | distributionId, id, 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 | Shows the version of API |
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 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, "distributionId": "string", "pathPattern": "string", "isOriginGroup": true, "originId": 0, "originOptions": [ { "id": 0, "value": "string" } ], "originGroupOptions": [ { "id": 0, "value": "string" } ], "viewerProtocolPolicy": 0, "viewerProtocolPolicyOptions": [ { "id": 0, "value": "string" } ], "allowedHttpMethods": 0, "allowedHttpMethodsOptions": [ { "id": 0, "value": "string" } ], "cachedHttpMethods": 0, "cachedHttpMethodsOptions": [ { "id": 0, "value": "string" } ], "useCacheAndOriginRequestPolicy": true, "cachePolicyId": 0, "cachePolicyOptions": [ { "id": 0, "value": "string" } ], "originRequestPolicyId": 0, "originRequestPolicyOptions": [ { "id": 0, "value": "string" } ], "objectCaching": true, "minimumTtl": 0, "maximumTtl": 0, "defaultTtl": 0, "forwardCookies": 0, "forwardCookiesOptions": [ { "id": 0, "value": "string" } ], "queryStringForwardingAndCaching": 0, "queryStringForwardingAndCachingOptions": [ { "id": 0, "value": "string" } ], "compressObjectsAutomatically": true }, "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 | string | "string" | Indicate if there was an error |
| messages | string | "string" | Returns the response message from back-end |
| result | array [object] | Returns a behavior object | |
| id | integer($int32) | 0 | The identifier for the behavior |
| distributionId | string | "string" | Returns the identifier of distribution in behaviors |
| pathPattern | string | "string" | Returns pathPattern that you've specified in the configuration |
| isOriginGroup | bool | true | Returns true if it is a origin group otherwise for the origin it returns false |
| originId | integer($int32) | 0 | Returns the identifier of the origin |
| originOptions | array [object] | Returns all origin options in behaviors configuration | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected origin options in behaviors configuration |
| originGroupOptions | array [object] | 0 | Returns all origin group options in behaviors configuration |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected origin group |
| viewerProtocolPolicy | string | "string" | Returns viewer protocol policy selection in behavior configuration, e.g returns HTTP and HTTPS, redirect HTTP to HTTPS or HTTPS only |
| viewerProtocolPolicyOptions | array [object] | Returns viewer protocol policy all options in behavior configuration, e.g returns HTTP and HTTPS, redirect HTTP to HTTPS or HTTPS only | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected viewer protocol policy |
| allowedHttpMethods | integer($int32) | 0 | Returns selected http methods in behavior configuration |
| allowedHttpMethodsOptions | array [object] | Returns an object of all http methods in behavior configuration | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected http method |
| cachedHttpMethods | integer($int32) | 0 | Returns the http methods the user wants to cache for the cache behavior |
| cachedHttpMethodsOptions | array [object] | Returns an object of all http method options the user wants to cache for the cache behavior | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected cached http method |
| useCacheAndOriginRequestPolicy | bool | true | Returns the selected use a cache policy and origin request policy |
| cachePolicyId | integer($int32) | 0 | Returns the user input of the cache policy identifier |
| cachePolicyOptions | array [object] | Returns an object of cache policy options which is "Disabled", "Optimized" or "Custom" | |
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | Returns the selected cache policy |
| originRequestPolicyId | integer($int32) | 0 | |
| originRequestPolicyOptions | array [object] | ||
| id | integer($int32) | 0 | The identifier for the behavior |
| value | string | "string" | |
| compressObjectsAutomatically | bool | true | Returns true if object is compressed automatically otherwise it returns false |
| 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