Restrictions
GET Restrictions#
Gets all restrictions associated with the current distribution
| GET ALL | |
|---|---|
| Method | GET ALL |
| URL or EndPoint | /api/v{version}/projects/{projectId}/distributions/{distributionId}/restrictions |
| Headers | Authorization |
| Parameters | distributionId, 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 |
| {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#
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, "restrictionMode": "string", "restrictionType": "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 | The identifier for the restriction |
| restrictionMode | "string" | string | Returns the restriction mode |
| restrictionType | string | "string" | Returns the restriction type |
| resultInfo | array [object] | Returns an object of restriction | |
| 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 Restriction#
Creates a restriction.
| POST | |
|---|---|
| Method | POST |
| URL or EndPoint | /api/v{version}/projects/{projectId}/distributions/{distributionId}/restrictions |
| Headers | Authorization |
| Parameters | projectId, distributionId, version |
| Body | { restrictionType, restrictionMode, restrictionContainer} |
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#
{ "restrictionType": 0, "restrictionMode": 0, "restrictionContainer": [ "string" ]}
The description of the parameters is as follows:
| Body Parameter Name | Mandatory | Type | Example | Description |
|---|---|---|---|---|
| restrictionType | Yes | integer($int32) | 0 | Sends the restriction type |
| restrictionMode | Yes | integer($int32) | 0 | Sends the restriction mode |
| restrictionContainer | Yes | array[object] | Sends the restriction container |
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", "restrictionType": 0, "restrictionMode": 0, "secretKey": "string", "restrictionContainer": [ "string" ], "restrictionTypeOptions": { "additionalProp1": 0, "additionalProp2": 0, "additionalProp3": 0 }, "restrictionModeOptions": { "additionalProp1": 0, "additionalProp2": 0, "additionalProp3": 0 } }, "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 | Returns identifier for the restriction |
| distributionId | string | "string" | Returns the identifier of distribution |
| restrictionType | string | "string" | Returns the restriction type |
| restrictionMode | integer($int32) | 0 | Returns the restriction mode |
| secretKey | string | "string" | Returns the secret key |
| restrictionContainer | string | "string" | Returns the restriction container |
| restrictionTypeOptions | integer($int32) | 0 | Returns the restriction type options |
| additionalProp1 | integer($int32) | 0 | Returns the additional property for restriction type |
| additionalProp2 | integer($int32) | 0 | Returns the additional property for restriction type |
| additionalProp3 | integer($int32) | 0 | Returns the additional property for restriction type |
| restrictionModeOptions | integer($int32) | 0 | Returns the object of restriction mode options |
| additionalProp1 | integer($int32) | 0 | Returns the additional property for restriction mode |
| additionalProp2 | array[object] | Returns the additional property for restriction mode | |
| additionalProp3 | string | "string" | Returns the additional property for restriction mode |
| 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 Restriction#
Gets the restriction by id
| GET | |
|---|---|
| Method | GET By Id |
| URL or EndPoint | /api/v{version}/projects/{projectId}/distributions/{distributionId}/restrictions/{restrictionId} |
| Headers | Authorization |
| Parameters | distributionId, restrictionId, 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 |
| {restrictionId} | Yes | integer($int32) | 0 | Shows the restriction 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 |
| restrictionId | Yes | integer($int32) | 0 | Shows the restriction 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", "restrictionType": 0, "restrictionMode": 0, "secretKey": "string", "restrictionContainer": [ "string" ], "restrictionTypeOptions": { "additionalProp1": 0, "additionalProp2": 0, "additionalProp3": 0 }, "restrictionModeOptions": { "additionalProp1": 0, "additionalProp2": 0, "additionalProp3": 0 } }, "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 | Returns identifier for the restriction |
| distributionId | string | "string" | Returns the identifier of distribution |
| restrictionType | string | "string" | Returns the restriction type |
| restrictionMode | integer($int32) | 0 | Returns the restriction mode |
| secretKey | string | "string" | Returns the secret key |
| restrictionContainer | string | "string" | Returns the restriction container |
| restrictionTypeOptions | integer($int32) | 0 | Returns the restriction type options |
| additionalProp1 | integer($int32) | 0 | Returns the additional property for restriction type |
| additionalProp2 | integer($int32) | 0 | Returns the additional property for restriction type |
| additionalProp3 | integer($int32) | 0 | Returns the additional property for restriction type |
| restrictionModeOptions | integer($int32) | 0 | Returns the object of restriction mode options |
| additionalProp1 | integer($int32) | 0 | Returns the additional property for restriction mode |
| additionalProp2 | array[object] | Returns the additional property for restriction mode | |
| additionalProp3 | string | "string" | Returns the additional property for restriction mode |
| 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 Restriction#
Updates an existing healthcheck.
| PUT | |
|---|---|
| Method | PUT |
| URL or EndPoint | /api/v{version}/projects/{projectId}/distributions/{distributionId}/restrictions |
| Headers | Authorization |
| Parameters | projectId, distributionId, version |
| Body | { restrictionType, restrictionMode, restrictionContainer} |
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#
{ "restrictionMode": 0, "restrictionContainer": [ "string" ]}
The description of the parameters is as follows:
| Body Parameter Name | Mandatory | Type | Example | Description |
|---|---|---|---|---|
| restrictionMode | Yes | integer($int32) | 0 | Sends the restriction mode |
| restrictionContainer | Yes | array[object] | Sends the restriction container |
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", "restrictionType": 0, "restrictionMode": 0, "secretKey": "string", "restrictionContainer": [ "string" ], "restrictionTypeOptions": { "additionalProp1": 0, "additionalProp2": 0, "additionalProp3": 0 }, "restrictionModeOptions": { "additionalProp1": 0, "additionalProp2": 0, "additionalProp3": 0 } }, "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 | Returns identifier for the restriction |
| distributionId | string | "string" | Returns the identifier of distribution |
| restrictionType | string | "string" | Returns the restriction type |
| restrictionMode | integer($int32) | 0 | Returns the restriction mode |
| secretKey | string | "string" | Returns the secret key |
| restrictionContainer | string | "string" | Returns the restriction container |
| restrictionTypeOptions | integer($int32) | 0 | Returns the restriction type options |
| additionalProp1 | integer($int32) | 0 | Returns the additional property for restriction type |
| additionalProp2 | integer($int32) | 0 | Returns the additional property for restriction type |
| additionalProp3 | integer($int32) | 0 | Returns the additional property for restriction type |
| restrictionModeOptions | integer($int32) | 0 | Returns the object of restriction mode options |
| additionalProp1 | integer($int32) | 0 | Returns the additional property for restriction mode |
| additionalProp2 | array[object] | Returns the additional property for restriction mode | |
| additionalProp3 | string | "string" | Returns the additional property for restriction mode |
| 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 Restriction#
Deletes restriction by id.
| DELETE | |
|---|---|
| Method | DELETE By Id |
| URL or EndPoint | /api/v{version}/projects/{projectId}/distributions/{distributionId}/restrictions/{restrictionId} |
| Headers | Authorization |
| Parameters | distributionId, restrictionId, 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 |
| {restrictionId} | Yes | integer($int32) | 0 | Shows the restriction 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 |
| restrictionId | Yes | integer($int32) | 0 | Shows the restriction 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", "restrictionType": 0, "restrictionMode": 0, "secretKey": "string", "restrictionContainer": [ "string" ], "restrictionTypeOptions": { "additionalProp1": 0, "additionalProp2": 0, "additionalProp3": 0 }, "restrictionModeOptions": { "additionalProp1": 0, "additionalProp2": 0, "additionalProp3": 0 } }, "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 | Returns identifier for the restriction |
| distributionId | string | "string" | Returns the identifier of distribution |
| restrictionType | string | "string" | Returns the restriction type |
| restrictionMode | integer($int32) | 0 | Returns the restriction mode |
| secretKey | string | "string" | Returns the secret key |
| restrictionContainer | string | "string" | Returns the restriction container |
| restrictionTypeOptions | integer($int32) | 0 | Returns the restriction type options |
| additionalProp1 | integer($int32) | 0 | Returns the additional property for restriction type |
| additionalProp2 | integer($int32) | 0 | Returns the additional property for restriction type |
| additionalProp3 | integer($int32) | 0 | Returns the additional property for restriction type |
| restrictionModeOptions | integer($int32) | 0 | Returns the object of restriction mode options |
| additionalProp1 | integer($int32) | 0 | Returns the additional property for restriction mode |
| additionalProp2 | array[object] | Returns the additional property for restriction mode | |
| additionalProp3 | string | "string" | Returns the additional property for restriction mode |
| 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