Skip to main content

Restrictions

GET Restrictions#

Gets all restrictions associated with the current distribution

GET ALL
MethodGET ALL
URL or EndPoint/api/v{version}/projects/{projectId}/distributions/{distributionId}/restrictions
HeadersAuthorization
ParametersdistributionId, projectId, 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
{distributionId}Yesstring"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 NameMandatoryTypeExampleDescription
projectIdYesstring3fa85f64-5717-4562-b3fc-2c963f66afa6The project's ID. If the ID is empty, an empty project configuration is returned
distributionIdYesstring"string"The distribution's ID. If the ID is empty, an empty distribution 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,      "restrictionMode": "string",      "restrictionType": "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)0The identifier for the restriction
restrictionMode"string"stringReturns the restriction mode
restrictionTypestring"string"Returns the restriction type
resultInfoarray [object]Returns an object of restriction
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 Restriction#

Creates a restriction.

POST
MethodPOST
URL or EndPoint/api/v{version}/projects/{projectId}/distributions/{distributionId}/restrictions
HeadersAuthorization
ParametersprojectId, distributionId, version
Body{ restrictionType, restrictionMode, restrictionContainer}

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
{distributionId}Yesstring"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 NameMandatoryTypeExampleDescription
projectIdYesstring3fa85f64-5717-4562-b3fc-2c963f66afa6The project's ID. If the ID is empty, an empty project configuration is returned
distributionIdYesstring"string"The distribution's ID. If the ID is empty, an empty distribution configuration is returned
VersionYesstring($uuid)v1Shows the version of API

Request body#

{  "restrictionType": 0,  "restrictionMode": 0,  "restrictionContainer": [    "string"  ]}

The description of the parameters is as follows:

