{
  "openapi": "3.1.0",
  "info": {
    "title": "Presence SCIM 2.0",
    "version": "3.9.0",
    "description": "Company directory provisioning. Scoped service credentials; no access to private accounts or Keys. See /integrations.html for supported mappings and lifecycle behavior."
  },
  "servers": [
    {
      "url": "https://presence.by4si.com/scim/v2"
    }
  ],
  "security": [
    {
      "serviceKey": []
    }
  ],
  "components": {
    "securitySchemes": {
      "serviceKey": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "schemas",
          "status",
          "detail"
        ],
        "properties": {
          "schemas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "scimType": {
            "type": "string"
          }
        }
      }
    }
  },
  "paths": {
    "/Users": {
      "get": {
        "summary": "GET Users",
        "x-required-scopes": [
          "scim:read"
        ],
        "responses": {
          "200": {
            "description": "SCIM resource, list or empty deletion response"
          },
          "default": {
            "description": "SCIM error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startIndex",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100
            }
          },
          {
            "name": "attributes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "excludedAttributes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST Users",
        "x-required-scopes": [
          "scim:write"
        ],
        "responses": {
          "201": {
            "description": "SCIM resource, list or empty deletion response"
          },
          "default": {
            "description": "SCIM error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/scim+json": {
              "schema": {
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/Users/{id}": {
      "get": {
        "summary": "GET Users/{id}",
        "x-required-scopes": [
          "scim:read"
        ],
        "responses": {
          "200": {
            "description": "SCIM resource, list or empty deletion response"
          },
          "default": {
            "description": "SCIM error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "summary": "PUT Users/{id}",
        "x-required-scopes": [
          "scim:write"
        ],
        "responses": {
          "200": {
            "description": "SCIM resource, list or empty deletion response"
          },
          "default": {
            "description": "SCIM error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Optional weak ETag from the latest GET"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/scim+json": {
              "schema": {
                "type": "object"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "PATCH Users/{id}",
        "x-required-scopes": [
          "scim:write"
        ],
        "responses": {
          "200": {
            "description": "SCIM resource, list or empty deletion response"
          },
          "default": {
            "description": "SCIM error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Optional weak ETag from the latest GET"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/scim+json": {
              "schema": {
                "type": "object"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "DELETE Users/{id}",
        "x-required-scopes": [
          "scim:write"
        ],
        "responses": {
          "204": {
            "description": "SCIM resource, list or empty deletion response"
          },
          "default": {
            "description": "SCIM error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Optional weak ETag from the latest GET"
          }
        ]
      }
    },
    "/Groups": {
      "get": {
        "summary": "GET Groups",
        "x-required-scopes": [
          "scim:read"
        ],
        "responses": {
          "200": {
            "description": "SCIM resource, list or empty deletion response"
          },
          "default": {
            "description": "SCIM error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startIndex",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100
            }
          },
          {
            "name": "attributes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "excludedAttributes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST Groups",
        "x-required-scopes": [
          "scim:write"
        ],
        "responses": {
          "201": {
            "description": "SCIM resource, list or empty deletion response"
          },
          "default": {
            "description": "SCIM error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/scim+json": {
              "schema": {
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/Groups/{id}": {
      "get": {
        "summary": "GET Groups/{id}",
        "x-required-scopes": [
          "scim:read"
        ],
        "responses": {
          "200": {
            "description": "SCIM resource, list or empty deletion response"
          },
          "default": {
            "description": "SCIM error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "summary": "PUT Groups/{id}",
        "x-required-scopes": [
          "scim:write"
        ],
        "responses": {
          "200": {
            "description": "SCIM resource, list or empty deletion response"
          },
          "default": {
            "description": "SCIM error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Optional weak ETag from the latest GET"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/scim+json": {
              "schema": {
                "type": "object"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "PATCH Groups/{id}",
        "x-required-scopes": [
          "scim:write"
        ],
        "responses": {
          "200": {
            "description": "SCIM resource, list or empty deletion response"
          },
          "default": {
            "description": "SCIM error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Optional weak ETag from the latest GET"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/scim+json": {
              "schema": {
                "type": "object"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "DELETE Groups/{id}",
        "x-required-scopes": [
          "scim:write"
        ],
        "responses": {
          "204": {
            "description": "SCIM resource, list or empty deletion response"
          },
          "default": {
            "description": "SCIM error",
            "content": {
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Optional weak ETag from the latest GET"
          }
        ]
      }
    },
    "/ServiceProviderConfig": {
      "get": {
        "summary": "ServiceProviderConfig",
        "x-required-scopes": [
          "scim:read"
        ],
        "responses": {
          "200": {
            "description": "SCIM capabilities and supported schema"
          }
        }
      }
    },
    "/Schemas": {
      "get": {
        "summary": "Schemas",
        "x-required-scopes": [
          "scim:read"
        ],
        "responses": {
          "200": {
            "description": "SCIM capabilities and supported schema"
          }
        }
      }
    },
    "/ResourceTypes": {
      "get": {
        "summary": "ResourceTypes",
        "x-required-scopes": [
          "scim:read"
        ],
        "responses": {
          "200": {
            "description": "SCIM capabilities and supported schema"
          }
        }
      }
    }
  }
}
