{
  "openapi": "3.1.0",
  "info": {
    "title": "SCIM API",
    "description": "Provision and manage user accounts and groups with the Trint SCIM API.",
    "version": "0.1.0"
  },
  "servers": [
    {
      "url": "https://scim.trint.com/v2",
      "description": "US tenant"
    },
    {
      "url": "https://scim.eu.trint.com/v2",
      "description": "EU tenant"
    }
  ],
  "tags": [
    {
      "name": "ServiceProviderConfig",
      "description": "Discover the SCIM features Trint's service provider supports."
    },
    {
      "name": "Schemas",
      "description": "Retrieve the SCIM resource schemas Trint exposes."
    },
    {
      "name": "ResourceTypes",
      "description": "Retrieve the SCIM resource types Trint exposes."
    },
    {
      "name": "User",
      "description": "Provision, retrieve, update and deactivate Trint user accounts."
    },
    {
      "name": "Group",
      "description": "Manage groups and their membership."
    }
  ],
  "paths": {
    "/ServiceProviderConfig": {
      "get": {
        "tags": ["ServiceProviderConfig"],
        "summary": "Get service provider config",
        "operationId": "getServiceProviderConfig",
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceProviderConfig"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig"],
                  "patch": {
                    "supported": true
                  },
                  "bulk": {
                    "supported": false,
                    "maxPayloadSize": 0,
                    "maxOperations": 0
                  },
                  "filter": {
                    "supported": true,
                    "maxResults": 100
                  },
                  "changePassword": {
                    "supported": false
                  },
                  "sort": {
                    "supported": false
                  },
                  "etag": {
                    "supported": false
                  },
                  "documentationUri": "https://developer.trint.com/reference/scim/",
                  "authenticationSchemes": [
                    {
                      "name": "OAuth 2.0",
                      "description": "Authorisation using an OAuth 2.0 issued token",
                      "type": "oauth2",
                      "primary": true
                    }
                  ],
                  "meta": {
                    "location": "https://scim.trint.com/v2/ServiceProviderConfigs",
                    "resourceType": "ServiceProviderConfig"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — the access token is missing, expired or invalid.",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Schemas": {
      "get": {
        "tags": ["Schemas"],
        "summary": "Get information about supported resource schemas",
        "operationId": "getSchemas",
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSchemasResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
                  "totalResults": 2,
                  "Resources": [
                    {
                      "id": "urn:ietf:params:scim:schemas:core:2.0:User",
                      "name": "User",
                      "description": "User Account",
                      "meta": {
                        "resourceType": "Schema",
                        "location": "/v2/Schemas/urn:ietf:params:scim:schemas:core:2.0:User"
                      },
                      "attributes": [
                        {
                          "name": "userName",
                          "type": "string",
                          "multiValued": false,
                          "description": "Unique identifier for the User, typically used by the user to directly authenticate to the service provider. Each User MUST include a non-empty userName value. This identifier MUST be unique across the service provider's entire set of Users. REQUIRED",
                          "caseExact": false,
                          "required": true,
                          "mutability": "immutable",
                          "returned": "default",
                          "uniqueness": "server"
                        },
                        {
                          "name": "name",
                          "type": "complex",
                          "multiValued": false,
                          "description": "The components of the user's real name.",
                          "required": true,
                          "subAttributes": [
                            {
                              "name": "familyName",
                              "type": "string",
                              "multiValued": false,
                              "description": "The family name of the User, or last name in most Western languages (e.g., 'Jensen' given the full name 'Ms. Barbara J Jensen, III'",
                              "required": true,
                              "caseExact": false,
                              "mutability": "readWrite",
                              "returned": "default",
                              "uniqueness": "none"
                            },
                            {
                              "name": "givenName",
                              "type": "string",
                              "multiValued": false,
                              "description": "The given name of the User, or first name in most Western languages (e.g., 'Barabara' given the full name 'Ms. Barbara J Jensen, III'",
                              "required": true,
                              "caseExact": false,
                              "mutability": "readWrite",
                              "returned": "default",
                              "uniqueness": "none"
                            }
                          ],
                          "returned": "default"
                        },
                        {
                          "name": "emails",
                          "type": "complex",
                          "multiValued": true,
                          "description": "Email addresses for the user.  The value SHOULD be canonicalized by the service provider, e.g., 'bjensen@example.com' instead of 'bjensen@EXAMPLE.COM'. Canonical type values of 'work', 'home', and 'other'.",
                          "required": false,
                          "subAttributes": [
                            {
                              "name": "value",
                              "type": "string",
                              "multiValued": false,
                              "description": "Email addresses for the user.  The value SHOULD be canonicalized by the service provider, e.g., 'bjensen@example.com' instead of 'bjensen@EXAMPLE.COM'. Canonical type values of 'work', 'home', and 'other'.",
                              "required": false,
                              "caseExact": false,
                              "mutability": "readWrite",
                              "returned": "default",
                              "uniqueness": "none"
                            },
                            {
                              "name": "type",
                              "type": "string",
                              "multiValued": false,
                              "description": "A label indicating the attribute's function, e.g., 'work' or 'home'.",
                              "required": false,
                              "caseExact": false,
                              "canonicalValues": ["work", "home", "other"],
                              "mutability": "readWrite",
                              "returned": "default",
                              "uniqueness": "none"
                            },
                            {
                              "name": "primary",
                              "type": "boolean",
                              "multiValued": false,
                              "description": "A Boolean value indicating the 'primary' or preferred attribute value for this attribute, e.g., the preferred mailing address or primary email address.  The primary attribute value 'true' MUST appear no more than once.",
                              "required": false,
                              "mutability": "readWrite",
                              "returned": "default"
                            }
                          ],
                          "mutability": "readWrite",
                          "returned": "default",
                          "uniqueness": "none"
                        },
                        {
                          "name": "active",
                          "type": "boolean",
                          "multiValued": false,
                          "description": "A Boolean value indicating the User's administrative status.",
                          "required": false,
                          "mutability": "readWrite",
                          "returned": "default"
                        },
                        {
                          "name": "externalId",
                          "type": "string",
                          "multiValued": false,
                          "description": "An identifier for the resource as defined by the provisioning client",
                          "required": false,
                          "mutability": "readWrite",
                          "caseExact": true,
                          "returned": "default",
                          "uniqueness": "none"
                        }
                      ]
                    },
                    {
                      "id": "urn:ietf:params:scim:schemas:core:2.0:Group",
                      "name": "Group",
                      "description": "Group",
                      "meta": {
                        "resourceType": "Schema",
                        "location": "/v2/Schemas/urn:ietf:params:scim:schemas:core:2.0:Group"
                      },
                      "attributes": [
                        {
                          "name": "displayName",
                          "type": "string",
                          "multiValued": false,
                          "description": "A human-readable name for the Group. REQUIRED",
                          "required": true,
                          "caseExact": false,
                          "mutability": "readWrite",
                          "returned": "default",
                          "uniqueness": "none"
                        },
                        {
                          "name": "members",
                          "type": "complex",
                          "multiValued": true,
                          "description": "A list of members of the Group.",
                          "required": false,
                          "mutability": "readWrite",
                          "returned": "default",
                          "subAttributes": [
                            {
                              "name": "value",
                              "type": "string",
                              "multiValued": false,
                              "description": "Identifier of the members of this Group.",
                              "required": false,
                              "caseExact": false,
                              "mutability": "immutable",
                              "returned": "default",
                              "uniqueness": "none"
                            },
                            {
                              "name": "$ref",
                              "type": "reference",
                              "referenceTypes": ["User"],
                              "multiValued": false,
                              "description": "The URI corresponding to a SCIM resource that is a member of this Group.",
                              "required": false,
                              "caseExact": false,
                              "mutability": "immutable",
                              "returned": "default",
                              "uniqueness": "none"
                            },
                            {
                              "name": "type",
                              "type": "string",
                              "multiValued": false,
                              "description": "A label indicating the type of resource, e.g Group",
                              "required": false,
                              "caseExact": false,
                              "canonicalValues": ["User"],
                              "mutability": "immutable",
                              "returned": "default",
                              "uniqueness": "none"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — the access token is missing, expired or invalid.",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "status": "500"
                }
              }
            }
          }
        }
      }
    },
    "/Schemas/{id}": {
      "get": {
        "tags": ["Schemas"],
        "summary": "Get a resource schema by Id",
        "operationId": "getSchemaById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "User Id",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "User",
                "Group",
                "urn:ietf:params:scim:schemas:core:2.0:User",
                "urn:ietf:params:scim:schemas:core:2.0:Group"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceSchema"
                },
                "example": {
                  "id": "urn:ietf:params:scim:schemas:core:2.0:User",
                  "name": "User",
                  "description": "User Account",
                  "meta": {
                    "resourceType": "Schema",
                    "location": "/v2/Schemas/urn:ietf:params:scim:schemas:core:2.0:User"
                  },
                  "attributes": [
                    {
                      "name": "userName",
                      "type": "string",
                      "multiValued": false,
                      "description": "Unique identifier for the User, typically used by the user to directly authenticate to the service provider. Each User MUST include a non-empty userName value. This identifier MUST be unique across the service provider's entire set of Users. REQUIRED",
                      "caseExact": false,
                      "required": true,
                      "mutability": "immutable",
                      "returned": "default",
                      "uniqueness": "server"
                    },
                    {
                      "name": "name",
                      "type": "complex",
                      "multiValued": false,
                      "description": "The components of the user's real name.",
                      "required": true,
                      "subAttributes": [
                        {
                          "name": "familyName",
                          "type": "string",
                          "multiValued": false,
                          "description": "The family name of the User, or last name in most Western languages (e.g., 'Jensen' given the full name 'Ms. Barbara J Jensen, III'",
                          "required": true,
                          "caseExact": false,
                          "mutability": "readWrite",
                          "returned": "default",
                          "uniqueness": "none"
                        },
                        {
                          "name": "givenName",
                          "type": "string",
                          "multiValued": false,
                          "description": "The given name of the User, or first name in most Western languages (e.g., 'Barabara' given the full name 'Ms. Barbara J Jensen, III'",
                          "required": true,
                          "caseExact": false,
                          "mutability": "readWrite",
                          "returned": "default",
                          "uniqueness": "none"
                        }
                      ],
                      "returned": "default"
                    },
                    {
                      "name": "emails",
                      "type": "complex",
                      "multiValued": true,
                      "description": "Email addresses for the user.  The value SHOULD be canonicalized by the service provider, e.g., 'bjensen@example.com' instead of 'bjensen@EXAMPLE.COM'. Canonical type values of 'work', 'home', and 'other'.",
                      "required": false,
                      "subAttributes": [
                        {
                          "name": "value",
                          "type": "string",
                          "multiValued": false,
                          "description": "Email addresses for the user.  The value SHOULD be canonicalized by the service provider, e.g., 'bjensen@example.com' instead of 'bjensen@EXAMPLE.COM'. Canonical type values of 'work', 'home', and 'other'.",
                          "required": false,
                          "caseExact": false,
                          "mutability": "readWrite",
                          "returned": "default",
                          "uniqueness": "none"
                        },
                        {
                          "name": "type",
                          "type": "string",
                          "multiValued": false,
                          "description": "A label indicating the attribute's function, e.g., 'work' or 'home'.",
                          "required": false,
                          "caseExact": false,
                          "canonicalValues": ["work", "home", "other"],
                          "mutability": "readWrite",
                          "returned": "default",
                          "uniqueness": "none"
                        },
                        {
                          "name": "primary",
                          "type": "boolean",
                          "multiValued": false,
                          "description": "A Boolean value indicating the 'primary' or preferred attribute value for this attribute, e.g., the preferred mailing address or primary email address.  The primary attribute value 'true' MUST appear no more than once.",
                          "required": false,
                          "mutability": "readWrite",
                          "returned": "default"
                        }
                      ],
                      "mutability": "readWrite",
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "name": "active",
                      "type": "boolean",
                      "multiValued": false,
                      "description": "A Boolean value indicating the User's administrative status.",
                      "required": false,
                      "mutability": "readWrite",
                      "returned": "default"
                    },
                    {
                      "name": "externalId",
                      "type": "string",
                      "multiValued": false,
                      "description": "An identifier for the resource as defined by the provisioning client",
                      "required": false,
                      "mutability": "readWrite",
                      "caseExact": true,
                      "returned": "default",
                      "uniqueness": "none"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Schema 1234 not found",
                  "status": "404"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "status": "500"
                }
              }
            }
          }
        }
      }
    },
    "/ResourceTypes": {
      "get": {
        "tags": ["ResourceTypes"],
        "summary": "Get information about supported resource types",
        "operationId": "getResourceTypes",
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceTypesResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
                  "totalResults": 2,
                  "Resources": [
                    {
                      "schemas": ["urn:ietf:params:scim:schemas:core:2.0:ResourceType"],
                      "id": "User",
                      "name": "User",
                      "endpoint": "/Users",
                      "description": "User Account",
                      "schema": "urn:ietf:params:scim:schemas:core:2.0:User",
                      "meta": {
                        "location": "https://scim.trint.com/v2/ResourceTypes/User",
                        "resourceType": "ResourceType"
                      }
                    },
                    {
                      "schemas": ["urn:ietf:params:scim:schemas:core:2.0:ResourceType"],
                      "id": "Group",
                      "name": "Group",
                      "endpoint": "/Groups",
                      "description": "Group",
                      "schema": "urn:ietf:params:scim:schemas:core:2.0:Group",
                      "meta": {
                        "location": "https://scim.trint.com/v2/ResourceTypes/Group",
                        "resourceType": "ResourceType"
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — the access token is missing, expired or invalid.",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "status": "500"
                }
              }
            }
          }
        }
      }
    },
    "/ResourceTypes/{id}": {
      "get": {
        "tags": ["ResourceTypes"],
        "summary": "Get a resource type by Id",
        "operationId": "getResourceTypeById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "resourceType Id",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["User", "Group"]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceType"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:ResourceType"],
                  "id": "User",
                  "name": "User",
                  "endpoint": "/Users",
                  "description": "User Account",
                  "schema": "urn:ietf:params:scim:schemas:core:2.0:User",
                  "meta": {
                    "location": "https://scim.trint.com/v2/ResourceTypes/User",
                    "resourceType": "ResourceType"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Resource type 1234 not found",
                  "status": "404"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "status": "500"
                }
              }
            }
          }
        }
      }
    },
    "/Users": {
      "get": {
        "tags": ["User"],
        "summary": "Search or list users",
        "operationId": "searchUsersViaGet",
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "description": "Filter expression for querying a subset of resources",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startIndex",
            "in": "query",
            "description": "Start index (1-based)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Page size",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          },
          {
            "name": "attributes",
            "in": "query",
            "description": "SCIM defined attributes parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "excludedAttributes",
            "in": "query",
            "description": "SCIM defined excludedAttribute parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSearchResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
                  "itemsPerPage": 2,
                  "startIndex": 1,
                  "totalResults": 10,
                  "Resources": [
                    {
                      "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
                      "meta": {
                        "resourceType": "User",
                        "created": "2022-12-02T09:48:14.218Z",
                        "lastModified": "2022-12-02T09:48:14.678Z",
                        "location": "https://scim.trint.com/v2/Users/6784c3a4ed66dec96ffcf035"
                      },
                      "userName": "devtest1@trint.com",
                      "name": {
                        "givenName": "Dev",
                        "familyName": "Trint"
                      },
                      "active": true,
                      "id": "6784c3a4ed66dec96ffcf035",
                      "emails": []
                    },
                    {
                      "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
                      "meta": {
                        "resourceType": "User",
                        "created": "2022-12-02T09:48:14.218Z",
                        "lastModified": "2022-12-02T09:48:14.678Z",
                        "location": "https://scim.trint.com/v2/Users/6888f6f88ee1631c0f182be8"
                      },
                      "userName": "devtest2@trint.com",
                      "name": {
                        "givenName": "Dev",
                        "familyName": "Trint"
                      },
                      "active": true,
                      "id": "6888f6f88ee1631c0f182be8",
                      "emails": []
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "status": "400"
                }
              }
            }
          },
          "401": {
            "description": "Authorization failure",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Unauthorized",
                  "status": "401"
                }
              }
            }
          },
          "403": {
            "description": "Permissions denied",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Forbidden",
                  "status": "403"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "status": "500"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": ["User"],
        "summary": "Create a user",
        "operationId": "createUser",
        "parameters": [
          {
            "name": "attributes",
            "in": "query",
            "description": "SCIM defined attributes parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "excludedAttributes",
            "in": "query",
            "description": "SCIM defined excludedAttribute parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "requestBody": {
          "description": "A new user",
          "content": {
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/User"
              },
              "example": {
                "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
                "userName": "devtest@trint.com",
                "name": {
                  "formatted": "Dev Test",
                  "familyName": "Dev",
                  "givenName": "Test"
                },
                "emails": [
                  {
                    "type": "work",
                    "value": "devtest@trint.com",
                    "primary": true
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successfully created user",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
                  "active": true,
                  "externalId": "randomId",
                  "name": {
                    "formatted": "Dev Test",
                    "familyName": "Dev",
                    "givenName": "Test"
                  },
                  "emails": [
                    {
                      "type": "work",
                      "value": "devtest@trint.com",
                      "primary": true
                    }
                  ],
                  "userName": "devtest@trint.com"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "status": "400",
                  "detail": "Missing required attribute: userName. (errorId=c6cf0bde-2c6e-4b18-be71-80f8a46e1561)",
                  "scimType": "invalidValue"
                }
              }
            }
          },
          "401": {
            "description": "Authorization failure",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Unauthorized",
                  "status": "401"
                }
              }
            }
          },
          "403": {
            "description": "Permissions denied",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Forbidden",
                  "status": "403"
                }
              }
            }
          },
          "409": {
            "description": "Duplicate email",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "scimType": "uniqueness",
                  "detail": "User already exists in the database.",
                  "status": "409"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "status": "500"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/Users/.search": {
      "post": {
        "tags": ["User"],
        "summary": "Search or list users",
        "operationId": "searchUsersViaPost",
        "parameters": [
          {
            "name": "attributes",
            "in": "query",
            "description": "SCIM defined attributes parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "excludedAttributes",
            "in": "query",
            "description": "SCIM defined excludedAttribute parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "requestBody": {
          "description": "Search parameters",
          "content": {
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              },
              "example": {
                "count": 10,
                "filter": "userName eq \"devtest@trint.com\"",
                "schemas": ["urn:ietf:params:scim:api:messages:2.0:SearchRequest"],
                "startIndex": 2
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns a list of users",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSearchResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
                  "itemsPerPage": 2,
                  "startIndex": 1,
                  "totalResults": 10,
                  "Resources": [
                    {
                      "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
                      "meta": {
                        "resourceType": "User",
                        "created": "2022-12-02T09:48:14.218Z",
                        "lastModified": "2022-12-02T09:48:14.678Z",
                        "location": "https://scim.trint.com/v2/Users/6784c3a4ed66dec96ffcf035"
                      },
                      "userName": "devtest1@trint.com",
                      "name": {
                        "givenName": "Dev",
                        "familyName": "Trint"
                      },
                      "active": true,
                      "id": "6784c3a4ed66dec96ffcf035",
                      "emails": []
                    },
                    {
                      "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
                      "meta": {
                        "resourceType": "User",
                        "created": "2022-12-02T09:48:14.218Z",
                        "lastModified": "2022-12-02T09:48:14.678Z",
                        "location": "https://scim.trint.com/v2/Users/6888f6f88ee1631c0f182be8"
                      },
                      "userName": "devtest2@trint.com",
                      "name": {
                        "givenName": "Dev",
                        "familyName": "Trint"
                      },
                      "active": true,
                      "id": "6888f6f88ee1631c0f182be8",
                      "emails": []
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "scimType": "invalidFilter",
                  "detail": "Unsupported or invalid filter.",
                  "status": "400"
                }
              }
            }
          },
          "401": {
            "description": "Authorization failure",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Unauthorized",
                  "status": "401"
                }
              }
            }
          },
          "403": {
            "description": "Permissions denied",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Forbidden",
                  "status": "403"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/Users/{id}": {
      "get": {
        "tags": ["User"],
        "summary": "Get a user by Id",
        "operationId": "getUserById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "User Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attributes",
            "in": "query",
            "description": "SCIM defined attributes parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "excludedAttributes",
            "in": "query",
            "description": "SCIM defined excludedAttribute parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
                  "active": true,
                  "externalId": "randomId",
                  "name": {
                    "formatted": "Dev Test",
                    "familyName": "Dev",
                    "givenName": "Test"
                  },
                  "emails": [
                    {
                      "type": "work",
                      "value": "devtest@trint.com",
                      "primary": true
                    }
                  ],
                  "userName": "devtest@trint.com"
                }
              }
            }
          },
          "401": {
            "description": "Authorization failure",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Unauthorized",
                  "status": "401"
                }
              }
            }
          },
          "403": {
            "description": "Permissions denied",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Forbidden",
                  "status": "403"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "User not found",
                  "status": "404"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": ["User"],
        "summary": "Fully update/replace a user",
        "operationId": "replaceUser",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "User Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attributes",
            "in": "query",
            "description": "SCIM defined attributes parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "excludedAttributes",
            "in": "query",
            "description": "SCIM defined excludedAttribute parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "requestBody": {
          "description": "An existing user",
          "content": {
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/User"
              },
              "example": {
                "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
                "userName": "devtest@trint.com",
                "name": {
                  "formatted": "Dev Test",
                  "familyName": "Dev",
                  "givenName": "Test"
                },
                "emails": [
                  {
                    "type": "work",
                    "value": "devtest@trint.com",
                    "primary": true
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successfully fully updated a user",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
                  "userName": "devtest@trint.com",
                  "name": {
                    "formatted": "Dev Test",
                    "familyName": "Dev",
                    "givenName": "Test"
                  },
                  "emails": [
                    {
                      "type": "work",
                      "value": "devtest@trint.com",
                      "primary": true
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "scimType": "mutability",
                  "detail": "Attribute 'username' is immutable",
                  "status": "400"
                }
              }
            }
          },
          "401": {
            "description": "Authorization failure",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Unauthorized",
                  "status": "401"
                }
              }
            }
          },
          "403": {
            "description": "Permissions denied",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Forbidden",
                  "status": "403"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "User not found",
                  "status": "404"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "delete": {
        "tags": ["User"],
        "summary": "Delete a user",
        "operationId": "deleteUser",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "User Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successfully deleted",
            "content": {}
          },
          "401": {
            "description": "Authorization failure",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Unauthorized",
                  "status": "401"
                }
              }
            }
          },
          "403": {
            "description": "Permissions denied",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Forbidden",
                  "status": "403"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "User not found",
                  "status": "404"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": ["User"],
        "summary": "Partially update/patch a user",
        "operationId": "patchUser",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "User Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Patch operations list",
          "content": {
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/Patch"
              },
              "example": {
                "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
                "Operations": [
                  {
                    "op": "add",
                    "path": "emails",
                    "value": {
                      "value": "trintdev@trint.com",
                      "primary": true,
                      "type": "work"
                    }
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successfully partially updated user",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
                  "active": true,
                  "externalId": "randomId",
                  "name": {
                    "formatted": "Dev Test",
                    "familyName": "Dev",
                    "givenName": "Test"
                  },
                  "emails": [
                    {
                      "type": "work",
                      "value": "trintdev@trint.com",
                      "primary": true
                    }
                  ],
                  "userName": "devtest@trint.com"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Encountered a filter with no matching records",
                  "scimType": "noTarget",
                  "status": "400"
                }
              }
            }
          },
          "401": {
            "description": "Authorization failure",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Unauthorized",
                  "status": "401"
                }
              }
            }
          },
          "403": {
            "description": "Permissions denied",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Forbidden",
                  "status": "403"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "User not found",
                  "status": "404"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/Groups": {
      "get": {
        "tags": ["Group"],
        "summary": "Search or list groups",
        "operationId": "searchGroupsViaGet",
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "description": "Filter expression for querying a subset of resources",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startIndex",
            "in": "query",
            "description": "Start index (1-based)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Page size",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          },
          {
            "name": "attributes",
            "in": "query",
            "description": "SCIM defined attributes parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "excludedAttributes",
            "in": "query",
            "description": "SCIM defined excludedAttribute parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupSearchResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
                  "itemsPerPage": 20,
                  "startIndex": 1,
                  "totalResults": 3,
                  "Resources": [
                    {
                      "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
                      "meta": {
                        "resourceType": "Group",
                        "created": "2022-05-23T13:03:03.560Z",
                        "lastModified": "2022-09-02T12:26:47.925Z",
                        "location": "https://scim.trint.com/v2/Groups/W6bfHfS1V4ykw2hHCat_IU"
                      },
                      "displayName": "Dev Team 1",
                      "id": "W6bfHfS1V4ykw2hHCat_IU",
                      "members": [
                        {
                          "value": "67e0f592c3f5f7ea18041f35",
                          "type": "User"
                        },
                        {
                          "value": "6865cad45eb9190d5ecee995",
                          "type": "User"
                        }
                      ]
                    },
                    {
                      "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
                      "meta": {
                        "resourceType": "Group",
                        "created": "2022-05-23T13:03:11.257Z",
                        "lastModified": "2022-09-08T11:26:44.473Z",
                        "location": "https://scim.trint.com/v2/Groups/2SXGk4r-MwuuEsXKAxSDmu"
                      },
                      "displayName": "Dev Team 2",
                      "id": "2SXGk4r-MwuuEsXKAxSDmu",
                      "members": [
                        {
                          "value": "67a0d43daf33fdaa97de74a4",
                          "type": "User"
                        },
                        {
                          "value": "6887b33ea49859f50764ef70",
                          "type": "User"
                        }
                      ]
                    },
                    {
                      "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
                      "meta": {
                        "resourceType": "Group",
                        "created": "2023-01-10T11:56:20.368Z",
                        "lastModified": "2023-01-10T11:56:20.368Z",
                        "location": "https://scim.trint.com/v2/Groups/rYsTOasl8GzYVFLJAE1uBw"
                      },
                      "displayName": "Dev Team 3",
                      "id": "rYsTOasl8GzYVFLJAE1uBw",
                      "members": []
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authorization failure",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Unauthorized",
                  "status": "401"
                }
              }
            }
          },
          "403": {
            "description": "Permissions denied",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Forbidden",
                  "status": "403"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": ["Group"],
        "summary": "Create a group",
        "operationId": "createGroup",
        "parameters": [
          {
            "name": "attributes",
            "in": "query",
            "description": "SCIM defined attributes parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "excludedAttributes",
            "in": "query",
            "description": "SCIM defined excludedAttribute parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "requestBody": {
          "description": "A new group without 'id'",
          "content": {
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/Group"
              },
              "example": {
                "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
                "displayName": "Dev Team",
                "members": [
                  {
                    "value": "67a0d43daf33fdaa97de74a4"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successfully created group",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
                  "displayName": "Dev Team",
                  "members": [
                    {
                      "value": "67a0d43daf33fdaa97de74a4"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Users not found: 67a0d43daf33fdaa97de74a4",
                  "scimType": "invalidValue",
                  "status": "400"
                }
              }
            }
          },
          "401": {
            "description": "Authorization failure",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Unauthorized",
                  "status": "401"
                }
              }
            }
          },
          "403": {
            "description": "Permissions denied",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Forbidden",
                  "status": "403"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/Groups/.search": {
      "post": {
        "tags": ["Group"],
        "summary": "Search or list groups",
        "operationId": "searchGroupsViaPost",
        "parameters": [
          {
            "name": "attributes",
            "in": "query",
            "description": "SCIM defined attributes parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "excludedAttributes",
            "in": "query",
            "description": "SCIM defined excludedAttribute parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "requestBody": {
          "description": "Search parameters",
          "content": {
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              },
              "example": {
                "count": 10,
                "filter": "displayName eq \"Group 1\"",
                "schemas": ["urn:ietf:params:scim:api:messages:2.0:SearchRequest"],
                "startIndex": 2
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns a list of users",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupSearchResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
                  "itemsPerPage": 20,
                  "startIndex": 1,
                  "totalResults": 3,
                  "Resources": [
                    {
                      "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
                      "meta": {
                        "resourceType": "Group",
                        "created": "2022-05-23T13:03:03.560Z",
                        "lastModified": "2022-09-02T12:26:47.925Z",
                        "location": "https://scim.trint.com/v2/Groups/W6bfHfS1V4ykw2hHCat_IU"
                      },
                      "displayName": "Dev Team 1",
                      "id": "W6bfHfS1V4ykw2hHCat_IU",
                      "members": [
                        {
                          "value": "67e0f592c3f5f7ea18041f35",
                          "type": "User"
                        },
                        {
                          "value": "6865cad45eb9190d5ecee995",
                          "type": "User"
                        }
                      ]
                    },
                    {
                      "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
                      "meta": {
                        "resourceType": "Group",
                        "created": "2022-05-23T13:03:11.257Z",
                        "lastModified": "2022-09-08T11:26:44.473Z",
                        "location": "https://scim.trint.com/v2/Groups/2SXGk4r-MwuuEsXKAxSDmu"
                      },
                      "displayName": "Dev Team 2",
                      "id": "2SXGk4r-MwuuEsXKAxSDmu",
                      "members": [
                        {
                          "value": "67a0d43daf33fdaa97de74a4",
                          "type": "User"
                        },
                        {
                          "value": "6887b33ea49859f50764ef70",
                          "type": "User"
                        }
                      ]
                    },
                    {
                      "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
                      "meta": {
                        "resourceType": "Group",
                        "created": "2023-01-10T11:56:20.368Z",
                        "lastModified": "2023-01-10T11:56:20.368Z",
                        "location": "https://scim.trint.com/v2/Groups/rYsTOasl8GzYVFLJAE1uBw"
                      },
                      "displayName": "Dev Team 3",
                      "id": "rYsTOasl8GzYVFLJAE1uBw",
                      "members": []
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "scimType": "invalidFilter",
                  "detail": "Unsupported or invalid filter.",
                  "status": "400"
                }
              }
            }
          },
          "401": {
            "description": "Authorization failure",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Unauthorized",
                  "status": "401"
                }
              }
            }
          },
          "403": {
            "description": "Permissions denied",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Forbidden",
                  "status": "403"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Groups/{id}": {
      "get": {
        "tags": ["Group"],
        "summary": "Get a group by Id",
        "operationId": "getGroupById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Group Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attributes",
            "in": "query",
            "description": "SCIM defined attributes parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "excludedAttributes",
            "in": "query",
            "description": "SCIM defined excludedAttribute parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
                  "meta": {
                    "resourceType": "Group",
                    "created": "2022-09-06T08:07:48.313Z",
                    "lastModified": "2023-01-13T10:22:47.834Z",
                    "location": "https://scim.trint.com/v2/Groups/LH3Mr1nxKI-824c4MlfQi4"
                  },
                  "displayName": "Dev Team",
                  "id": "LH3Mr1nxKI-824c4MlfQi4",
                  "members": [
                    {
                      "value": "67a0d43daf33fdaa97de74a4"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authorization failure",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Unauthorized",
                  "status": "401"
                }
              }
            }
          },
          "403": {
            "description": "Permissions denied",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Forbidden",
                  "status": "403"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Group abc123 not found",
                  "status": "404"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": ["Group"],
        "summary": "Fully update/replace a group",
        "operationId": "replaceGroup",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Group Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attributes",
            "in": "query",
            "description": "SCIM defined attributes parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "excludedAttributes",
            "in": "query",
            "description": "SCIM defined excludedAttribute parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "requestBody": {
          "description": "An existing group",
          "content": {
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/Group"
              },
              "example": {
                "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
                "displayName": "Dev Team",
                "id": "LH3Mr1nxKI-824c4MlfQi4",
                "members": [
                  {
                    "value": "67a0d43daf33fdaa97de74a4"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successfully fully updated a group",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
                  "displayName": "Dev Team",
                  "id": "LH3Mr1nxKI-824c4MlfQi4",
                  "members": [
                    {
                      "value": "67a0d43daf33fdaa97de74a4"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "scimType": "invalidValue",
                  "detail": "User not found: 67a0d43daf33fdaa97de74a4",
                  "status": "400"
                }
              }
            }
          },
          "401": {
            "description": "Authorization failure",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Unauthorized",
                  "status": "401"
                }
              }
            }
          },
          "403": {
            "description": "Permissions denied",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Forbidden",
                  "status": "403"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Group abc123 not found",
                  "status": "404"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "delete": {
        "tags": ["Group"],
        "summary": "Delete a group",
        "operationId": "deleteGroup",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Group Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successfully deleted",
            "content": {}
          },
          "401": {
            "description": "Authorization failure",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Unauthorized",
                  "status": "401"
                }
              }
            }
          },
          "403": {
            "description": "Permissions denied",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Forbidden",
                  "status": "403"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Group abc123 not found",
                  "status": "404"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": ["Group"],
        "summary": "Partially update/patch a group",
        "operationId": "patchGroup",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Group Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attributes",
            "in": "query",
            "description": "SCIM defined attributes parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "excludedAttributes",
            "in": "query",
            "description": "SCIM defined excludedAttribute parameter.",
            "style": "form",
            "explode": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "requestBody": {
          "description": "Patch operations list",
          "content": {
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/Patch"
              },
              "example": {
                "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
                "Operations": [
                  {
                    "op": "replace",
                    "value": {
                      "displayName": "new group name"
                    }
                  },
                  {
                    "op": "add",
                    "path": "members",
                    "value": [
                      {
                        "value": "6851843b2317ea67b7a9a28b"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successfully fully updated a group",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
                  "displayName": "Dev Team",
                  "id": "LH3Mr1nxKI-824c4MlfQi4",
                  "members": [
                    {
                      "value": "67a0d43daf33fdaa97de74a4"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "scimType": "noTarget",
                  "detail": "Encountered a filter with no matching records’",
                  "status": "400"
                }
              }
            }
          },
          "401": {
            "description": "Authorization failure",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Unauthorized",
                  "status": "401"
                }
              }
            }
          },
          "403": {
            "description": "Permissions denied",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Forbidden",
                  "status": "403"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
                  "detail": "Group abc123 not found",
                  "status": "404"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    }
  },
  "components": {
    "schemas": {
      "AuthenticationScheme": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "documentationUrl": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "specUrl": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "The authentication scheme type.",
            "enum": ["httpbasic", "oauth2", "oauthbearertoken", "httpdigest"]
          },
          "primary": {
            "type": "boolean",
            "description": "Whether this is the primary authentication scheme.",
            "default": false
          }
        }
      },
      "Email": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": ["work", "home", "other"]
          },
          "value": {
            "type": "string"
          },
          "primary": {
            "type": "boolean"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "string",
            "description": "Detail error message"
          },
          "schemas": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["urn:ietf:params:scim:api:messages:2.0:Error"]
            }
          },
          "scimType": {
            "type": "string",
            "description": "Bad request type when status code is 400",
            "enum": [
              "uniqueness",
              "tooMany",
              "mutability",
              "sensitive",
              "invalidSyntax",
              "invalidFilter",
              "invalidPath",
              "invalidValue",
              "invalidVers",
              "noTarget"
            ]
          },
          "status": {
            "type": "string",
            "description": "Same as HTTP status code, e.g. 400, 401, etc."
          }
        }
      },
      "FilterSupported": {
        "type": "object",
        "properties": {
          "maxResults": {
            "type": "integer",
            "format": "int32"
          },
          "supported": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "Meta": {
        "type": "object",
        "properties": {
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "lastModified": {
            "type": "string",
            "format": "date-time"
          },
          "location": {
            "type": "string",
            "description": "Resource location URI"
          },
          "resourceType": {
            "type": "string",
            "enum": ["User", "Group", "ServiceProviderConfig", "ResourceType", "Schema"]
          }
        },
        "description": "Resource metadata"
      },
      "Name": {
        "required": ["familyName", "givenName"],
        "type": "object",
        "properties": {
          "familyName": {
            "type": "string"
          },
          "givenName": {
            "type": "string"
          },
          "formatted": {
            "type": "string",
            "description": "The full name, formatted for display."
          }
        }
      },
      "Member": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "User Id of the group member"
          },
          "$ref": {
            "type": "string",
            "description": "The URI corresponding to a SCIM User resource that is a member of this Group."
          },
          "type": {
            "type": "string",
            "enum": ["User"]
          }
        }
      },
      "PatchOperation": {
        "required": ["op"],
        "type": "object",
        "properties": {
          "op": {
            "type": "string",
            "enum": ["add", "replace", "remove"]
          },
          "path": {
            "type": "string"
          },
          "value": {
            "description": "The value to apply, corresponding to the field named by `path`. May be a scalar, an object, or an array of objects depending on the target attribute."
          }
        }
      },
      "SearchRequest": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Page size",
            "format": "int32"
          },
          "filter": {
            "type": "string",
            "description": "Only supported for /User and /Group endpoints"
          },
          "schemas": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["urn:ietf:params:scim:api:messages:2.0:SearchRequest"]
            }
          },
          "startIndex": {
            "type": "integer",
            "description": "Start index (1-based)",
            "format": "int32"
          }
        }
      },
      "ServiceProviderConfig": {
        "type": "object",
        "properties": {
          "authenticationSchemes": {
            "type": "array",
            "description": "The authentication schemes supported by the SCIM service provider.",
            "items": {
              "$ref": "#/components/schemas/AuthenticationScheme"
            }
          },
          "filter": {
            "$ref": "#/components/schemas/FilterSupported"
          },
          "patch": {
            "$ref": "#/components/schemas/Supported"
          },
          "schemas": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig"]
            }
          },
          "bulk": {
            "$ref": "#/components/schemas/BulkSupported"
          },
          "changePassword": {
            "$ref": "#/components/schemas/Supported"
          },
          "sort": {
            "$ref": "#/components/schemas/Supported"
          },
          "etag": {
            "$ref": "#/components/schemas/Supported"
          },
          "documentationUri": {
            "type": "string",
            "description": "URL of the human-readable documentation for this SCIM service provider."
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "Supported": {
        "type": "object",
        "properties": {
          "supported": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "User": {
        "required": ["name", "schemas", "userName"],
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean",
            "description": "User status",
            "default": false
          },
          "emails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Email"
            }
          },
          "externalId": {
            "type": "string",
            "description": "External unique resource Id defined by provisioning client"
          },
          "id": {
            "type": "string",
            "description": "Unique resource Id"
          },
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "schemas": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["urn:ietf:params:scim:schemas:core:2.0:User"]
            }
          },
          "userName": {
            "type": "string",
            "description": "MUST be an email address"
          }
        }
      },
      "UserResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/User"
          },
          {
            "type": "object",
            "properties": {
              "meta": {
                "$ref": "#/components/schemas/Meta"
              }
            }
          }
        ]
      },
      "UserSearchResponse": {
        "type": "object",
        "properties": {
          "Resources": {
            "type": "array",
            "description": "User list",
            "items": {
              "$ref": "#/components/schemas/UserResponse"
            }
          },
          "itemsPerPage": {
            "type": "integer",
            "format": "int64"
          },
          "schemas": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"]
            }
          },
          "startIndex": {
            "type": "integer",
            "format": "int64"
          },
          "totalResults": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "Patch": {
        "required": ["Operations", "schemas"],
        "type": "object",
        "properties": {
          "Operations": {
            "type": "array",
            "description": "Patch operations list",
            "items": {
              "$ref": "#/components/schemas/PatchOperation"
            }
          },
          "schemas": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"]
            }
          }
        }
      },
      "Group": {
        "required": ["displayName", "schemas"],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique resource Id"
          },
          "displayName": {
            "type": "string",
            "description": "Name of the group"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Member"
            }
          },
          "schemas": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["urn:ietf:params:scim:schemas:core:2.0:Group"]
            }
          }
        }
      },
      "GroupResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Group"
          },
          {
            "type": "object",
            "properties": {
              "meta": {
                "$ref": "#/components/schemas/Meta"
              }
            }
          }
        ]
      },
      "GroupSearchResponse": {
        "type": "object",
        "properties": {
          "Resources": {
            "type": "array",
            "description": "Group list",
            "items": {
              "$ref": "#/components/schemas/GroupResponse"
            }
          },
          "itemsPerPage": {
            "type": "integer",
            "format": "int64"
          },
          "schemas": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"]
            }
          },
          "startIndex": {
            "type": "integer",
            "format": "int64"
          },
          "totalResults": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "Attribute": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": ["string", "boolean", "decimal", "integer", "dateTime", "reference", "complex"]
          },
          "subAttributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attribute"
            }
          },
          "multiValued": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "canonicalValues": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "caseExact": {
            "type": "boolean"
          },
          "mutability": {
            "type": "string",
            "enum": ["readOnly", "readWrite", "immutable", "writeOnly"]
          },
          "returned": {
            "type": "string",
            "enum": ["always", "never", "default", "request"]
          },
          "uniqueness": {
            "type": "string",
            "enum": ["none", "server", "global"]
          },
          "referenceTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["User", "Group", "external", "uri"]
            }
          }
        }
      },
      "ResourceSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attribute"
            }
          },
          "schemas": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["urn:ietf:params:scim:schemas:core:2.0:Schema"]
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "ListSchemasResponse": {
        "type": "object",
        "properties": {
          "Resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceSchema"
            }
          },
          "totalResults": {
            "type": "integer",
            "format": "int64"
          },
          "schemas": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"]
            }
          }
        }
      },
      "ResourceType": {
        "type": "object",
        "properties": {
          "schemas": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["urn:ietf:params:scim:schemas:core:2.0:ResourceType"]
            }
          },
          "id": {
            "type": "string",
            "enum": ["User", "Group"]
          },
          "name": {
            "type": "string",
            "enum": ["User", "Group"]
          },
          "endpoint": {
            "type": "string",
            "enum": ["/Users", "/Groups"]
          },
          "description": {
            "type": "string"
          },
          "schema": {
            "type": "string",
            "enum": [
              "urn:ietf:params:scim:schemas:core:2.0:User",
              "urn:ietf:params:scim:schemas:core:2.0:Group"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "location": {
                "type": "string"
              },
              "resourceType": {
                "type": "string",
                "enum": ["ResourceType"]
              }
            }
          }
        }
      },
      "ResourceTypesResponse": {
        "type": "object",
        "properties": {
          "Resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceType"
            }
          },
          "totalResults": {
            "type": "integer",
            "format": "int64"
          },
          "schemas": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"]
            }
          }
        }
      },
      "BulkSupported": {
        "type": "object",
        "description": "Bulk operation support. Trint does not currently support SCIM bulk operations.",
        "properties": {
          "supported": {
            "type": "boolean",
            "default": false
          },
          "maxPayloadSize": {
            "type": "integer",
            "format": "int32"
          },
          "maxOperations": {
            "type": "integer",
            "format": "int32"
          }
        }
      }
    },
    "securitySchemes": {
      "oAuth2US": {
        "type": "oauth2",
        "description": "OAuth 2.0 via the US authorization server. Audience: `https://apis.trint.com/scim-api`.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://auth.trint.com/authorize",
            "tokenUrl": "https://auth.trint.com/oauth/token",
            "refreshUrl": "https://auth.trint.com/oauth/token",
            "scopes": {
              "https://apis.trint.com/scim-api/provisioning": "Provision and manage users and groups via SCIM.",
              "offline_access": "Obtain a refresh token for long-lived provisioning."
            }
          }
        }
      },
      "oAuth2EU": {
        "type": "oauth2",
        "description": "OAuth 2.0 via the EU authorization server. Audience: `https://apis.trint.com/scim-api`.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://auth.eu.trint.com/authorize",
            "tokenUrl": "https://auth.eu.trint.com/oauth/token",
            "refreshUrl": "https://auth.eu.trint.com/oauth/token",
            "scopes": {
              "https://apis.trint.com/scim-api/provisioning": "Provision and manage users and groups via SCIM.",
              "offline_access": "Obtain a refresh token for long-lived provisioning."
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "oAuth2US": ["https://apis.trint.com/scim-api/provisioning", "offline_access"]
    },
    {
      "oAuth2EU": ["https://apis.trint.com/scim-api/provisioning", "offline_access"]
    }
  ]
}