Body Parameter NameMandatoryTypeExampleDescription
restrictionTypeYesinteger($int32)0Sends the restriction type
restrictionModeYesinteger($int32)0Sends the restriction mode
restrictionContainerYesarray[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 NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsstring"string"Indicate if there was an error
messagesstring"string"Returns the response message from back-end
resultarray [object]Returns a behavior object
idinteger($int32)0Returns identifier for the restriction
distributionIdstring"string"Returns the identifier of distribution
restrictionTypestring"string"Returns the restriction type
restrictionModeinteger($int32)0Returns the restriction mode
secretKeystring"string"Returns the secret key
restrictionContainerstring"string"Returns the restriction container
restrictionTypeOptionsinteger($int32)0Returns the restriction type options
additionalProp1integer($int32)0Returns the additional property for restriction type
additionalProp2integer($int32)0Returns the additional property for restriction type
additionalProp3integer($int32)0Returns the additional property for restriction type
restrictionModeOptionsinteger($int32)0Returns the object of restriction mode options
additionalProp1integer($int32)0Returns the additional property for restriction mode
additionalProp2array[object]Returns the additional property for restriction mode
additionalProp3string"string"Returns the additional property for restriction mode
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

GET Restriction#

Gets the restriction by id

GET
MethodGET By Id
URL or EndPoint/api/v{version}/projects/{projectId}/distributions/{distributionId}/restrictions/{restrictionId}
HeadersAuthorization
ParametersdistributionId, restrictionId, 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
{restrictionId}Yesinteger($int32)0Shows the restriction 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
restrictionIdYesinteger($int32)0Shows 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 NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsstring"string"Indicate if there was an error
messagesstring"string"Returns the response message from back-end
resultarray [object]Returns a behavior object
idinteger($int32)0Returns identifier for the restriction
distributionIdstring"string"Returns the identifier of distribution
restrictionTypestring"string"Returns the restriction type
restrictionModeinteger($int32)0Returns the restriction mode
secretKeystring"string"Returns the secret key
restrictionContainerstring"string"Returns the restriction container
restrictionTypeOptionsinteger($int32)0Returns the restriction type options
additionalProp1integer($int32)0Returns the additional property for restriction type
additionalProp2integer($int32)0Returns the additional property for restriction type
additionalProp3integer($int32)0Returns the additional property for restriction type
restrictionModeOptionsinteger($int32)0Returns the object of restriction mode options
additionalProp1integer($int32)0Returns the additional property for restriction mode
additionalProp2array[object]Returns the additional property for restriction mode
additionalProp3string"string"Returns the additional property for restriction mode
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 Restriction#

Updates an existing healthcheck.

PUT
MethodPUT
URL or EndPoint/api/v{version}/projects/{projectId}/distributions/{distributionId}/restrictions
HeadersAuthorization
ParametersprojectId, distributionId, version
Body{ restrictionType, restrictionMode, restrictionContainer}

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
{distributionId}Yesstring"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 NameMandatoryTypeExampleDescription
projectIdYesstring3fa85f64-5717-4562-b3fc-2c963f66afa6The project's ID. If the ID is empty, an empty project configuration is returned
distributionIdYesstring"string"The distribution's ID. If the ID is empty, an empty distribution configuration is returned
VersionYesstring($uuid)v1Shows the version of API

Request body#

{  "restrictionMode": 0,  "restrictionContainer": [    "string"  ]}

The description of the parameters is as follows:

Body Parameter NameMandatoryTypeExampleDescription
restrictionModeYesinteger($int32)0Sends the restriction mode
restrictionContainerYesarray[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 NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsstring"string"Indicate if there was an error
messagesstring"string"Returns the response message from back-end
resultarray [object]Returns a behavior object
idinteger($int32)0Returns identifier for the restriction
distributionIdstring"string"Returns the identifier of distribution
restrictionTypestring"string"Returns the restriction type
restrictionModeinteger($int32)0Returns the restriction mode
secretKeystring"string"Returns the secret key
restrictionContainerstring"string"Returns the restriction container
restrictionTypeOptionsinteger($int32)0Returns the restriction type options
additionalProp1integer($int32)0Returns the additional property for restriction type
additionalProp2integer($int32)0Returns the additional property for restriction type
additionalProp3integer($int32)0Returns the additional property for restriction type
restrictionModeOptionsinteger($int32)0Returns the object of restriction mode options
additionalProp1integer($int32)0Returns the additional property for restriction mode
additionalProp2array[object]Returns the additional property for restriction mode
additionalProp3string"string"Returns the additional property for restriction mode
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

DELETE Restriction#

Deletes restriction by id.

DELETE
MethodDELETE By Id
URL or EndPoint/api/v{version}/projects/{projectId}/distributions/{distributionId}/restrictions/{restrictionId}
HeadersAuthorization
ParametersdistributionId, restrictionId, 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
{restrictionId}Yesinteger($int32)0Shows the restriction 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
restrictionIdYesinteger($int32)0Shows 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 NameTypeExampleDescription
successbooltrueIf response is success will return true otherwise will return false
errorsstring"string"Indicate if there was an error
messagesstring"string"Returns the response message from back-end
resultarray [object]Returns a behavior object
idinteger($int32)0Returns identifier for the restriction
distributionIdstring"string"Returns the identifier of distribution
restrictionTypestring"string"Returns the restriction type
restrictionModeinteger($int32)0Returns the restriction mode
secretKeystring"string"Returns the secret key
restrictionContainerstring"string"Returns the restriction container
restrictionTypeOptionsinteger($int32)0Returns the restriction type options
additionalProp1integer($int32)0Returns the additional property for restriction type
additionalProp2integer($int32)0Returns the additional property for restriction type
additionalProp3integer($int32)0Returns the additional property for restriction type
restrictionModeOptionsinteger($int32)0Returns the object of restriction mode options
additionalProp1integer($int32)0Returns the additional property for restriction mode
additionalProp2array[object]Returns the additional property for restriction mode
additionalProp3string"string"Returns the additional property for restriction mode
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