{
  "x-generator": "NSwag v14.6.2.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))",
  "openapi": "3.0.0",
  "info": {
    "title": "Infuse IAM API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.dev.infuse-cloud.io"
    }
  ],
  "paths": {
    "/iam/roles/{roleId}/clone": {
      "post": {
        "tags": ["Clone", "Iam"],
        "summary": "Clone IAM role",
        "description": "Clones an existing role template into a new role definition.",
        "operationId": "InfusePlatformIamApiEndpointsRolesCloneRoleEndpoint",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "requestBody": {
          "x-name": "CloneRoleRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloneRoleRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/roles": {
      "post": {
        "tags": ["Roles", "Iam"],
        "summary": "Create IAM role",
        "description": "Creates a new role definition template.",
        "operationId": "InfusePlatformIamApiEndpointsRolesCreateRoleEndpoint",
        "requestBody": {
          "x-name": "CreateRoleRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "get": {
        "tags": ["Roles", "Iam"],
        "summary": "List IAM roles",
        "description": "Returns system-defined role templates.",
        "operationId": "InfusePlatformIamApiEndpointsRolesListRolesEndpoint",
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "schema": {
              "nullable": true,
              "allOf": [
                {
                  "$ref": "#/components/schemas/RoleScope"
                }
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "organisationId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "guid",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResponseOfRoleSummaryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/roles/{roleId}": {
      "delete": {
        "tags": ["Roles", "Iam"],
        "summary": "Delete IAM role",
        "description": "Soft deletes a role definition template.",
        "operationId": "InfusePlatformIamApiEndpointsRolesDeleteRoleEndpoint",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "get": {
        "tags": ["Roles", "Iam"],
        "summary": "Get IAM role",
        "description": "Returns the full definition of a role.",
        "operationId": "InfusePlatformIamApiEndpointsRolesGetRoleEndpoint",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "put": {
        "tags": ["Roles", "Iam"],
        "summary": "Update IAM role",
        "description": "Replaces the definition of an existing role.",
        "operationId": "InfusePlatformIamApiEndpointsRolesUpdateRoleEndpoint",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "requestBody": {
          "x-name": "UpdateRoleRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/principals": {
      "post": {
        "tags": ["Principals", "Iam"],
        "summary": "Create principal",
        "description": "Creates a principal for the specified organisation.",
        "operationId": "InfusePlatformIamApiEndpointsPrincipalsCreatePrincipalEndpoint",
        "requestBody": {
          "x-name": "CreatePrincipalRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePrincipalRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrincipalResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "get": {
        "tags": ["Principals", "Iam"],
        "summary": "List principals",
        "description": "Lists principals scoped to an organisation.",
        "operationId": "InfusePlatformIamApiEndpointsPrincipalsListPrincipalsEndpoint",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "organisationId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "guid",
              "nullable": true
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "nullable": true,
              "allOf": [
                {
                  "$ref": "#/components/schemas/PrincipalType"
                }
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "nullable": true,
              "allOf": [
                {
                  "$ref": "#/components/schemas/PrincipalStatus"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResponseOfPrincipalSummaryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/principals/{principalId}": {
      "delete": {
        "tags": ["Principals", "Iam"],
        "summary": "Delete principal",
        "description": "Soft deletes a principal.",
        "operationId": "InfusePlatformIamApiEndpointsPrincipalsDeletePrincipalEndpoint",
        "parameters": [
          {
            "name": "principalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "get": {
        "tags": ["Principals", "Iam"],
        "summary": "Get principal",
        "description": "Returns a principal with metadata.",
        "operationId": "InfusePlatformIamApiEndpointsPrincipalsGetPrincipalEndpoint",
        "parameters": [
          {
            "name": "principalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrincipalResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "put": {
        "tags": ["Principals", "Iam"],
        "summary": "Update principal",
        "description": "Updates principal metadata and status.",
        "operationId": "InfusePlatformIamApiEndpointsPrincipalsUpdatePrincipalEndpoint",
        "parameters": [
          {
            "name": "principalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "requestBody": {
          "x-name": "UpdatePrincipalRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePrincipalRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrincipalResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/auth/token": {
      "post": {
        "tags": ["Token", "Iam"],
        "summary": "Exchange API key for machine token",
        "description": "Validates IAM API key credentials and returns a short-lived bearer token.",
        "operationId": "InfusePlatformIamApiEndpointsPrincipalsExchangeApiKeyTokenEndpoint",
        "requestBody": {
          "x-name": "ExchangeApiKeyTokenRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExchangeApiKeyTokenRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExchangeApiKeyTokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/iam/principals/{principalId}/api-keys": {
      "post": {
        "tags": ["API Keys", "Iam"],
        "summary": "Issue principal API key",
        "description": "Creates an API key credential for an API-key principal.",
        "operationId": "InfusePlatformIamApiEndpointsPrincipalsIssuePrincipalApiKeyEndpoint",
        "parameters": [
          {
            "name": "principalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "requestBody": {
          "x-name": "IssuePrincipalApiKeyRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssuePrincipalApiKeyRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssuedApiKeyCredentialResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/principals/{principalId}/api-keys/{credentialId}": {
      "delete": {
        "tags": ["API Keys", "Iam"],
        "summary": "Revoke principal API key",
        "description": "Removes an API key credential from an API-key principal.",
        "operationId": "InfusePlatformIamApiEndpointsPrincipalsRevokePrincipalApiKeyEndpoint",
        "parameters": [
          {
            "name": "principalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "credentialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/principals/{principalId}/service-account-secrets/{secretId}": {
      "delete": {
        "tags": ["Service Account Secrets", "Iam"],
        "summary": "Revoke service account secret",
        "description": "Removes a secret from a service-account principal.",
        "operationId": "InfusePlatformIamApiEndpointsPrincipalsRevokeServiceAccountSecretEndpoint",
        "parameters": [
          {
            "name": "principalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "secretId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/principals/{principalId}/service-account-secrets/rotate": {
      "post": {
        "tags": ["Service Account Secrets", "Iam"],
        "summary": "Rotate service account secret",
        "description": "Creates a new secret for a service-account principal and optionally revokes a previous secret.",
        "operationId": "InfusePlatformIamApiEndpointsPrincipalsRotateServiceAccountSecretEndpoint",
        "parameters": [
          {
            "name": "principalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "requestBody": {
          "x-name": "RotateServiceAccountSecretRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RotateServiceAccountSecretRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccountSecretResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/groups": {
      "post": {
        "tags": ["Groups", "Iam"],
        "summary": "Create IAM group",
        "description": "Creates a new IAM group.",
        "operationId": "InfusePlatformIamApiEndpointsGroupsCreateGroupEndpoint",
        "requestBody": {
          "x-name": "CreateGroupRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGroupRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "get": {
        "tags": ["Groups", "Iam"],
        "summary": "List IAM groups",
        "description": "Lists IAM groups for the current or specified organisation.",
        "operationId": "InfusePlatformIamApiEndpointsGroupsListGroupsEndpoint",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "organisationId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "guid",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResponseOfGroupSummaryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/groups/{groupId}": {
      "delete": {
        "tags": ["Groups", "Iam"],
        "summary": "Delete IAM group",
        "description": "Soft deletes an IAM group.",
        "operationId": "InfusePlatformIamApiEndpointsGroupsDeleteGroupEndpoint",
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "get": {
        "tags": ["Groups", "Iam"],
        "summary": "Get IAM group",
        "description": "Returns a group with membership details.",
        "operationId": "InfusePlatformIamApiEndpointsGroupsGetGroupEndpoint",
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "put": {
        "tags": ["Groups", "Iam"],
        "summary": "Update IAM group",
        "description": "Updates IAM group metadata and membership.",
        "operationId": "InfusePlatformIamApiEndpointsGroupsUpdateGroupEndpoint",
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "requestBody": {
          "x-name": "UpdateGroupRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGroupRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/authorizations/decide:batch": {
      "post": {
        "tags": ["Decide:Batch", "Iam"],
        "summary": "IAM authorization decision (batch)",
        "description": "Evaluates IAM authorization decisions in batch for IoT control-plane clients.",
        "operationId": "InfusePlatformIamApiEndpointsControlPlaneDecideAuthorizationBatchEndpoint",
        "requestBody": {
          "x-name": "DecideAuthorizationBatchRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecideAuthorizationBatchRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DecideAuthorizationResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/authorizations/decide": {
      "post": {
        "tags": ["Decide", "Iam"],
        "summary": "IAM authorization decision",
        "description": "Evaluates a single IAM authorization decision for IoT control-plane clients.",
        "operationId": "InfusePlatformIamApiEndpointsControlPlaneDecideAuthorizationEndpoint",
        "requestBody": {
          "x-name": "DecideAuthorizationRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecideAuthorizationRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecideAuthorizationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/entitlements/effective": {
      "get": {
        "tags": ["Effective", "Iam"],
        "summary": "List effective entitlements",
        "description": "Returns normalized effective entitlements and a deterministic hash for IoT control-plane clients.",
        "operationId": "InfusePlatformIamApiEndpointsControlPlaneGetEffectiveEntitlementsEndpoint",
        "parameters": [
          {
            "name": "principalId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "organisationId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EffectiveEntitlementsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/revocations/feed": {
      "get": {
        "tags": ["Feed", "Iam"],
        "summary": "Get revocation feed",
        "description": "Returns incremental revocation events from a monotonic cursor.",
        "operationId": "InfusePlatformIamApiEndpointsControlPlaneGetRevocationFeedEndpoint",
        "parameters": [
          {
            "name": "deploymentId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "afterCursor",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevocationFeedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/snapshots/{snapshotId}": {
      "get": {
        "tags": ["Snapshots", "Iam"],
        "summary": "Get snapshot bundle",
        "description": "Returns a signed snapshot bundle for disconnected IoT policy enforcement.",
        "operationId": "InfusePlatformIamApiEndpointsControlPlaneGetSnapshotBundleEndpoint",
        "parameters": [
          {
            "name": "snapshotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "deploymentId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotBundleResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/snapshots/manifest": {
      "get": {
        "tags": ["Manifest", "Iam"],
        "summary": "Get latest snapshot manifest",
        "description": "Returns the latest policy snapshot manifest for a deployment.",
        "operationId": "InfusePlatformIamApiEndpointsControlPlaneGetSnapshotManifestEndpoint",
        "parameters": [
          {
            "name": "deploymentId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotManifestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/permissions": {
      "get": {
        "tags": ["Permissions", "Iam"],
        "summary": "List IAM permissions",
        "description": "Returns the permission catalogue with filtering and pagination support.",
        "operationId": "InfusePlatformIamApiEndpointsCatalogueGetPermissionCatalogueEndpoint",
        "parameters": [
          {
            "name": "module",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "namespace",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "feature",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "isPreview",
            "in": "query",
            "schema": {
              "type": "boolean",
              "nullable": true
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResponseOfPermissionCatalogueItem"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/resource-types": {
      "get": {
        "tags": ["Resource Types", "Iam"],
        "summary": "List IAM resource types",
        "description": "Returns all resource types that can be used for scoped assignments.",
        "operationId": "InfusePlatformIamApiEndpointsCatalogueGetResourceTypeCatalogueEndpoint",
        "parameters": [
          {
            "name": "module",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "supportsOrganisationScope",
            "in": "query",
            "schema": {
              "type": "boolean",
              "nullable": true
            }
          },
          {
            "name": "supportsHierarchicalScopes",
            "in": "query",
            "schema": {
              "type": "boolean",
              "nullable": true
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResponseOfResourceTypeCatalogueItem"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/assignments/role/batch": {
      "post": {
        "tags": ["Role", "Iam"],
        "summary": "Batch assign role",
        "description": "Assigns a role to multiple principals and/or groups in a single request.",
        "operationId": "InfusePlatformIamApiEndpointsAssignmentsCreateBatchRoleAssignmentEndpoint",
        "requestBody": {
          "x-name": "CreateBatchRoleAssignmentRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBatchRoleAssignmentRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoleAssignmentResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/assignments/direct": {
      "post": {
        "tags": ["Direct", "Iam"],
        "summary": "Grant direct permission",
        "description": "Issues a direct permission grant to a principal.",
        "operationId": "InfusePlatformIamApiEndpointsAssignmentsCreateDirectGrantEndpoint",
        "requestBody": {
          "x-name": "CreateDirectGrantRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDirectGrantRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DirectGrantResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "get": {
        "tags": ["Direct", "Iam"],
        "summary": "List direct grants",
        "description": "Lists direct permission grants for a principal in an organisation.",
        "operationId": "InfusePlatformIamApiEndpointsAssignmentsListDirectGrantsEndpoint",
        "parameters": [
          {
            "name": "organisationId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "principalId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DirectGrantResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/assignments/role": {
      "post": {
        "tags": ["Role", "Iam"],
        "summary": "Assign roles to principals or groups",
        "description": "Creates role assignments for principals or group memberships.",
        "operationId": "InfusePlatformIamApiEndpointsAssignmentsCreateRoleAssignmentEndpoint",
        "requestBody": {
          "x-name": "CreateRoleAssignmentRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleAssignmentRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoleAssignmentResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "get": {
        "tags": ["Role", "Iam"],
        "summary": "List role assignments",
        "description": "Lists role assignments scoped to an organisation, optionally filtered by principal or role.",
        "operationId": "InfusePlatformIamApiEndpointsAssignmentsListRoleAssignmentsEndpoint",
        "parameters": [
          {
            "name": "organisationId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "principalId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "guid",
              "nullable": true
            }
          },
          {
            "name": "roleId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "guid",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoleAssignmentResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/assignments/direct/{grantId}": {
      "delete": {
        "tags": ["Direct", "Iam"],
        "summary": "Revoke direct permission",
        "description": "Deletes a direct permission grant.",
        "operationId": "InfusePlatformIamApiEndpointsAssignmentsDeleteDirectGrantEndpoint",
        "parameters": [
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/iam/assignments/role/{assignmentId}": {
      "delete": {
        "tags": ["Role", "Iam"],
        "summary": "Revoke role assignment",
        "description": "Deletes a role assignment by identifier.",
        "operationId": "InfusePlatformIamApiEndpointsAssignmentsDeleteRoleAssignmentEndpoint",
        "parameters": [
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "RoleResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid"
          },
          "name": {
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/RoleScope"
          },
          "organisationId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "principalTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PrincipalType"
            }
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RolePermissionResponse"
            }
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoleConditionResponse"
            }
          }
        }
      },
      "RoleScope": {
        "type": "string",
        "description": "",
        "x-enumNames": ["System", "Organisation"],
        "enum": ["system", "organisation"]
      },
      "PrincipalType": {
        "type": "string",
        "description": "",
        "x-enumNames": ["User", "ApiKey", "ServiceAccount"],
        "enum": ["user", "apiKey", "serviceAccount"]
      },
      "RolePermissionResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "permissionId": {
            "type": "string",
            "format": "guid"
          },
          "resource": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/RoleResourceTemplateResponse"
              }
            ]
          }
        }
      },
      "RoleResourceTemplateResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "resourceTypeId": {
            "type": "string",
            "format": "guid"
          },
          "expression": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "RoleConditionResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string"
          },
          "operand": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ProblemDetails": {
        "type": "object",
        "additionalProperties": {
          "nullable": true
        },
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "CloneRoleRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": ["name"],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 150,
            "minLength": 0,
            "nullable": false
          },
          "scope": {
            "$ref": "#/components/schemas/RoleScope"
          },
          "description": {
            "type": "string",
            "maxLength": 400,
            "minLength": 0,
            "nullable": true
          },
          "organisationId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          }
        }
      },
      "ProblemDetails2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "default": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1"
          },
          "title": {
            "type": "string",
            "default": "One or more validation errors occurred."
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "default": 400
          },
          "instance": {
            "type": "string",
            "default": "/api/route"
          },
          "traceId": {
            "type": "string",
            "default": "0HMPNHL0JHL76:00000001"
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemDetails_Error"
            }
          }
        }
      },
      "ProblemDetails_Error": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "default": "Error or field name"
          },
          "reason": {
            "type": "string",
            "default": "Error reason"
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "severity": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "CreateRoleRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RoleUpsertRequest"
          },
          {
            "type": "object",
            "additionalProperties": false
          }
        ]
      },
      "RoleUpsertRequest": {
        "type": "object",
        "x-abstract": true,
        "additionalProperties": false,
        "required": ["name", "permissions"],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 150,
            "minLength": 0,
            "nullable": false
          },
          "scope": {
            "$ref": "#/components/schemas/RoleScope"
          },
          "description": {
            "type": "string",
            "maxLength": 400,
            "minLength": 0,
            "nullable": true
          },
          "organisationId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "permissions": {
            "type": "array",
            "nullable": false,
            "items": {
              "$ref": "#/components/schemas/RolePermissionInput"
            }
          },
          "principalTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PrincipalType"
            }
          },
          "conditions": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/RoleConditionInput"
            }
          }
        }
      },
      "RolePermissionInput": {
        "type": "object",
        "additionalProperties": false,
        "required": ["permissionId"],
        "properties": {
          "permissionId": {
            "type": "string",
            "format": "guid",
            "minLength": 1,
            "nullable": false
          },
          "resourceTypeId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "resourceExpression": {
            "type": "string",
            "maxLength": 200,
            "minLength": 0,
            "nullable": true
          }
        }
      },
      "RoleConditionInput": {
        "type": "object",
        "additionalProperties": false,
        "required": ["type"],
        "properties": {
          "type": {
            "type": "string",
            "maxLength": 100,
            "minLength": 0,
            "nullable": false
          },
          "operand": {
            "type": "string",
            "maxLength": 100,
            "minLength": 0,
            "nullable": true
          },
          "value": {
            "type": "string",
            "maxLength": 400,
            "minLength": 0,
            "nullable": true
          }
        }
      },
      "DeleteRoleRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "GetRoleRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "PagedResponseOfRoleSummaryResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "hasPreviousPage": {
            "type": "boolean"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoleSummaryResponse"
            }
          }
        }
      },
      "RoleSummaryResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid"
          },
          "name": {
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/RoleScope"
          },
          "organisationId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "permissionCount": {
            "type": "integer",
            "format": "int32"
          },
          "principalTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PrincipalType"
            }
          }
        }
      },
      "ListRolesRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "UpdateRoleRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RoleUpsertRequest"
          },
          {
            "type": "object",
            "additionalProperties": false
          }
        ]
      },
      "PrincipalResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid"
          },
          "type": {
            "$ref": "#/components/schemas/PrincipalType"
          },
          "status": {
            "$ref": "#/components/schemas/PrincipalStatus"
          },
          "organisationId": {
            "type": "string",
            "format": "guid"
          },
          "displayName": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "apiKeys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiKeyCredentialResponse"
            }
          },
          "serviceAccountSecrets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceAccountSecretResponse"
            }
          }
        }
      },
      "PrincipalStatus": {
        "type": "string",
        "description": "",
        "x-enumNames": ["Active", "Suspended", "Revoked"],
        "enum": ["active", "suspended", "revoked"]
      },
      "ApiKeyCredentialResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid"
          },
          "name": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "ServiceAccountSecretResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid"
          },
          "name": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "CreatePrincipalRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PrincipalUpsertRequest"
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "principalId": {
                "type": "string",
                "format": "guid",
                "nullable": true
              },
              "organisationId": {
                "type": "string",
                "format": "guid",
                "nullable": true
              },
              "type": {
                "$ref": "#/components/schemas/PrincipalType"
              }
            }
          }
        ]
      },
      "PrincipalUpsertRequest": {
        "type": "object",
        "x-abstract": true,
        "additionalProperties": false,
        "properties": {
          "displayName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/PrincipalStatus"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "ExchangeApiKeyTokenResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "accessToken": {
            "type": "string"
          },
          "tokenType": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ExchangeApiKeyTokenRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "apiKey": {
            "type": "string"
          }
        }
      },
      "GetPrincipalRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "IssuedApiKeyCredentialResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid"
          },
          "name": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "keySecret": {
            "type": "string"
          },
          "apiKey": {
            "type": "string"
          }
        }
      },
      "IssuePrincipalApiKeyRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "PagedResponseOfPrincipalSummaryResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "hasPreviousPage": {
            "type": "boolean"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PrincipalSummaryResponse"
            }
          }
        }
      },
      "PrincipalSummaryResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid"
          },
          "type": {
            "$ref": "#/components/schemas/PrincipalType"
          },
          "status": {
            "$ref": "#/components/schemas/PrincipalStatus"
          },
          "organisationId": {
            "type": "string",
            "format": "guid"
          },
          "displayName": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "ListPrincipalsRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "RotateServiceAccountSecretRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "revokeSecretId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          }
        }
      },
      "UpdatePrincipalRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PrincipalUpsertRequest"
          },
          {
            "type": "object",
            "additionalProperties": false
          }
        ]
      },
      "GroupResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid"
          },
          "name": {
            "type": "string"
          },
          "organisationId": {
            "type": "string",
            "format": "guid"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "principalIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "guid"
            }
          }
        }
      },
      "CreateGroupRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GroupUpsertRequest"
          },
          {
            "type": "object",
            "additionalProperties": false
          }
        ]
      },
      "GroupUpsertRequest": {
        "type": "object",
        "x-abstract": true,
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "organisationId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "principalIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "guid"
            }
          }
        }
      },
      "DeleteGroupRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "GetGroupRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "PagedResponseOfGroupSummaryResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "hasPreviousPage": {
            "type": "boolean"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupSummaryResponse"
            }
          }
        }
      },
      "GroupSummaryResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid"
          },
          "name": {
            "type": "string"
          },
          "organisationId": {
            "type": "string",
            "format": "guid"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "memberCount": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ListGroupsRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "UpdateGroupRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GroupUpsertRequest"
          },
          {
            "type": "object",
            "additionalProperties": false
          }
        ]
      },
      "DecideAuthorizationResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "allow": {
            "type": "boolean"
          },
          "decisionId": {
            "type": "string",
            "format": "guid"
          },
          "policyVersion": {
            "type": "integer",
            "format": "int64"
          },
          "reasonCodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ttlSeconds": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "DecideAuthorizationBatchRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": ["items"],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DecideAuthorizationRequest"
            }
          }
        }
      },
      "DecideAuthorizationRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": ["principalId", "organisationId", "subjectType", "action"],
        "properties": {
          "principalId": {
            "type": "string",
            "format": "guid",
            "minLength": 1,
            "nullable": false
          },
          "organisationId": {
            "type": "string",
            "format": "guid",
            "minLength": 1,
            "nullable": false
          },
          "subjectType": {
            "type": "string",
            "minLength": 1,
            "nullable": false
          },
          "action": {
            "type": "string",
            "minLength": 1,
            "nullable": false
          },
          "resource": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/DecideResourceRequest"
              }
            ]
          },
          "environment": {
            "type": "object",
            "nullable": true,
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "DecideResourceRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": ["type", "id"],
        "properties": {
          "type": {
            "type": "string",
            "minLength": 1,
            "nullable": false
          },
          "id": {
            "type": "string",
            "format": "guid",
            "minLength": 1,
            "nullable": false
          }
        }
      },
      "EffectiveEntitlementsResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "principalId": {
            "type": "string",
            "format": "guid"
          },
          "organisationId": {
            "type": "string",
            "format": "guid"
          },
          "policyVersion": {
            "type": "integer",
            "format": "int64"
          },
          "entitlementsHash": {
            "type": "string"
          },
          "entitlements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EffectiveEntitlement"
            }
          }
        }
      },
      "EffectiveEntitlement": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "permission": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "sourceId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "resourceType": {
            "type": "string",
            "nullable": true
          },
          "resourceId": {
            "type": "string",
            "nullable": true
          },
          "startsAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "EffectiveEntitlementsRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "RevocationFeedResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RevocationFeedItem"
            }
          },
          "nextCursor": {
            "type": "integer",
            "format": "int64"
          },
          "hasMore": {
            "type": "boolean"
          },
          "policyVersion": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "RevocationFeedItem": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "cursor": {
            "type": "integer",
            "format": "int64"
          },
          "eventType": {
            "type": "string"
          },
          "principalId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "credentialId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "assignmentId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "directGrantId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "policyVersion": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "RevocationFeedRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "SnapshotBundleResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "snapshotId": {
            "type": "string",
            "format": "guid"
          },
          "policyVersion": {
            "type": "integer",
            "format": "int64"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "checksum": {
            "type": "string"
          },
          "kid": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          },
          "compression": {
            "type": "string"
          },
          "payloadBase64": {
            "type": "string"
          },
          "revocationWatermark": {
            "type": "integer",
            "format": "int64"
          },
          "schemaVersion": {
            "type": "string"
          }
        }
      },
      "GetSnapshotBundleRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "SnapshotManifestResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "snapshotId": {
            "type": "string",
            "format": "guid"
          },
          "policyVersion": {
            "type": "integer",
            "format": "int64"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "checksum": {
            "type": "string"
          },
          "kid": {
            "type": "string"
          }
        }
      },
      "SnapshotManifestRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "PagedResponseOfPermissionCatalogueItem": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "hasPreviousPage": {
            "type": "boolean"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PermissionCatalogueItem"
            }
          }
        }
      },
      "PermissionCatalogueItem": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid"
          },
          "identifier": {
            "type": "string"
          },
          "module": {
            "type": "string"
          },
          "feature": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "isPreview": {
            "type": "boolean"
          }
        }
      },
      "GetPermissionCatalogueRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "PagedResponseOfResourceTypeCatalogueItem": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "hasPreviousPage": {
            "type": "boolean"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceTypeCatalogueItem"
            }
          }
        }
      },
      "ResourceTypeCatalogueItem": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "guid"
          },
          "identifier": {
            "type": "string"
          },
          "module": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "supportsOrganisationScope": {
            "type": "boolean"
          },
          "supportsHierarchicalScopes": {
            "type": "boolean"
          }
        }
      },
      "GetResourceTypeCatalogueRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "RoleAssignmentResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "assignmentId": {
            "type": "string",
            "format": "guid"
          },
          "principalId": {
            "type": "string",
            "format": "guid"
          },
          "roleId": {
            "type": "string",
            "format": "guid"
          },
          "organisationId": {
            "type": "string",
            "format": "guid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "resourceTypeId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "resourceId": {
            "type": "string",
            "nullable": true
          },
          "resourcePath": {
            "type": "string",
            "nullable": true
          },
          "startsAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "issuedBy": {
            "type": "string"
          },
          "sourceSystem": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "CreateBatchRoleAssignmentRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "organisationId": {
            "type": "string",
            "format": "guid"
          },
          "roleId": {
            "type": "string",
            "format": "guid"
          },
          "principalIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "guid"
            }
          },
          "groupIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "guid"
            }
          },
          "resourceTypeId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "resourceId": {
            "type": "string",
            "nullable": true
          },
          "resourcePath": {
            "type": "string",
            "nullable": true
          },
          "startsAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "sourceSystem": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "DirectGrantResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "grantId": {
            "type": "string",
            "format": "guid"
          },
          "principalId": {
            "type": "string",
            "format": "guid"
          },
          "permissionId": {
            "type": "string",
            "format": "guid"
          },
          "organisationId": {
            "type": "string",
            "format": "guid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "resourceTypeId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "resourceId": {
            "type": "string",
            "nullable": true
          },
          "resourcePath": {
            "type": "string",
            "nullable": true
          },
          "startsAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "issuedBy": {
            "type": "string"
          },
          "sourceSystem": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "CreateDirectGrantRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "organisationId": {
            "type": "string",
            "format": "guid"
          },
          "permissionId": {
            "type": "string",
            "format": "guid"
          },
          "principalId": {
            "type": "string",
            "format": "guid"
          },
          "resourceTypeId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "resourceId": {
            "type": "string",
            "nullable": true
          },
          "resourcePath": {
            "type": "string",
            "nullable": true
          },
          "startsAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "sourceSystem": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "CreateRoleAssignmentRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "organisationId": {
            "type": "string",
            "format": "guid"
          },
          "roleId": {
            "type": "string",
            "format": "guid"
          },
          "principalId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "groupId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "resourceTypeId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "resourceId": {
            "type": "string",
            "nullable": true
          },
          "resourcePath": {
            "type": "string",
            "nullable": true
          },
          "startsAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "sourceSystem": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "DeleteDirectGrantRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "DeleteRoleAssignmentRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "ListDirectGrantsRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "ListRoleAssignmentsRequest": {
        "type": "object",
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "Authorization: Bearer <access_token>",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "DirectApiKey": {
        "type": "apiKey",
        "description": "Authorization: ApiKey ik_<keyId>.<keySecret>",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "x-tagGroups": [
    {
      "name": "Roles",
      "tags": ["Clone", "Roles"]
    },
    {
      "name": "Principals",
      "tags": ["API Keys", "Principals", "Service Account Secrets"]
    },
    {
      "name": "Auth",
      "tags": ["Token"]
    },
    {
      "name": "Groups",
      "tags": ["Groups"]
    },
    {
      "name": "Authorizations",
      "tags": ["Decide", "Decide:Batch"]
    },
    {
      "name": "Entitlements",
      "tags": ["Effective"]
    },
    {
      "name": "Revocations",
      "tags": ["Feed"]
    },
    {
      "name": "Snapshots",
      "tags": ["Manifest", "Snapshots"]
    },
    {
      "name": "Permissions",
      "tags": ["Permissions"]
    },
    {
      "name": "Resource Types",
      "tags": ["Resource Types"]
    },
    {
      "name": "Assignments",
      "tags": ["Direct", "Role"]
    }
  ]
}
