{"type":"api","title":"Enable Rules","meta":{"id":"/apps/pubhub/media/cloud-security-apis-in-eft/9d37d008417d562ab46d4b67547a68457ce288d2/1416204d-a3eb-3b4d-a1fc-4d01aedf1895","info":{"title":"Cisco Secure Access Policy Rules and Rule Settings APIs","version":"1.0.1","description":"Create and manage the access rules and rule settings in the Access policy.","contact":{"name":"Cloud Security Developer Community"}},"security":[{"oauthFlow":[]}],"tags":[{"name":"Access Rules","description":"The API endpoints that manage the access rules for the organization."},{"name":"Rule Settings and Defaults","description":"The API endpoints that manage the rule settings and defaults on the access rules."},{"name":"Secure Access"}],"x-parser-conf":{"overview":{"markdownPath":"secure-access/reference/policies/policy-rules-overview.md","uri":"secure-access-api-reference-policy-rules-overview"}},"openapi":"3.0.1","servers":[{"url":"https://api.sse.cisco.com/{basePath}","variables":{"basePath":{"default":"policies/v2"}}}],"securitySchemes":{"oauthFlow":{"type":"oauth2","description":"The client credential flow.","flows":{"clientCredentials":{"tokenUrl":"https://api.sse.cisco.com/auth/v2/token","scopes":{"policies.settings:write":"Write policies global rule settings","policies.settings:read":"Read policies global rule settings","policies.rules:read":"Read policies access rules","policies.rules:write":"Write policies access rules"}}}}}},"spec":{"tags":["Access Rules","Secure Access"],"summary":"Enable Rules","description":"Enable or disable the rules on the policy.","operationId":"putRules","security":[{"oauthFlow":["policies.rules:write"]}],"requestBody":{"description":"Provide the list of rule IDs and set the `ruleIsEnabled` property on these rules.\n**Note:** You can not update the `ruleIsEnabled` property on the default rules.","content":{"application/json":{"schema":{"type":"object","description":"Set the `ruleIsEnabled` property on the rules.","required":["ruleIds","properties"],"properties":{"ruleIds":{"type":"array","description":"The list of rule IDs for the rules. Set the `rulesIsEnabled` property on these rules.","items":{"type":"integer","description":"The ID of the rule.","readOnly":true,"example":183456,"$$ref":"#/components/schemas/ruleId"},"example":[591713,591710]},"properties":{"type":"array","description":"The list of the `ruleIsEnabled` setting for the rules.","items":{"type":"object","description":"Set the `ruleIsEnabled` property on the rule.","properties":{"ruleIsEnabled":{"type":"boolean","description":"Specifies whether the rule is enabled.","example":true,"$$ref":"#/components/schemas/ruleIsEnabled"}},"example":{"ruleIsEnabled":false}},"example":{"properties":[{"ruleIsEnabled":true}]}}}},"example":{"ruleIds":[591713,591710],"properties":[{"ruleIsEnabled":true},{"ruleIsEnabled":false}]}}},"$$ref":"#/components/requestBodies/UpdateRulesRequest"},"responses":{"200":{"description":"OK","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"array","description":"The list of rules in the policy.","items":{"type":"object","description":"The core properties of the rule.","required":["ruleId"],"properties":{"organizationId":{"type":"integer","description":"The ID of the organization.","readOnly":true,"example":987456,"$$ref":"#/components/schemas/organizationId"},"ruleId":{"type":"integer","description":"The ID of the rule.","readOnly":true,"example":183456,"$$ref":"#/components/schemas/ruleId"},"ruleName":{"type":"string","pattern":"^[a-zA-Z0-9-_\\s]+$","minLength":2,"maxLength":50,"description":"A rule name is a sequence of 2–50 alphanumeric, hyphen, underscore, and space characters.\nA rule name is unique across all access rules in the organization's Access policy.","example":"SSE_Rule-1","$$ref":"#/components/schemas/ruleName"},"ruleDescription":{"type":"string","maxLength":256,"description":"The meaningful information about the rule. The description can have no more than 256 characters.","example":"The rule for the London office.","$$ref":"#/components/schemas/ruleDescription"},"ruleAction":{"type":"string","enum":["allow","block"],"description":"The type of action that is set on the rule.","example":"allow","$$ref":"#/components/schemas/ruleAction"},"rulePriority":{"type":"integer","description":"The positive integer that represents the priority of the rule.\nThe priority is unique across all rules on the policy for the organization.","example":1,"$$ref":"#/components/schemas/rulePriority"},"ruleIsDefault":{"type":"boolean","description":"Specifies whether the rule is the default rule.","example":true,"$$ref":"#/components/schemas/ruleIsDefault"},"ruleIsEnabled":{"type":"boolean","description":"Specifies whether the rule is enabled.","example":true,"$$ref":"#/components/schemas/ruleIsEnabled"},"modifiedBy":{"type":"string","description":"A string that includes the organization ID and user ID for the account that modified the access rule.","example":"org/1234/user/123453","$$ref":"#/components/schemas/modifiedBy"},"modifiedAt":{"type":"string","description":"The date and time when the system updated the access rule.","format":"date-time","readOnly":true,"example":"2023-11-13T21:28:54+00:00","$$ref":"#/components/schemas/modifiedAtRule"},"createdAt":{"type":"string","description":"The date and time when the system created the access rule.","format":"date-time","readOnly":true,"example":"2021-12-13T16:07:07.222Z","$$ref":"#/components/schemas/createdAtRule"}}},"example":[{"organizationId":8094936,"ruleIsDefault":false,"modifiedAt":"2024-04-01T19:42:38","rulePriority":9,"ruleId":591710,"ruleIsEnabled":false,"ruleDescription":"Rule Created by Policy Assistant","ruleName":"Rule 31 Created by Cisco Assistant","modifiedBy":"service/chatgpt.policy-api/key/1","createdAt":"2024-03-28T18:17:36","ruleAction":"allow"}],"$$ref":"#/components/schemas/RulesResponse"},"example":[{"organizationId":8094936,"rulesetId":145609,"ruleIsDefault":false,"modifiedAt":"2024-04-01T19:42:38","rulePriority":9,"ruleId":591710,"ruleIsEnabled":false,"ruleDescription":"Rule Created by Policy Assistant","ruleName":"Rule 31 Created by Cisco Assistant","modifiedBy":"service/chatgpt.policy-api/key/1","createdAt":"2024-03-28T18:17:36","ruleAction":"allow"}]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message explaining the reason for failure.","example":"The organization ID is a numeric value."},"requestId":{"type":"string","description":"The ID of the request.","example":"7d318524-d5a4-4fd8-8b29-ad295b2f035b"}}}}},"headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"$$ref":"#/components/responses/400Error"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message explaining the reason for failure.","example":"Authorization token is invalid."},"requestId":{"type":"string","description":"The ID of the request.","example":"7d318524-d5a4-4fd8-8b29-ad295b2f035b"}}}}},"headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"$$ref":"#/components/responses/401Error"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message explaining the reason for failure.","example":"Not Authorized"},"requestId":{"type":"string","description":"The ID of the request.","example":"7d318524-d5a4-4fd8-8b29-ad295b2f035b"}}}}},"headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"$$ref":"#/components/responses/403Error"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message explaining the reason for failure.","example":"Not Found"},"requestId":{"type":"string","description":"The ID of the request.","example":"7d318524-d5a4-4fd8-8b29-ad295b2f035b"}}}}},"headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"$$ref":"#/components/responses/404Error"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message explaining the reason for failure.","example":"Internal Server Error"},"requestId":{"type":"string","description":"The ID of the request.","example":"7d318524-d5a4-4fd8-8b29-ad295b2f035b"}}}}},"headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"$$ref":"#/components/responses/500Error"}},"__originalOperationId":"putRules","method":"put","path":"/rules"}}