Logo
Akamai APIs API Documentation

Patch an include's rule tree

PATCH https://{{host}}/papi/v1/includes/:includeId/versions/:includeVersion/rules

Limited availability Selectively modify a rule tree using JSON patch syntax. Set the validateRules query parameter to false to bypass a set of validation tests that may significantly slow this operation's execution time. See Validation best practices for guidance on when to defer validation. See Rule tree errors and warnings and Validation errors for information on how validation data is embedded within the response object.

 

Body PARAM

Key Datatype Required Description 
contractId
string (Optional) Unique identifier for the contract. The parameter is optional if a property belongs to only one contract. Otherwise you need to specify it along with the `groupId`. In other operations that don't specify a `propertyId` URL parameter, this parameter is always required. See [ID prefixes](https://techdocs.akamai.com/property-mgr/reference/id-prefixes) for details on omitting the value's `ctr_` prefix.
groupId
string (Optional) Unique identifier for the group. The parameter is optional if a property belongs to only one group. Otherwise you need to specify it along with the `contractId`. In other operations that don't specify a `propertyId` URL parameter, this parameter is always required. See [ID prefixes](https://techdocs.akamai.com/property-mgr/reference/id-prefixes) for details on omitting the value's `grp_` prefix.
validateRules
string (Optional) Set to `true` by default. When `false`, skips validation tests that would identify potential problems within the response object's `errors` and `warnings` arrays. See [Rule tree errors and warnings](https://techdocs.akamai.com/property-mgr/reference/rule-tree-errors-and-warnings) and [Validation errors](https://techdocs.akamai.com/property-mgr/reference/validation-errors) for information on how validation data appears in the response object. See [Validation best practices](https://techdocs.akamai.com/property-mgr/reference/validation-best-practices) for guidance on when to defer validation.
validateMode
string (Optional) __Enum__ With `validateRules` enabled, setting this to `fast` performs a quick validation check based on the provided JSON. This is faster than the default `full` validation, which performs more extensive checks on the converted XML metadata configuration. See [Validation best practices](https://techdocs.akamai.com/property-mgr/reference/validation-best-practices) for more guidance.
dryRun
string (Optional) With the `validateRules` query parameter also enabled, allows for a _dry run_ in order to gather any possible errors without saving the rule tree. See [Validation best practices](https://techdocs.akamai.com/property-mgr/reference/validation-best-practices) for more guidance.
accountSwitc
Curl
curl -X PATCH 'https://host/papi/v1/includes/:includeId/versions/:includeVersion/rules?contractId=&groupId=&validateRules=&validateMode=&dryRun=&accountSwitchKey=' -H 'If-Match: If-Match' -H 'PAPI-Use-Prefixes: PAPI-Use-Prefixes' -H 'Content-Type: application/json-patch+json' -H 'Accept: */*' -d '{"0":{"op":"replace","path":"/rules/options/is_secure","value":true},"1":{"op":"replace","path":"/rules/children/0/name","value":"Handle /my-path"}}'

ENDPOINTS