{"type":"api","title":"Update Role","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/c92e7384-b2f4-3d3b-8e8e-03a9325b07bb","info":{"title":"Crosswork RBAC API - Version 1","contact":{"name":"Crosswork Team, Cisco","email":"support@cisco.com"},"description":"Crosswork Role-based Access Control APIs","license":{"name":"Cisco Software License Agreement","url":"http://www.cisco.com/public/sw-license-agreement.html"},"version":"1.0.0"},"security":[{"bearerAuth":[]}],"x-parser-conf":{"overview":{"markdownPath":"reference/INFRA/RBAC/rbac-v1-overview.md"}},"swagger":"2.0","basePath":"/crosswork/aaa/v1","schemes":["https"],"securityDefinitions":{"bearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"Use a bearer token to authenticate requests. Include the token in the Authorization header with the prefix 'Bearer '."}}},"spec":{"summary":"Update Role","operationId":"UpdateRole","responses":{"204":{"description":"No Content. The request was successful and there is no additional content in the response body.","schema":{"type":"object","properties":{"rbacEmpty":{"type":"object"}},"$$ref":"#/definitions/rbacEmpty"}},"403":{"description":"Forbidden. The server recognizes the authentication credentials, but the client is not authorized to perform this request."}},"parameters":[{"name":"id","description":"Unique ID of the role being updated","in":"path","required":true,"type":"string"},{"name":"body","description":"Updated specification of the role. See GET /role request for an example payload.","in":"body","required":true,"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique programmatic identifier for the RBAC role."},"org_id":{"type":"string","description":"The unique identifier of the organization to which this role belongs. This allows for multi-tenancy."},"rate":{"type":"number","format":"float","description":"The maximum number of requests allowed within the 'per' time window for this role."},"per":{"type":"number","format":"float","description":"The time window (in seconds) over which the 'rate' limit is applied."},"quota_max":{"type":"string","format":"int64","description":"The maximum number of requests allowed within the 'quota_renewal_rate' period. A value of -1 typically indicates unlimited quota."},"quota_renewal_rate":{"type":"string","format":"int64","description":"The duration (in seconds) after which the 'quota_max' resets."},"access_rights":{"type":"object","additionalProperties":{"type":"object","properties":{"api_name":{"type":"string","description":"A human-readable name or title for the API (e.g., 'Alarms APIs', 'Users and Roles Management APIs')."},"api_id":{"type":"string","description":"The unique programmatic identifier for the API to which these access rights apply."},"versions":{"type":"array","description":"A list of API versions for which these permissions are valid.","items":{"type":"string"}},"allowed_urls":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"A URL pattern to which the access rule applies."},"methods":{"type":"array","description":"A list of HTTP methods (e.g., 'GET', 'POST', 'PUT', 'DELETE', 'PATCH') that are permitted for the specified URL.","items":{"type":"string"}}},"$$ref":"#/definitions/rbacAccessSpec"}}},"$$ref":"#/definitions/rbacAccessDefinition"}},"hmac_enabled":{"type":"boolean","format":"boolean","description":"A boolean flag indicating whether HMAC (Hash-based Message Authentication Code) is enabled for users with this role, enforcing message integrity and authentication."},"active":{"type":"boolean","format":"boolean","description":"A boolean flag indicating if the role is currently active and can be assigned to users. 'true' means active, 'false' means inactive."},"is_inactive":{"type":"boolean","format":"boolean","description":"An alternative boolean flag indicating if the role is currently inactive. This might be redundant with 'active' and should be reviewed for consistency. 'true' means inactive, 'false' means active."},"tags":{"type":"array","description":"A list of arbitrary string tags used for categorization, searching, or grouping of roles.","items":{"type":"string"}},"key_expires_in":{"type":"string","format":"int64","description":"The duration (in seconds) after which API keys issued to users with this role will expire. A value of -1 typically indicates no expiration."},"partitions":{"type":"object","description":"Defines how policies related to quotas, rate limits, or ACLs are partitioned or scoped for this role, potentially based on a specific policy ID.","properties":{"quota":{"type":"boolean","format":"boolean","description":"Indicates whether quota policies are partitioned or scoped for this role."},"rate_limit":{"type":"boolean","format":"boolean","description":"Indicates whether rate limiting policies are partitioned or scoped for this role."},"acl":{"type":"boolean","format":"boolean","description":"Indicates whether Access Control List (ACL) policies are partitioned or scoped for this role."}},"$$ref":"#/definitions/rbacPolicyPartitions"},"last_updated":{"type":"string","description":"The timestamp (in ISO 8601 format) indicating when this role definition was last modified."}},"example":{"id":"adminRole","org_id":"1","rate":1000,"per":60,"quota_max":-1,"quota_renewal_rate":60,"access_rights":{"Alarms":{"api_name":"Alarms APIs","api_id":"Alarms","versions":["Default"],"allowed_urls":[{"url":"/.*","methods":["GET","POST","PUT","PATCH","DELETE"]}],"limit":null,"allowance_scope":""},"aaa_cwaaa":{"api_name":"Users and Roles Management APIs","api_id":"aaa_cwaaa","versions":["Default"],"allowed_urls":[{"url":"/.*","methods":["GET","POST","PUT","PATCH","DELETE"]}],"limit":null,"allowance_scope":""}},"hmac_enabled":false,"active":true,"is_inactive":false,"tags":["admin","updated"],"key_expires_in":"3600","partitions":{"enabled":true,"policy_id":"somePolicyId"},"last_updated":"2025-07-01T12:25:21Z"},"title":"Role represents a collection of security options, such as access rights to APIs, which are deployed on the system.","$$ref":"#/definitions/rbacRole"}}],"tags":["rbac"],"__originalOperationId":"UpdateRole","consumes":["application/json"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"method":"put","path":"/role/{id}"}}