{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cisco-crosswork/json-schema/cisco-crosswork-rbac-role-schema.json",
  "title": "Role represents a collection of security options, such as access rights to APIs, which are deployed on the system.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cisco-crosswork-rbac-api-openapi.yml#/components/schemas/rbacRole",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "org_id": {
      "type": "string"
    },
    "rate": {
      "type": "number",
      "format": "float"
    },
    "per": {
      "type": "number",
      "format": "float"
    },
    "quota_max": {
      "type": "string",
      "format": "int64"
    },
    "quota_renewal_rate": {
      "type": "string",
      "format": "int64"
    },
    "access_rights": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/rbacAccessDefinition"
      }
    },
    "hmac_enabled": {
      "type": "boolean",
      "format": "boolean"
    },
    "active": {
      "type": "boolean",
      "format": "boolean"
    },
    "is_inactive": {
      "type": "boolean",
      "format": "boolean"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "key_expires_in": {
      "type": "string",
      "format": "int64"
    },
    "partitions": {
      "$ref": "#/$defs/rbacPolicyPartitions"
    },
    "last_updated": {
      "type": "string"
    }
  },
  "$defs": {
    "rbacAccessDefinition": {
      "type": "object",
      "properties": {
        "api_name": {
          "type": "string"
        },
        "api_id": {
          "type": "string"
        },
        "versions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "allowed_urls": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/rbacAccessSpec"
          }
        }
      }
    },
    "rbacAccessSpec": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "methods": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "rbacPolicyPartitions": {
      "type": "object",
      "properties": {
        "quota": {
          "type": "boolean",
          "format": "boolean"
        },
        "rate_limit": {
          "type": "boolean",
          "format": "boolean"
        },
        "acl": {
          "type": "boolean",
          "format": "boolean"
        }
      }
    }
  }
}