openapi: 3.0.4
info:
  title: Aritma IAM API
  description: >-
    An API for interacting with the identity and access management system of
    Aritma.
  contact:
    name: Aritma
    url: https://aritma.com/contact
  version: '0'
servers:
  - url: https://api.dev.aritma.io/core/iam
    description: IAM API (0)
paths:
  /v0/actions:
    get:
      tags:
        - Actions
      summary: Returns a list of all available actions.
      operationId: ListActions
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '401':
          description: Unauthorized
  /v0/clients:
    get:
      tags:
        - Client
      summary: >-
        Returns a paginated list of available clients, optionally filtered by a
        query
      parameters:
        - name: searchText
          in: query
          description: Search query
          schema:
            type: string
        - name: page
          in: query
          description: Requested page
          schema:
            type: integer
            format: int32
        - name: pageSize
          in: query
          description: Requested pagesize
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ClientDtoPaginatedResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ClientDtoPaginatedResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ClientDtoPaginatedResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    post:
      tags:
        - Client
      summary: Creates a client
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateClientRequest'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateClientRequest'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateClientRequest'
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/clients/{clientId}:
    get:
      tags:
        - Client
      summary: Returns a client by clientId
      parameters:
        - name: clientId
          in: path
          description: ''
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ClientDetailsDto'
            application/json:
              schema:
                $ref: '#/components/schemas/ClientDetailsDto'
            text/json:
              schema:
                $ref: '#/components/schemas/ClientDetailsDto'
        '400':
          description: Bad Request – Invalid or missing parameters
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    put:
      tags:
        - Client
      summary: Updates a client
      parameters:
        - name: clientId
          in: path
          description: ''
          required: true
          schema:
            type: string
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/UpdateClientRequest'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/UpdateClientRequest'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/UpdateClientRequest'
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request – Invalid or missing parameters
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      tags:
        - Client
      summary: Deletes a client by ID
      parameters:
        - name: clientId
          in: path
          description: ''
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request – Invalid or missing parameters
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/clients/{clientId}/secrets:
    get:
      tags:
        - Client
      summary: Returns a paginated list of client secrets belonging to a client
      parameters:
        - name: clientId
          in: path
          description: ''
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: Requested page
          schema:
            type: integer
            format: int32
        - name: pageSize
          in: query
          description: Requested pagesize
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ClientSecretDtoPaginatedResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ClientSecretDtoPaginatedResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ClientSecretDtoPaginatedResponse'
        '400':
          description: Bad Request – Invalid or missing parameters
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    post:
      tags:
        - Client
      summary: Creates a new secret for a client
      parameters:
        - name: clientId
          in: path
          description: ''
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateClientSecretRequest'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateClientSecretRequest'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateClientSecretRequest'
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request – Invalid or missing parameters
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/clients/{clientId}/secrets/{clientSecretId}:
    delete:
      tags:
        - Client
      summary: Deletes a client secret
      parameters:
        - name: clientId
          in: path
          description: Id of the client
          required: true
          schema:
            type: string
        - name: clientSecretId
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/domains:
    get:
      tags:
        - Domains
      summary: Gets registered domains
      operationId: GetDomains
      parameters:
        - name: filter
          in: query
          description: The string used to filter the request
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DomainDto'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DomainDto'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DomainDto'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    post:
      tags:
        - Domains
      summary: Registers a new domain
      operationId: CreateDomain
      parameters:
        - name: domain
          in: query
          description: The domain
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/DomainDto'
            application/json:
              schema:
                $ref: '#/components/schemas/DomainDto'
            text/json:
              schema:
                $ref: '#/components/schemas/DomainDto'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      tags:
        - Domains
      summary: Deletes a domain
      operationId: DeleteDomain
      parameters:
        - name: domain
          in: query
          description: The domain
          schema:
            type: string
      responses:
        '204':
          description: No Content
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/DomainDto'
            application/json:
              schema:
                $ref: '#/components/schemas/DomainDto'
            text/json:
              schema:
                $ref: '#/components/schemas/DomainDto'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/domains/status:
    get:
      tags:
        - Domains
      summary: Gets status of a specific domain
      operationId: GetDomain
      parameters:
        - name: domain
          in: query
          description: The domain
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/DomainDto'
            application/json:
              schema:
                $ref: '#/components/schemas/DomainDto'
            text/json:
              schema:
                $ref: '#/components/schemas/DomainDto'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/me:
    get:
      tags:
        - Me
      summary: Gets information about the user
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/UserDto'
            application/json:
              schema:
                $ref: '#/components/schemas/UserDto'
            text/json:
              schema:
                $ref: '#/components/schemas/UserDto'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/me/claims:
    get:
      tags:
        - Me
      summary: Returns an unpaginated list of all claims assigned to you
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StringUserClaimApiDto'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StringUserClaimApiDto'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StringUserClaimApiDto'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/me/permissions:
    get:
      tags:
        - Me
      summary: Gets permission for currently authenticated user
      operationId: GetOwnPermissions
      parameters:
        - name: resourceType
          in: query
          schema:
            type: string
        - name: resourceProvider
          in: query
          schema:
            type: string
        - name: action
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubjectPermissionsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
  /v0/me/roles:
    get:
      tags:
        - Me
      summary: Returns an unpaginated list of all roles assigned to you
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleApiDto'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleApiDto'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleApiDto'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/policies:
    post:
      tags:
        - Policies
      summary: Creates a new policy
      operationId: CreatePolicy
      requestBody:
        description: The policy request
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PolicyRequest'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PolicyRequest'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PolicyRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      tags:
        - Policies
      summary: Deletes a policy
      operationId: RemovePolicy
      requestBody:
        description: The policy request
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PolicyRequest'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PolicyRequest'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PolicyRequest'
      responses:
        '204':
          description: No Content
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    get:
      tags:
        - Policies
      summary: Finds policies that matches a request filter
      description: Requires the requesting party to have read access on the requested scope
      operationId: FindPolicies
      parameters:
        - name: pageSize
          in: query
          schema:
            type: integer
            format: int32
        - name: cursor
          in: query
          schema:
            type: string
        - name: includeDerived
          in: query
          schema:
            type: boolean
        - name: includeInherited
          in: query
          schema:
            type: boolean
        - name: subject
          in: query
          schema:
            type: string
        - name: scope
          in: query
          schema:
            type: string
            format: uri
        - name: action
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FindPoliciesResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
  /v0/role:
    get:
      tags:
        - Role
      summary: >-
        Returns a paginated list of available roles that can be assigned to
        users, optionally filtered by a query
      parameters:
        - name: searchText
          in: query
          description: Search query
          schema:
            type: string
        - name: page
          in: query
          description: Requested page
          schema:
            type: integer
            format: int32
        - name: pageSize
          in: query
          description: Requested pagesize
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/RoleApiDtoPaginatedResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/RoleApiDtoPaginatedResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/RoleApiDtoPaginatedResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/scim:
    post:
      tags:
        - Scim
      summary: Creates a SCIM token, must be connected to an SSO Provider
      description: >-
        The SCIM token secret will only be showed in the response of this
        endpoint, it will never be shown again, so be sure to copy it.
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateScimTokenRequest'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateScimTokenRequest'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateScimTokenRequest'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CreateScimTokenResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/CreateScimTokenResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/CreateScimTokenResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    get:
      tags:
        - Scim
      summary: Lists all registered SCIM tokens
      parameters:
        - name: query
          in: query
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            format: int32
        - name: pageSize
          in: query
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ListScimTokenResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ListScimTokenResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ListScimTokenResponse'
  /v0/scim/{id}:
    delete:
      tags:
        - Scim
      summary: Deletes a SCIM token by id
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request – Invalid or missing parameters
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/scopes:
    get:
      tags:
        - Scope
      summary: >-
        Returns a paginated list of available scopes that can be assigned to
        clients, optionally filtered by a query
      parameters:
        - name: searchText
          in: query
          description: Search query
          schema:
            type: string
        - name: page
          in: query
          description: Requested page
          schema:
            type: integer
            format: int32
        - name: pageSize
          in: query
          description: Requested pagesize
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ScopeDtoPaginatedResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ScopeDtoPaginatedResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ScopeDtoPaginatedResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/sso:
    get:
      tags:
        - SSO
      summary: Lists registered SSO providers
      parameters:
        - name: query
          in: query
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            format: int32
        - name: pageSize
          in: query
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ListSsoProvidersResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ListSsoProvidersResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ListSsoProvidersResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/sso/azuread:
    post:
      tags:
        - SSO - Azure AD (Entra ID)
      summary: Creates a new SSO provider
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/AzureAdPropertiesCreateSsoProviderRequest
          text/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/AzureAdPropertiesCreateSsoProviderRequest
          application/*+json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/AzureAdPropertiesCreateSsoProviderRequest
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NavigationLink'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NavigationLink'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NavigationLink'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/sso/azuread/{id}:
    get:
      tags:
        - SSO - Azure AD (Entra ID)
      summary: Gets an SSO provider by id
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: >-
                  #/components/schemas/AzureAdPropertiesGetIdentityProviderResponse
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/AzureAdPropertiesGetIdentityProviderResponse
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/AzureAdPropertiesGetIdentityProviderResponse
        '400':
          description: Bad Request – Invalid or missing parameters
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    put:
      tags:
        - SSO - Azure AD (Entra ID)
      summary: Updates an SSO provider
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/AzureAdPropertiesUpdateIdentityProviderDto
          text/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/AzureAdPropertiesUpdateIdentityProviderDto
          application/*+json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/AzureAdPropertiesUpdateIdentityProviderDto
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      tags:
        - SSO - Azure AD (Entra ID)
      summary: Deletes an SSO provider by id
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request – Invalid or missing parameters
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/sso/custom:
    post:
      tags:
        - SSO - Custom Providers
      summary: Creates a new SSO provider
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/CustomPropertiesCreateSsoProviderRequest
          text/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/CustomPropertiesCreateSsoProviderRequest
          application/*+json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/CustomPropertiesCreateSsoProviderRequest
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NavigationLink'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NavigationLink'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NavigationLink'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/sso/custom/{id}:
    delete:
      tags:
        - SSO - Custom Providers
      summary: Deletes an SSO provider by id
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request – Invalid or missing parameters
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    get:
      tags:
        - SSO - Custom Providers
      summary: Gets an SSO provider by id
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: >-
                  #/components/schemas/CustomPropertiesGetIdentityProviderResponse
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CustomPropertiesGetIdentityProviderResponse
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/CustomPropertiesGetIdentityProviderResponse
        '400':
          description: Bad Request – Invalid or missing parameters
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    put:
      tags:
        - SSO - Custom Providers
      summary: Updates an SSO provider
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/CustomPropertiesUpdateIdentityProviderDto
          text/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/CustomPropertiesUpdateIdentityProviderDto
          application/*+json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/CustomPropertiesUpdateIdentityProviderDto
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/sso/custom/{id}/icon:
    put:
      tags:
        - SSO - Custom Providers
      summary: Updates the icon for a custom SSO provider
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
                - icon
              type: object
              properties:
                icon:
                  type: string
                  description: The icon to add to the custom SSO provider.
                  format: binary
            encoding:
              icon:
                style: form
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request – Invalid or missing parameters
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      tags:
        - SSO - Custom Providers
      summary: Removes an icon from a custom identityProvider
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request – Invalid or missing parameters
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/sso/google:
    post:
      tags:
        - SSO - Google
      summary: Creates a new SSO provider
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/GooglePropertiesCreateSsoProviderRequest
          text/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/GooglePropertiesCreateSsoProviderRequest
          application/*+json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/GooglePropertiesCreateSsoProviderRequest
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NavigationLink'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NavigationLink'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NavigationLink'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/sso/google/{id}:
    get:
      tags:
        - SSO - Google
      summary: Gets an SSO provider by id
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: >-
                  #/components/schemas/GooglePropertiesGetIdentityProviderResponse
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GooglePropertiesGetIdentityProviderResponse
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/GooglePropertiesGetIdentityProviderResponse
        '400':
          description: Bad Request – Invalid or missing parameters
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    put:
      tags:
        - SSO - Google
      summary: Updates an SSO provider
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/GooglePropertiesUpdateIdentityProviderDto
          text/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/GooglePropertiesUpdateIdentityProviderDto
          application/*+json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/GooglePropertiesUpdateIdentityProviderDto
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      tags:
        - SSO - Google
      summary: Deletes an SSO provider by id
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request – Invalid or missing parameters
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/sso/signicat:
    post:
      tags:
        - SSO - Signicat
      summary: Creates a new SSO provider
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/SignicatPropertiesCreateSsoProviderRequest
          text/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/SignicatPropertiesCreateSsoProviderRequest
          application/*+json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/SignicatPropertiesCreateSsoProviderRequest
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NavigationLink'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NavigationLink'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NavigationLink'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/sso/signicat/{id}:
    get:
      tags:
        - SSO - Signicat
      summary: Gets an SSO provider by id
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: >-
                  #/components/schemas/SignicatPropertiesGetIdentityProviderResponse
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/SignicatPropertiesGetIdentityProviderResponse
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/SignicatPropertiesGetIdentityProviderResponse
        '400':
          description: Bad Request – Invalid or missing parameters
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    put:
      tags:
        - SSO - Signicat
      summary: Updates an SSO provider
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/SignicatPropertiesUpdateIdentityProviderDto
          text/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/SignicatPropertiesUpdateIdentityProviderDto
          application/*+json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/SignicatPropertiesUpdateIdentityProviderDto
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      tags:
        - SSO - Signicat
      summary: Deletes an SSO provider by id
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request – Invalid or missing parameters
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/subjects:
    get:
      tags:
        - Subjects
      summary: Gets subjects of all types
      operationId: GetSubjects
      parameters:
        - name: searchQuery
          in: query
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            format: int32
        - name: pageSize
          in: query
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubjectDtoPaginatedIamResponse'
        '401':
          description: Unauthorized
  /v0/subjects/{subject}/memberships:
    get:
      tags:
        - Subjects
      summary: List the groups of which a subject is a member of
      operationId: GetSubjectMemberships
      parameters:
        - name: subject
          in: path
          description: ''
          required: true
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            format: int32
        - name: pageSize
          in: query
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubjectGroupDtoPaginatedIamResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
  /v0/subjects/{subject}/permissions:
    get:
      tags:
        - Subjects
      summary: Gets the permissions of a subject
      description: >-
        The requesting party must have read access for a given scope to return
        it
      operationId: GetSubjectPermissions
      parameters:
        - name: subject
          in: path
          description: The subject id
          required: true
          schema:
            type: string
        - name: resourceType
          in: query
          schema:
            type: string
        - name: resourceProvider
          in: query
          schema:
            type: string
        - name: action
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubjectPermissionsResponse'
        '401':
          description: Unauthorized
  /v0/subjects/clients:
    get:
      tags:
        - Subjects
      summary: Gets client subjects
      operationId: GetClientSubjects
      parameters:
        - name: searchQuery
          in: query
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            format: int32
        - name: pageSize
          in: query
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientSubjectDtoPaginatedIamResponse'
        '401':
          description: Unauthorized
  /v0/subjects/clients/{clientId}/permissions:
    get:
      tags:
        - Subjects
      summary: Gets the permissions of a client
      operationId: GetClientPermissions
      parameters:
        - name: clientId
          in: path
          description: The client id
          required: true
          schema:
            type: string
        - name: resourceType
          in: query
          schema:
            type: string
        - name: resourceProvider
          in: query
          schema:
            type: string
        - name: action
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubjectPermissionsResponse'
        '401':
          description: Unauthorized
  /v0/subjects/groups:
    get:
      tags:
        - Subjects
      summary: Gets subject groups
      operationId: GetSubjectGroups
      parameters:
        - name: searchQuery
          in: query
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            format: int32
        - name: pageSize
          in: query
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubjectGroupDtoPaginatedIamResponse'
        '401':
          description: Unauthorized
    post:
      tags:
        - Subjects
      summary: Creates a new subject group
      operationId: CreateSubjectGroup
      requestBody:
        description: Group creation parameters
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateSubjectGroupRequest'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateSubjectGroupRequest'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateSubjectGroupRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubjectGroupDto'
        '401':
          description: Unauthorized
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/subjects/groups/{groupId}:
    delete:
      tags:
        - Subjects
      summary: Deletes a subject group
      operationId: DeleteSubjectGroup
      parameters:
        - name: groupId
          in: path
          description: The id of the subject group
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: No Content
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/subjects/groups/{groupId}/permissions:
    get:
      tags:
        - Subjects
      summary: Gets the permissions of a group
      operationId: GetGroupPermissions
      parameters:
        - name: groupId
          in: path
          description: The group id
          required: true
          schema:
            type: string
        - name: resourceType
          in: query
          schema:
            type: string
        - name: resourceProvider
          in: query
          schema:
            type: string
        - name: action
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubjectPermissionsResponse'
        '401':
          description: Unauthorized
  /v0/subjects/groups/{groupSubjectId}/members:
    get:
      tags:
        - Subjects
      summary: Gets the subjects within a subject group
      parameters:
        - name: groupSubjectId
          in: path
          description: The id of the subject group
          required: true
          schema:
            type: string
            format: uuid
        - name: page
          in: query
          schema:
            type: integer
            format: int32
        - name: pageSize
          in: query
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubjectDtoPaginatedIamResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
    post:
      tags:
        - Subjects
      summary: Adds a member to a subject group
      operationId: AddSubjectsToSubjectGroup
      parameters:
        - name: groupSubjectId
          in: path
          description: The id of the subject group
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: The mutation request
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/MutateGroupMembersRequest'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/MutateGroupMembersRequest'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/MutateGroupMembersRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SubjectGroupMember'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      tags:
        - Subjects
      summary: Removes a member from a subject group
      operationId: RemoveSubjectFromSubjectGroup
      parameters:
        - name: groupSubjectId
          in: path
          description: The id of the subject group
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: The mutation request
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/MutateGroupMembersRequest'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/MutateGroupMembersRequest'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/MutateGroupMembersRequest'
      responses:
        '204':
          description: No Content
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/subjects/users:
    get:
      tags:
        - Subjects
      summary: Gets user subjects
      operationId: GetUserSubjects
      parameters:
        - name: searchQuery
          in: query
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            format: int32
        - name: pageSize
          in: query
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserSubjectDtoPaginatedIamResponse'
        '401':
          description: Unauthorized
  /v0/subjects/users/{userId}/permissions:
    get:
      tags:
        - Subjects
      summary: Gets the permissions of a user
      operationId: GetUserPermissions
      parameters:
        - name: userId
          in: path
          description: The user id
          required: true
          schema:
            type: string
        - name: resourceType
          in: query
          schema:
            type: string
        - name: resourceProvider
          in: query
          schema:
            type: string
        - name: action
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubjectPermissionsResponse'
        '401':
          description: Unauthorized
  /v0/users:
    get:
      tags:
        - User
      summary: Returns a paginated list of users, optionally filtered by a search query
      parameters:
        - name: searchText
          in: query
          description: Search query
          schema:
            type: string
        - name: page
          in: query
          description: Requested page
          schema:
            type: integer
            format: int32
        - name: pageSize
          in: query
          description: Requested pagesize
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/UserDtoPaginatedResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/UserDtoPaginatedResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/UserDtoPaginatedResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/users/{userId}:
    get:
      tags:
        - User
      summary: Returns a user by their id
      parameters:
        - name: userId
          in: path
          description: ''
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/UserDto'
            application/json:
              schema:
                $ref: '#/components/schemas/UserDto'
            text/json:
              schema:
                $ref: '#/components/schemas/UserDto'
        '400':
          description: Bad Request – Invalid or missing parameters
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/users/{userId}/role/{roleId}:
    post:
      tags:
        - User
      summary: Assigns a role to a user
      parameters:
        - name: userId
          in: path
          description: ''
          required: true
          schema:
            type: string
        - name: roleId
          in: path
          description: ''
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      tags:
        - User
      summary: Removes a role from a user
      parameters:
        - name: userId
          in: path
          description: ''
          required: true
          schema:
            type: string
        - name: roleId
          in: path
          description: ''
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v0/users/invite:
    post:
      tags:
        - User
      summary: Sends an invitation to Aritma ID
      operationId: InviteUserSubject
      parameters:
        - name: email
          in: query
          schema:
            type: string
        - name: redirectUrl
          in: query
          schema:
            type: string
      responses:
        '204':
          description: No Content
  /v0/users/users:
    post:
      tags:
        - User
      summary: Creates a user subject if their domain is verified.
      operationId: CreateUserSubject
      parameters:
        - name: email
          in: query
          schema:
            type: string
        - name: fullName
          in: query
          schema:
            type: string
        - name: phoneNumber
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CreateUserResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/CreateUserResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/CreateUserResponse'
components:
  schemas:
    AzureAdProperties:
      required:
        - authority
        - autoProvisioningEnabled
        - clientId
        - delegationEnabled
        - loginEnabled
        - responseType
        - scope
        - usePkce
        - visible
      type: object
      properties:
        loginEnabled:
          type: boolean
        visible:
          type: boolean
        delegationEnabled:
          type: boolean
        autoProvisioningEnabled:
          type: boolean
        clientId:
          type: string
        clientSecret:
          type: string
          nullable: true
        usePkce:
          type: boolean
        authority:
          type: string
        responseType:
          allOf:
            - $ref: '#/components/schemas/AzureAdResponseType'
        scope:
          type: string
      additionalProperties: false
    AzureAdPropertiesCreateSsoProviderRequest:
      required:
        - displayName
        - enabled
        - properties
        - scheme
        - type
      type: object
      properties:
        scheme:
          type: string
          description: The scheme name for the provider
        displayName:
          type: string
          description: The display name of the provider
        enabled:
          type: boolean
          description: Whether or not the provider is enabled
        type:
          allOf:
            - $ref: '#/components/schemas/IdentityProviderType'
          description: The type of identityprovider
        properties:
          allOf:
            - $ref: '#/components/schemas/AzureAdProperties'
          description: >-
            The properties that defines the behavior of this provider, dependent
            on which provider that is used, see json schemas for more details
      additionalProperties: false
    AzureAdPropertiesGetIdentityProviderResponse:
      required:
        - displayName
        - enabled
        - id
        - properties
        - providerName
        - scheme
        - type
      type: object
      properties:
        id:
          type: integer
          format: int32
        scheme:
          type: string
        displayName:
          type: string
        enabled:
          type: boolean
        providerName:
          type: string
        type:
          type: string
        properties:
          allOf:
            - $ref: '#/components/schemas/AzureAdProperties'
      additionalProperties: false
    AzureAdPropertiesUpdateIdentityProviderDto:
      required:
        - displayName
        - enabled
        - id
        - properties
        - scheme
        - type
      type: object
      properties:
        id:
          type: integer
          description: The id of the identityprovider
          format: int32
        scheme:
          type: string
          description: The scheme name for the provider
        displayName:
          type: string
          description: The display name of the provider
        enabled:
          type: boolean
          description: Whether or not the provider is enabled
        type:
          allOf:
            - $ref: '#/components/schemas/IdentityProviderType'
          description: The type of identityprovider
        properties:
          allOf:
            - $ref: '#/components/schemas/AzureAdProperties'
          description: >-
            The properties that defines the behavior of this provider, dependent
            on which provider that is used, see json schemas for more details
      additionalProperties: false
    AzureAdResponseType:
      enum:
        - id_token
        - code
      type: string
    ClientAdditionalData:
      required:
        - description
        - iconUri
      type: object
      properties:
        iconUri:
          type: string
        description:
          type: string
      additionalProperties: false
    ClientDetailsDto:
      required:
        - allowedGrantTypes
        - allowedScopes
        - clientId
        - description
        - name
        - redirectUris
      type: object
      properties:
        clientId:
          type: string
          description: Client ID
        name:
          type: string
          description: Client name
        description:
          type: string
          description: Client description
        allowedGrantTypes:
          type: array
          items:
            type: string
          description: >-
            Allowed grant types. I.e. "authorization_code",
            "client_credentials", "password", etc.
        redirectUris:
          type: array
          items:
            type: string
          description: Allowed redirect uris
        allowedScopes:
          type: array
          items:
            type: string
          description: Scopes that can be requested for this client
      additionalProperties: false
      description: Represents a client in Aritma ID
    ClientDto:
      required:
        - clientId
        - description
        - name
      type: object
      properties:
        clientId:
          type: string
          description: Client ID
        name:
          type: string
          description: Client name
        description:
          type: string
          description: Client description
      additionalProperties: false
      description: A concise client dto
    ClientDtoPaginatedResponse:
      required:
        - items
        - links
        - metadata
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ClientDto'
        metadata:
          allOf:
            - $ref: '#/components/schemas/PaginationMetadata'
        links:
          allOf:
            - $ref: '#/components/schemas/PaginationLinks'
      additionalProperties: false
    ClientSecretDto:
      required:
        - created
        - description
        - id
        - type
      type: object
      properties:
        id:
          type: integer
          format: int32
        type:
          type: string
        description:
          type: string
        expiration:
          type: string
          format: date-time
          nullable: true
        created:
          type: string
          format: date-time
      additionalProperties: false
    ClientSecretDtoPaginatedResponse:
      required:
        - items
        - links
        - metadata
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ClientSecretDto'
        metadata:
          allOf:
            - $ref: '#/components/schemas/PaginationMetadata'
        links:
          allOf:
            - $ref: '#/components/schemas/PaginationLinks'
      additionalProperties: false
    ClientSubjectDto:
      required:
        - displayName
        - id
        - properties
        - subjectId
        - type
      type: object
      properties:
        id:
          type: string
        displayName:
          type: string
        tenant:
          type: string
          nullable: true
        subjectId:
          type: string
          readOnly: true
        type:
          allOf:
            - $ref: '#/components/schemas/SubjectType'
          readOnly: true
        properties:
          allOf:
            - $ref: '#/components/schemas/ClientAdditionalData'
      additionalProperties: false
    ClientSubjectDtoPaginatedIamResponse:
      required:
        - count
        - data
        - page
        - pageSize
        - total
        - totalPages
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ClientSubjectDto'
        page:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
        count:
          type: integer
          format: int32
          readOnly: true
        total:
          type: integer
          format: int32
        totalPages:
          type: integer
          format: int32
          readOnly: true
      additionalProperties: false
    CreateClientRequest:
      required:
        - allowedGrantTypes
        - allowedScopes
        - description
        - name
        - redirectUris
      type: object
      properties:
        name:
          type: string
        description:
          type: string
          description: Client description
        allowedGrantTypes:
          type: array
          items:
            type: string
          description: >-
            Allowed grant types. I.e. "authorization_code",
            "client_credentials", "password", etc.
        redirectUris:
          type: array
          items:
            type: string
          description: Allowed redirect uris
        allowedScopes:
          type: array
          items:
            type: string
          description: Scopes that can be requested for this client
      additionalProperties: false
    CreateClientSecretRequest:
      required:
        - description
        - value
      type: object
      properties:
        value:
          maxLength: 32
          minLength: 8
          type: string
        description:
          type: string
      additionalProperties: false
    CreateScimTokenRequest:
      required:
        - provider
        - providerDisplayName
      type: object
      properties:
        provider:
          type: string
        providerDisplayName:
          type: string
      additionalProperties: false
    CreateScimTokenResponse:
      required:
        - id
        - provider
        - providerDisplayName
        - token
      type: object
      properties:
        id:
          type: string
        token:
          type: string
        provider:
          type: string
        providerDisplayName:
          type: string
      additionalProperties: false
    CreateSubjectGroupRequest:
      required:
        - description
        - displayName
      type: object
      properties:
        displayName:
          type: string
        description:
          type: string
      additionalProperties: false
    CreateUserResponse:
      required:
        - email
        - fullName
        - phoneNumber
        - userId
      type: object
      properties:
        userId:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
        fullName:
          type: string
      additionalProperties: false
    CustomProperties:
      required:
        - authority
        - autoProvisioningEnabled
        - clientId
        - delegationEnabled
        - emailClaimType
        - getClaimsFromUserInfoEndpoint
        - loginEnabled
        - nameClaimType
        - phoneNumberClaimType
        - responseType
        - scope
        - subjectClaimType
        - usePkce
        - verifyEnabled
        - visible
      type: object
      properties:
        loginEnabled:
          type: boolean
        visible:
          type: boolean
        delegationEnabled:
          type: boolean
        autoProvisioningEnabled:
          type: boolean
        clientId:
          type: string
        clientSecret:
          type: string
          nullable: true
        verifyEnabled:
          type: boolean
        responseType:
          allOf:
            - $ref: '#/components/schemas/CustomResponseType'
        nameClaimType:
          type: string
        emailClaimType:
          type: string
        phoneNumberClaimType:
          type: string
        subjectClaimType:
          type: string
        authority:
          type: string
        scope:
          type: string
        getClaimsFromUserInfoEndpoint:
          type: boolean
        usePkce:
          type: boolean
      additionalProperties: false
    CustomPropertiesCreateSsoProviderRequest:
      required:
        - displayName
        - enabled
        - properties
        - scheme
        - type
      type: object
      properties:
        scheme:
          type: string
          description: The scheme name for the provider
        displayName:
          type: string
          description: The display name of the provider
        enabled:
          type: boolean
          description: Whether or not the provider is enabled
        type:
          allOf:
            - $ref: '#/components/schemas/IdentityProviderType'
          description: The type of identityprovider
        properties:
          allOf:
            - $ref: '#/components/schemas/CustomProperties'
          description: >-
            The properties that defines the behavior of this provider, dependent
            on which provider that is used, see json schemas for more details
      additionalProperties: false
    CustomPropertiesGetIdentityProviderResponse:
      required:
        - displayName
        - enabled
        - id
        - properties
        - providerName
        - scheme
        - type
      type: object
      properties:
        id:
          type: integer
          format: int32
        scheme:
          type: string
        displayName:
          type: string
        enabled:
          type: boolean
        providerName:
          type: string
        type:
          type: string
        properties:
          allOf:
            - $ref: '#/components/schemas/CustomProperties'
      additionalProperties: false
    CustomPropertiesUpdateIdentityProviderDto:
      required:
        - displayName
        - enabled
        - id
        - properties
        - scheme
        - type
      type: object
      properties:
        id:
          type: integer
          description: The id of the identityprovider
          format: int32
        scheme:
          type: string
          description: The scheme name for the provider
        displayName:
          type: string
          description: The display name of the provider
        enabled:
          type: boolean
          description: Whether or not the provider is enabled
        type:
          allOf:
            - $ref: '#/components/schemas/IdentityProviderType'
          description: The type of identityprovider
        properties:
          allOf:
            - $ref: '#/components/schemas/CustomProperties'
          description: >-
            The properties that defines the behavior of this provider, dependent
            on which provider that is used, see json schemas for more details
      additionalProperties: false
    CustomResponseType:
      enum:
        - id_token
        - code
        - token
        - none
      type: string
    DomainDto:
      required:
        - domain
        - status
      type: object
      properties:
        domain:
          type: string
        status:
          allOf:
            - $ref: '#/components/schemas/DomainStatus'
        verificationToken:
          type: string
          nullable: true
      additionalProperties: false
    DomainStatus:
      enum:
        - NotRegistered
        - Pending
        - Confirmed
      type: string
    FindPoliciesResponse:
      required:
        - policies
      type: object
      properties:
        policies:
          type: array
          items:
            $ref: '#/components/schemas/PolicyDto'
        cursor:
          type: string
          nullable: true
      additionalProperties: false
    GoogleProperties:
      required:
        - authority
        - autoProvisioningEnabled
        - clientId
        - delegationEnabled
        - emailClaimType
        - loginEnabled
        - nameClaimType
        - phoneNumberClaimType
        - scope
        - subjectClaimType
        - usePkce
        - verifyEnabled
        - visible
      type: object
      properties:
        loginEnabled:
          type: boolean
        visible:
          type: boolean
        delegationEnabled:
          type: boolean
        autoProvisioningEnabled:
          type: boolean
        clientId:
          type: string
        clientSecret:
          type: string
          nullable: true
        verifyEnabled:
          type: boolean
        nameClaimType:
          type: string
        emailClaimType:
          type: string
        phoneNumberClaimType:
          type: string
        subjectClaimType:
          type: string
        usePkce:
          type: boolean
        authority:
          type: string
        scope:
          type: string
      additionalProperties: false
    GooglePropertiesCreateSsoProviderRequest:
      required:
        - displayName
        - enabled
        - properties
        - scheme
        - type
      type: object
      properties:
        scheme:
          type: string
          description: The scheme name for the provider
        displayName:
          type: string
          description: The display name of the provider
        enabled:
          type: boolean
          description: Whether or not the provider is enabled
        type:
          allOf:
            - $ref: '#/components/schemas/IdentityProviderType'
          description: The type of identityprovider
        properties:
          allOf:
            - $ref: '#/components/schemas/GoogleProperties'
          description: >-
            The properties that defines the behavior of this provider, dependent
            on which provider that is used, see json schemas for more details
      additionalProperties: false
    GooglePropertiesGetIdentityProviderResponse:
      required:
        - displayName
        - enabled
        - id
        - properties
        - providerName
        - scheme
        - type
      type: object
      properties:
        id:
          type: integer
          format: int32
        scheme:
          type: string
        displayName:
          type: string
        enabled:
          type: boolean
        providerName:
          type: string
        type:
          type: string
        properties:
          allOf:
            - $ref: '#/components/schemas/GoogleProperties'
      additionalProperties: false
    GooglePropertiesUpdateIdentityProviderDto:
      required:
        - displayName
        - enabled
        - id
        - properties
        - scheme
        - type
      type: object
      properties:
        id:
          type: integer
          description: The id of the identityprovider
          format: int32
        scheme:
          type: string
          description: The scheme name for the provider
        displayName:
          type: string
          description: The display name of the provider
        enabled:
          type: boolean
          description: Whether or not the provider is enabled
        type:
          allOf:
            - $ref: '#/components/schemas/IdentityProviderType'
          description: The type of identityprovider
        properties:
          allOf:
            - $ref: '#/components/schemas/GoogleProperties'
          description: >-
            The properties that defines the behavior of this provider, dependent
            on which provider that is used, see json schemas for more details
      additionalProperties: false
    HttpMethod:
      required:
        - method
      type: object
      properties:
        method:
          type: string
      additionalProperties: false
    IdentityProviderType:
      enum:
        - oidc
      type: string
    ListIdentityProviderDto:
      required:
        - displayName
        - enabled
        - id
        - provider
        - scheme
        - type
      type: object
      properties:
        id:
          type: integer
          format: int32
        provider:
          type: string
        scheme:
          type: string
        displayName:
          type: string
        enabled:
          type: boolean
        type:
          type: string
      additionalProperties: false
    ListScimTokenResponse:
      required:
        - page
        - pageSize
        - tokens
        - totalCount
      type: object
      properties:
        tokens:
          type: array
          items:
            $ref: '#/components/schemas/ScimTokenDto'
        totalCount:
          type: integer
          format: int32
        page:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
      additionalProperties: false
    ListSsoProvidersResponse:
      required:
        - identityProviders
        - page
        - pageSize
        - totalCount
      type: object
      properties:
        identityProviders:
          type: array
          items:
            $ref: '#/components/schemas/ListIdentityProviderDto'
        totalCount:
          type: integer
          format: int32
        page:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
      additionalProperties: false
    MutateGroupMembersRequest:
      required:
        - subjectIds
      type: object
      properties:
        subjectIds:
          type: array
          items:
            type: string
      additionalProperties: false
    NavigationLink:
      required:
        - method
        - rel
      type: object
      properties:
        rel:
          type: string
        href:
          type: string
          nullable: true
        method:
          allOf:
            - $ref: '#/components/schemas/HttpMethod'
      additionalProperties: false
    PaginationLinks:
      type: object
      properties:
        first:
          type: string
          format: uri
          nullable: true
        previous:
          type: string
          format: uri
          nullable: true
        next:
          type: string
          format: uri
          nullable: true
        last:
          type: string
          format: uri
          nullable: true
      additionalProperties: false
    PaginationMetadata:
      required:
        - page
        - pageSize
        - totalCount
      type: object
      properties:
        page:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
        totalCount:
          type: integer
          format: int32
      additionalProperties: false
    PolicyDto:
      required:
        - action
        - scope
        - subject
        - tenant
      type: object
      properties:
        subject:
          type: string
        scope:
          type: string
        action:
          type: string
        tenant:
          type: string
      additionalProperties: false
    PolicyRequest:
      required:
        - action
        - scope
        - subject
      type: object
      properties:
        subject:
          minLength: 1
          type: string
        scope:
          type: string
          format: uri
        action:
          minLength: 1
          type: string
      additionalProperties: false
    ProblemDetails:
      type: object
      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
      additionalProperties: {}
    RoleApiDto:
      required:
        - id
        - name
      type: object
      properties:
        id:
          type: string
        name:
          minLength: 1
          type: string
      additionalProperties: false
    RoleApiDtoPaginatedResponse:
      required:
        - items
        - links
        - metadata
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/RoleApiDto'
        metadata:
          allOf:
            - $ref: '#/components/schemas/PaginationMetadata'
        links:
          allOf:
            - $ref: '#/components/schemas/PaginationLinks'
      additionalProperties: false
    RoleDto:
      required:
        - id
        - name
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      additionalProperties: false
    ScimTokenDto:
      required:
        - createdAt
        - id
        - provider
        - providerDisplayName
      type: object
      properties:
        id:
          type: string
          format: uuid
        provider:
          type: string
        providerDisplayName:
          type: string
        createdAt:
          type: string
          format: date-time
      additionalProperties: false
    ScopeDto:
      required:
        - description
        - displayName
        - name
      type: object
      properties:
        name:
          type: string
          description: The name of the scope, which is used to identify it in requests
        displayName:
          type: string
          description: >-
            The display name of the scope, which is used for user-friendly
            representation
        description:
          type: string
          description: A brief description of the scope and its purpose
      additionalProperties: false
      description: Represents a scope in Aritma ID
    ScopeDtoPaginatedResponse:
      required:
        - items
        - links
        - metadata
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ScopeDto'
        metadata:
          allOf:
            - $ref: '#/components/schemas/PaginationMetadata'
        links:
          allOf:
            - $ref: '#/components/schemas/PaginationLinks'
      additionalProperties: false
    SignicatMethods:
      enum:
        - None
        - BankId
        - MitId
        - SBID
      type: string
    SignicatProperties:
      required:
        - authority
        - autoProvisioningEnabled
        - clientId
        - delegationEnabled
        - loginEnabled
        - method
        - verifyEnabled
        - visible
      type: object
      properties:
        loginEnabled:
          type: boolean
        visible:
          type: boolean
        delegationEnabled:
          type: boolean
        autoProvisioningEnabled:
          type: boolean
        clientId:
          type: string
        clientSecret:
          type: string
          nullable: true
        verifyEnabled:
          type: boolean
        authority:
          type: string
        method:
          allOf:
            - $ref: '#/components/schemas/SignicatMethods'
      additionalProperties: false
    SignicatPropertiesCreateSsoProviderRequest:
      required:
        - displayName
        - enabled
        - properties
        - scheme
        - type
      type: object
      properties:
        scheme:
          type: string
          description: The scheme name for the provider
        displayName:
          type: string
          description: The display name of the provider
        enabled:
          type: boolean
          description: Whether or not the provider is enabled
        type:
          allOf:
            - $ref: '#/components/schemas/IdentityProviderType'
          description: The type of identityprovider
        properties:
          allOf:
            - $ref: '#/components/schemas/SignicatProperties'
          description: >-
            The properties that defines the behavior of this provider, dependent
            on which provider that is used, see json schemas for more details
      additionalProperties: false
    SignicatPropertiesGetIdentityProviderResponse:
      required:
        - displayName
        - enabled
        - id
        - properties
        - providerName
        - scheme
        - type
      type: object
      properties:
        id:
          type: integer
          format: int32
        scheme:
          type: string
        displayName:
          type: string
        enabled:
          type: boolean
        providerName:
          type: string
        type:
          type: string
        properties:
          allOf:
            - $ref: '#/components/schemas/SignicatProperties'
      additionalProperties: false
    SignicatPropertiesUpdateIdentityProviderDto:
      required:
        - displayName
        - enabled
        - id
        - properties
        - scheme
        - type
      type: object
      properties:
        id:
          type: integer
          description: The id of the identityprovider
          format: int32
        scheme:
          type: string
          description: The scheme name for the provider
        displayName:
          type: string
          description: The display name of the provider
        enabled:
          type: boolean
          description: Whether or not the provider is enabled
        type:
          allOf:
            - $ref: '#/components/schemas/IdentityProviderType'
          description: The type of identityprovider
        properties:
          allOf:
            - $ref: '#/components/schemas/SignicatProperties'
          description: >-
            The properties that defines the behavior of this provider, dependent
            on which provider that is used, see json schemas for more details
      additionalProperties: false
    StringUserClaimApiDto:
      required:
        - claimId
        - claimType
        - claimValue
      type: object
      properties:
        claimId:
          type: integer
          format: int32
        userId:
          type: string
          nullable: true
        claimType:
          minLength: 1
          type: string
        claimValue:
          minLength: 1
          type: string
      additionalProperties: false
    SubjectDto:
      required:
        - displayName
        - id
        - properties
        - subjectId
        - type
      type: object
      properties:
        id:
          type: string
        displayName:
          type: string
        tenant:
          type: string
          nullable: true
        subjectId:
          type: string
          readOnly: true
        type:
          allOf:
            - $ref: '#/components/schemas/SubjectType'
          readOnly: true
        properties:
          readOnly: true
      additionalProperties: false
    SubjectDtoPaginatedIamResponse:
      required:
        - count
        - data
        - page
        - pageSize
        - total
        - totalPages
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SubjectDto'
        page:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
        count:
          type: integer
          format: int32
          readOnly: true
        total:
          type: integer
          format: int32
        totalPages:
          type: integer
          format: int32
          readOnly: true
      additionalProperties: false
    SubjectGroup:
      required:
        - createdAt
        - createdBy
        - description
        - displayName
        - id
        - subjectId
        - subjects
      type: object
      properties:
        id:
          type: string
          format: uuid
        subjectId:
          type: string
          readOnly: true
        displayName:
          type: string
        description:
          type: string
        createdBy:
          type: string
        createdAt:
          type: string
          format: date-time
        subjects:
          type: array
          items:
            $ref: '#/components/schemas/SubjectGroupMember'
      additionalProperties: false
    SubjectGroupAdditionalData:
      required:
        - description
        - memberCount
      type: object
      properties:
        description:
          type: string
        memberCount:
          type: integer
          format: int32
      additionalProperties: false
    SubjectGroupDto:
      required:
        - displayName
        - id
        - properties
        - subjectId
        - type
      type: object
      properties:
        id:
          type: string
        displayName:
          type: string
        tenant:
          type: string
          nullable: true
        subjectId:
          type: string
          readOnly: true
        type:
          allOf:
            - $ref: '#/components/schemas/SubjectType'
          readOnly: true
        properties:
          allOf:
            - $ref: '#/components/schemas/SubjectGroupAdditionalData'
      additionalProperties: false
    SubjectGroupDtoPaginatedIamResponse:
      required:
        - count
        - data
        - page
        - pageSize
        - total
        - totalPages
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SubjectGroupDto'
        page:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
        count:
          type: integer
          format: int32
          readOnly: true
        total:
          type: integer
          format: int32
        totalPages:
          type: integer
          format: int32
          readOnly: true
      additionalProperties: false
    SubjectGroupMember:
      required:
        - subjectId
      type: object
      properties:
        groupId:
          type: string
          format: uuid
          nullable: true
        group:
          allOf:
            - $ref: '#/components/schemas/SubjectGroup'
          nullable: true
        subjectId:
          type: string
      additionalProperties: false
    SubjectPermissionsResponse:
      required:
        - policies
        - subject
        - tenantRoles
      type: object
      properties:
        policies:
          type: array
          items:
            $ref: '#/components/schemas/PolicyDto'
        tenantRoles:
          type: array
          items:
            type: string
        subject:
          type: string
      additionalProperties: false
    SubjectType:
      enum:
        - User
        - Client
        - Anonymous
        - Group
      type: string
    UpdateClientRequest:
      required:
        - allowedGrantTypes
        - allowedScopes
        - description
        - name
        - redirectUris
      type: object
      properties:
        name:
          type: string
        description:
          type: string
          description: Client description
        allowedGrantTypes:
          type: array
          items:
            type: string
          description: >-
            Allowed grant types. I.e. "authorization_code",
            "client_credentials", "password", etc.
        redirectUris:
          type: array
          items:
            type: string
          description: Allowed redirect uris
        allowedScopes:
          type: array
          items:
            type: string
          description: Scopes that can be requested for this client
      additionalProperties: false
    UserAdditionalData:
      required:
        - email
        - phoneNumber
        - username
      type: object
      properties:
        username:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
      additionalProperties: false
    UserDto:
      required:
        - email
        - id
        - phoneNumber
        - roles
        - twoFactorEnabled
        - userName
      type: object
      properties:
        id:
          type: string
        userName:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
        twoFactorEnabled:
          type: boolean
        roles:
          type: array
          items:
            $ref: '#/components/schemas/RoleDto'
      additionalProperties: false
    UserDtoPaginatedResponse:
      required:
        - items
        - links
        - metadata
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/UserDto'
        metadata:
          allOf:
            - $ref: '#/components/schemas/PaginationMetadata'
        links:
          allOf:
            - $ref: '#/components/schemas/PaginationLinks'
      additionalProperties: false
    UserSubjectDto:
      required:
        - displayName
        - id
        - properties
        - subjectId
        - type
      type: object
      properties:
        id:
          type: string
        displayName:
          type: string
        tenant:
          type: string
          nullable: true
        subjectId:
          type: string
          readOnly: true
        type:
          allOf:
            - $ref: '#/components/schemas/SubjectType'
          readOnly: true
        properties:
          allOf:
            - $ref: '#/components/schemas/UserAdditionalData'
      additionalProperties: false
    UserSubjectDtoPaginatedIamResponse:
      required:
        - count
        - data
        - page
        - pageSize
        - total
        - totalPages
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/UserSubjectDto'
        page:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
        count:
          type: integer
          format: int32
          readOnly: true
        total:
          type: integer
          format: int32
        totalPages:
          type: integer
          format: int32
          readOnly: true
      additionalProperties: false
  securitySchemes:
    authorization_code_with_pkce_0:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://id.dev.aritma.io/connect/authorize
          tokenUrl: https://id.dev.aritma.io/connect/token
          scopes:
            services.iam: Access to Aritma Identity and Access Management API
    client_credentials_0:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://id.dev.aritma.io/connect/token
          scopes:
            services.iam: Access to Aritma Identity and Access Management API
security:
  - authorization_code_with_pkce_0:
      - services.iam
  - client_credentials_0:
      - services.iam
tags:
  - name: Actions
    description: Actions related to IAM actions
  - name: Client
    description: Actions related to clients in Aritma ID
  - name: Domains
    description: >-
      Actions related to domains registered for the tenant, and their
      verification status
  - name: Me
    description: Actions related to the currently authenticated user
  - name: Me
    description: Actions listing information about the currently authenticated user
  - name: Policies
    description: Actions related to IAM policies
  - name: Role
    description: Actions related to Aritma ID roles
  - name: Scim
    description: Actions related to SCIM tokens
  - name: Scope
    description: Actions related to scopes in Aritma ID
  - name: SSO
    description: Actions common for all SSO providers
  - name: SSO - Azure AD (Entra ID)
    description: Actions relating to AzureAd as an SSO provider
  - name: SSO - Custom Providers
    description: Actions relating to custom SSO providers
  - name: SSO - Google
    description: Actions relating to Google as an SSO provider
  - name: SSO - Signicat
    description: Actions relating to Signicat as an SSO provider
  - name: Subjects
    description: Actions related to IAM subjects
  - name: User
    description: Actions related to Aritma ID users
