x-generator: NSwag v13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))
swagger: '2.0'
info:
  title: Absorb SCIM API
  version: v2
consumes:
  - application/json
produces:
  - application/json
paths:
  /scim/v2/Groups/{id}:
    get:
      tags:
        - Groups
      summary: Endpoint to retrieve a SCIM group by ID.
      operationId: Groups_GetGroup
      parameters:
        - type: object
          name: filter
          in: query
          description: The filter for the query request.
          x-schema:
            $ref: '#/definitions/PathFilterExpression'
          x-nullable: true
        - type: string
          name: sortBy
          in: query
          description: Specify the attribute to sort the response by.
          x-nullable: true
        - type: string
          name: sortOrder
          in: query
          description: Specify the order to sort the response by.
          x-schema:
            $ref: '#/definitions/SortOrder'
          x-nullable: false
          enum:
            - Ascending
            - Descending
        - type: integer
          name: startIndex
          in: query
          description: Specify the index to start the response from.
          format: int32
          x-nullable: false
        - type: integer
          name: count
          in: query
          description: Specify how many results to return.
          format: int32
          x-nullable: false
        - type: array
          name: attributes
          in: query
          description: The list of attributes to include in the response.
          collectionFormat: multi
          x-nullable: true
          items:
            type: string
        - type: array
          name: excludedAttributes
          in: query
          description: The list of attributes to exclude from the response.
          collectionFormat: multi
          x-nullable: true
          items:
            type: string
        - type: string
          name: id
          in: path
          required: true
          description: Group Identifier.
          format: guid
          x-nullable: false
      responses:
        '200':
          x-nullable: false
          description: Single SCIM Group.
          schema:
            $ref: '#/definitions/GroupResponse'
        '404':
          x-nullable: false
          description: The group with the given ID does not exist.
          schema:
            $ref: '#/definitions/ErrorResponse'
    delete:
      tags:
        - Groups
      summary: Deletes an existing SCIM group by ID.
      description: This is soft delete.
      operationId: Groups_DeleteGroup
      parameters:
        - type: string
          name: id
          in: path
          required: true
          description: Group Identifier.
          format: guid
          x-nullable: false
      responses:
        '204':
          description: ''
        '403':
          x-nullable: false
          description: User has no permissions to remove a group.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '404':
          x-nullable: false
          description: The group with the given ID does not exist.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '409':
          x-nullable: false
          description: The group couldn't  be removed, because it has assigned users.
          schema:
            $ref: '#/definitions/ErrorResponse'
    put:
      tags:
        - Groups
      summary: Updates an existing SCIM group by ID.
      description: >-
        Clients that want to override a server's defaults MAY specify "null" for
        a single-valued attribute, or an empty array "[]" for a

        multivalued attribute, to clear all values.
      operationId: Groups_PutGroup
      parameters:
        - type: string
          name: id
          in: path
          required: true
          description: The id of group to be updated
          format: guid
          x-nullable: false
        - name: requestBody
          in: body
          description: The request body to update the given group.
          schema:
            $ref: '#/definitions/UpdateGroupRequestBody'
          x-nullable: true
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            $ref: '#/definitions/GroupResponse'
        '400':
          x-nullable: false
          description: Invalid values passed.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '409':
          x-nullable: false
          description: >-
            Invalid values passed or request body id doesn't match request uri
            id.
          schema:
            $ref: '#/definitions/ErrorResponse'
    patch:
      tags:
        - Groups
      summary: Updates an existing SCIM group by ID via PATCH operations.
      operationId: Groups_PatchGroup
      parameters:
        - type: string
          name: id
          in: path
          required: true
          description: The group's ID.
          format: guid
          x-nullable: false
        - type: array
          name: attributes
          in: query
          description: The list of attributes to include in the response.
          collectionFormat: multi
          x-nullable: true
          items:
            type: string
        - type: array
          name: excludedAttributes
          in: query
          description: The list of attributes to exclude from the response.
          collectionFormat: multi
          x-nullable: true
          items:
            type: string
        - name: requestBody
          in: body
          description: The list of patch operations to perform.
          schema:
            $ref: '#/definitions/ScimPatchRequestOfUpdateGroupRequestBody'
          x-nullable: true
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            $ref: '#/definitions/GroupResponse'
        '400':
          x-nullable: false
          description: Invalid values passed.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '404':
          x-nullable: false
          description: The group with the given ID does not exist.
          schema:
            $ref: '#/definitions/ErrorResponse'
  /scim/v2/Groups:
    get:
      tags:
        - Groups
      summary: Endpoint to retrieve a List of SCIM groups.
      operationId: Groups_GetGroups
      parameters:
        - type: object
          name: filter
          in: query
          description: The filter for the query request.
          x-schema:
            $ref: '#/definitions/PathFilterExpression'
          x-nullable: true
        - type: string
          name: sortBy
          in: query
          description: Specify the attribute to sort the response by.
          x-nullable: true
        - type: string
          name: sortOrder
          in: query
          description: Specify the order to sort the response by.
          x-schema:
            $ref: '#/definitions/SortOrder'
          x-nullable: false
          enum:
            - Ascending
            - Descending
        - type: integer
          name: startIndex
          in: query
          description: Specify the index to start the response from.
          format: int32
          x-nullable: false
        - type: integer
          name: count
          in: query
          description: Specify how many results to return.
          format: int32
          x-nullable: false
        - type: array
          name: attributes
          in: query
          description: The list of attributes to include in the response.
          collectionFormat: multi
          x-nullable: true
          items:
            type: string
        - type: array
          name: excludedAttributes
          in: query
          description: The list of attributes to exclude from the response.
          collectionFormat: multi
          x-nullable: true
          items:
            type: string
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            $ref: '#/definitions/ListResponseOfGroupResponse'
        '400':
          x-nullable: false
          description: ''
          schema:
            $ref: '#/definitions/ErrorResponse'
    post:
      tags:
        - Groups
      summary: Create a new SCIM Group.
      operationId: Groups_PostGroup
      parameters:
        - name: request
          in: body
          description: The SCIM Group.
          schema:
            $ref: '#/definitions/PostGroupRequest'
          x-nullable: true
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            $ref: '#/definitions/GroupResponse'
        '400':
          x-nullable: false
          description: The request parameter are invalid.
          schema:
            $ref: '#/definitions/ErrorResponse'
definitions:
  GroupResponse:
    type: object
    description: Resource for a group.
    properties:
      schemas:
        type: array
        description: Group schemas.
        items:
          type: string
      id:
        type: string
        description: >-
          A unique identifier for a SCIM resource as defined by the service
          provider.
        format: guid
      externalId:
        type: string
        description: >-
          A String that is an identifier for the resource as defined by the
          provisioning client.
      displayName:
        type: string
        description: The display name of the group.
      members:
        type: array
        description: Members of the group.
        items:
          $ref: '#/definitions/MemberResponse'
      meta:
        description: 'Attribute containing resource metadata.  '
        allOf:
          - $ref: '#/definitions/MetaResponse'
  MemberResponse:
    type: object
    description: Resource for a group member.
    properties:
      display:
        type: string
        description: User friendly display value.
      value:
        type: string
        description: The Attribute Value.
        format: guid
      $ref:
        type: string
        description: The Ref field is used as a URI reference to an external resource.
        format: uri
      type:
        description: The label indicating the attribute's function.
        allOf:
          - $ref: '#/definitions/MemberType'
  MemberType:
    type: string
    description: Member type of resource.
    x-enumNames:
      - User
      - Group
    enum:
      - User
      - Group
  MetaResponse:
    type: object
    description: MetaResponse is a complex attribute containing resource metadata
    properties:
      resourceType:
        description: The name of the resource type of the resource.
        allOf:
          - $ref: '#/definitions/ResourceType'
      created:
        type: string
        description: |-
          The "DateTime" that the resource was added to the service.
          provider
        format: date-time
      lastModified:
        type: string
        description: >-
          The most recent DateTime that the details of this resource were
          updated at the service provider.
        format: date-time
      location:
        type: string
        description: The URI of the resource being returned.
        format: uri
  ResourceType:
    type: string
    description: SCIM Type of Resource.
    x-enumNames:
      - User
      - Group
    enum:
      - User
      - Group
  ErrorResponse:
    type: object
    description: Represents a SCIM error resource.
    properties:
      schemas:
        type: array
        description: The response schemas.
        items:
          type: string
      status:
        type: string
        description: The HTTP status code.
      scimType:
        description: A SCIM detail error keyword
        allOf:
          - $ref: '#/definitions/ScimErrorType'
      detail:
        type: string
        description: The detail of the error.
  ScimErrorType:
    type: string
    description: An enumeration of possible SCIM error types.
    x-enumNames:
      - invalidFilter
      - tooMany
      - uniqueness
      - mutability
      - invalidSyntax
      - invalidPath
      - noTarget
      - invalidValue
      - invalidVers
      - sensitive
    enum:
      - invalidFilter
      - tooMany
      - uniqueness
      - mutability
      - invalidSyntax
      - invalidPath
      - noTarget
      - invalidValue
      - invalidVers
      - sensitive
  PathFilterExpression:
    type: object
    required:
      - PathDivider
    properties:
      Path:
        type: string
      Filter:
        type: string
      PathDivider:
        type: string
  SortOrder:
    type: string
    description: An enumeration for the sort order of a query.
    x-enumNames:
      - Ascending
      - Descending
    enum:
      - Ascending
      - Descending
  ListResponseOfGroupResponse:
    type: object
    description: The SCIM response for paginated list requests.
    properties:
      schemas:
        type: array
        description: The response schemas.
        items:
          type: string
      totalResults:
        type: integer
        description: The total number of results returned.
        format: int32
      startIndex:
        type: integer
        description: >-
          The 1-based index of the first result in the current set of search
          results.
        format: int32
      itemsPerPage:
        type: integer
        description: The number of results returned on a page.
        format: int32
      Resources:
        type: array
        description: The list of returned resources.
        items:
          $ref: '#/definitions/GroupResponse'
  UpdateGroupRequestBody:
    type: object
    description: The body of a Group update request.
    required:
      - displayName
    properties:
      schemas:
        type: array
        description: Group schemas.
        items:
          type: string
      id:
        type: string
        description: ID of resource.
        format: guid
      externalId:
        type: string
        description: >-
          A String that is an identifier for the resource as defined by the
          provisioning client.
        maxLength: 255
        minLength: 0
      displayName:
        type: string
        description: The display name of the group. Must be unique.
        maxLength: 255
        minLength: 0
      members:
        type: array
        description: Members of the group.
        items:
          $ref: '#/definitions/MemberRequest'
  MemberRequest:
    type: object
    description: Request to add a member to a group.
    required:
      - value
    properties:
      value:
        type: string
        description: Value of the member.
        format: guid
      type:
        type: string
        description: Type of member.
  PostGroupRequest:
    type: object
    description: Request to create a group.
    required:
      - displayName
    properties:
      schemas:
        type: array
        description: Group schemas.
        items:
          type: string
      externalId:
        type: string
        description: Group ExternalId.
      displayName:
        type: string
        description: Name of the group. Must be unique.
        minLength: 1
      members:
        type: array
        description: Members of the group.
        items:
          $ref: '#/definitions/MemberRequest'
  ScimPatchRequestOfUpdateGroupRequestBody:
    type: object
    description: SCIM patch request
    required:
      - schemas
      - Operations
    properties:
      schemas:
        type: array
        description: The request schemas.
        items:
          type: string
      Operations:
        type: array
        description: The list of patch operations
        items:
          $ref: '#/definitions/PatchOperation'
  PatchOperation:
    type: object
    description: Represents a single patch operation.
    properties:
      op:
        type: string
        description: The patch operation.
      path:
        type: string
        description: The attribute path to operate on.
      value:
        description: The value of the operation.
tags:
  - name: Groups
x-servers:
  - url: https://{rootUrl}
    description: null
