x-generator: NSwag v13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))
swagger: '2.0'
info:
  title: Absorb Integration API
  version: v2
consumes:
  - application/json
produces:
  - application/json
paths:
  /managers/{managerId}/direct-reports:
    get:
      tags:
        - Direct Reports
      summary: Retrieves a list of direct reports for a manager.
      operationId: ManagerDirectReports_GetDirectReports
      parameters:
        - type: string
          name: ManagerId
          in: path
          required: true
          description: The manager's user ID.
          format: guid
          x-nullable: false
        - type: string
          name: _filter
          in: query
          description: >-
            One or more filter operations to be performed on the collection.

            The referenced fields must allow filtering. See the respective
            report's schema for which fields can be filtered. 
                        
            Supports most of the [OData filter
            syntax](http://docs.oasis-open.org/odata/odata/v4.01/cs01/part2-url-conventions/odata-v4.01-cs01-part2-url-conventions.html#sec_SystemQueryOptionfilter).
                        
            Supported operations:
                * eq,
                * ne,
                * gt,
                * ge,
                * lt,
                * le,
                * and,
                * or,
                * not,
                * ()

            Supported functions:
                * substringof('value',fieldName),
                * endswith(fieldName,'value'),
                * startswith(fieldName,'value'),
                * tolower(fieldName),
                * toupper(fieldName)
                        
            Examples:

            * _filter=`firstname eq 'Jeffrey'`

            * _filter=`id eq guid'a14c149a-2ce0-41d4-b532-02189ad3cb22'`

            * _filter=`startsWith(lastname,'leb') or dateAdded ge
            datetime'1998-03-06T20:38:07Z'`
          x-nullable: true
        - type: string
          name: _sort
          in: query
          description: >-
            Optional list of comma-separated fields to sort the collection by.


            The referenced fields must allow sorting. See the respective
            report's schema for which fields can be sorted. 

            If not specified, all report fields are returned.


            To sort in a descending manner, prefix the field name with `-`. For
            example, 

            `_sort=name,-date`, sorts the collection of items by `name`
            (ascending) 

            and then by `date` (descending).
          x-nullable: true
        - type: string
          name: _limit
          in: query
          description: >-
            The maximum number of items to return in the current page of the
            collection.
          x-nullable: true
        - type: string
          name: _offset
          in: query
          description: The number of pages to offset into the collection.
          x-nullable: true
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '2'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            $ref: '#/definitions/DirectReportsResource'
        '404':
          x-nullable: false
          description: The user with the given ID does not exist.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
        '422':
          x-nullable: false
          description: The request is invalid.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
    post:
      tags:
        - Direct Reports
      summary: Updates a list of direct reports for a manager.
      operationId: ManagerDirectReports_UpdateDirectReports
      parameters:
        - type: string
          name: managerId
          in: path
          required: true
          description: The manager's user ID.
          format: guid
          x-nullable: false
        - name: request
          in: body
          description: The request containing the list of direct reports to update.
          schema:
            $ref: '#/definitions/UpdateDirectReportsRequest'
          x-nullable: true
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '2'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            $ref: '#/definitions/DirectReportsResource'
        '404':
          x-nullable: false
          description: The user with the given ID is not a manager.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
        '422':
          x-nullable: false
          description: The request is invalid.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
  /managers/roles:
    get:
      tags:
        - Manager Roles
      summary: Retrieves a list of manager roles.
      operationId: ManagerRoles_GetManagerRoles
      parameters:
        - type: string
          name: _filter
          in: query
          description: >-
            One or more filter operations to be performed on the collection.

            The referenced fields must allow filtering. See the respective
            report's schema for which fields can be filtered. 
                        
            Supports most of the [OData filter
            syntax](http://docs.oasis-open.org/odata/odata/v4.01/cs01/part2-url-conventions/odata-v4.01-cs01-part2-url-conventions.html#sec_SystemQueryOptionfilter).
                        
            Supported operations:
                * eq,
                * ne,
                * gt,
                * ge,
                * lt,
                * le,
                * and,
                * or,
                * not,
                * ()

            Supported functions:
                * substringof('value',fieldName),
                * endswith(fieldName,'value'),
                * startswith(fieldName,'value'),
                * tolower(fieldName),
                * toupper(fieldName)
                        
            Examples:

            * _filter=`firstname eq 'Jeffrey'`

            * _filter=`id eq guid'a14c149a-2ce0-41d4-b532-02189ad3cb22'`

            * _filter=`startsWith(lastname,'leb') or dateAdded ge
            datetime'1998-03-06T20:38:07Z'`
          x-nullable: true
        - type: string
          name: _sort
          in: query
          description: >-
            Optional list of comma-separated fields to sort the collection by.


            The referenced fields must allow sorting. See the respective
            report's schema for which fields can be sorted. 

            If not specified, all report fields are returned.


            To sort in a descending manner, prefix the field name with `-`. For
            example, 

            `_sort=name,-date`, sorts the collection of items by `name`
            (ascending) 

            and then by `date` (descending).
          x-nullable: true
        - type: string
          name: _limit
          in: query
          description: >-
            The maximum number of items to return in the current page of the
            collection.
          x-nullable: true
        - type: string
          name: _offset
          in: query
          description: The number of pages to offset into the collection.
          x-nullable: true
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '2'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            $ref: '#/definitions/ManagerRolesResource'
        '403':
          x-nullable: false
          description: The user does not have permission to view manager roles.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
        '422':
          x-nullable: false
          description: A validation error occured with the provided parameters.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
  /managers/{managerId}/roles:
    get:
      tags:
        - Manager Roles
      summary: List a specified manager's manager roles.
      operationId: ManagerRoles_GetUserManagerRoles
      parameters:
        - type: string
          name: managerId
          in: path
          required: true
          description: The manager's user ID.
          format: guid
          x-nullable: false
        - type: string
          name: _filter
          in: query
          description: >-
            One or more filter operations to be performed on the collection.

            The referenced fields must allow filtering. See the respective
            report's schema for which fields can be filtered. 
                        
            Supports most of the [OData filter
            syntax](http://docs.oasis-open.org/odata/odata/v4.01/cs01/part2-url-conventions/odata-v4.01-cs01-part2-url-conventions.html#sec_SystemQueryOptionfilter).
                        
            Supported operations:
                * eq,
                * ne,
                * gt,
                * ge,
                * lt,
                * le,
                * and,
                * or,
                * not,
                * ()

            Supported functions:
                * substringof('value',fieldName),
                * endswith(fieldName,'value'),
                * startswith(fieldName,'value'),
                * tolower(fieldName),
                * toupper(fieldName)
                        
            Examples:

            * _filter=`firstname eq 'Jeffrey'`

            * _filter=`id eq guid'a14c149a-2ce0-41d4-b532-02189ad3cb22'`

            * _filter=`startsWith(lastname,'leb') or dateAdded ge
            datetime'1998-03-06T20:38:07Z'`
          x-nullable: true
        - type: string
          name: _sort
          in: query
          description: >-
            Optional list of comma-separated fields to sort the collection by.


            The referenced fields must allow sorting. See the respective
            report's schema for which fields can be sorted. 

            If not specified, all report fields are returned.


            To sort in a descending manner, prefix the field name with `-`. For
            example, 

            `_sort=name,-date`, sorts the collection of items by `name`
            (ascending) 

            and then by `date` (descending).
          x-nullable: true
        - type: string
          name: _limit
          in: query
          description: >-
            The maximum number of items to return in the current page of the
            collection.
          x-nullable: true
        - type: string
          name: _offset
          in: query
          description: The number of pages to offset into the collection.
          x-nullable: true
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '2'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            $ref: '#/definitions/ManagerRolesResource'
        '404':
          x-nullable: false
          description: The user does not exist or is not a manager.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
        '422':
          x-nullable: false
          description: A validation error occured with the provided parameters.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
    put:
      tags:
        - Manager Roles
      summary: Update a specified manager's manager roles.
      operationId: ManagerRoles_UpdateUserManagerRoles
      parameters:
        - type: string
          name: managerId
          in: path
          required: true
          description: The manager's user ID.
          format: guid
          x-nullable: false
        - name: requestBody
          in: body
          schema:
            $ref: '#/definitions/UpdateUserManagerRolesRequestBody'
          x-nullable: true
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '2'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            $ref: '#/definitions/ManagerRolesResource'
        '404':
          x-nullable: false
          description: >-
            The user does not exist or is not a manager, or the manager role
            does not exist.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
        '422':
          x-nullable: false
          description: A validation error occured with the provided parameters.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
definitions:
  DirectReportsResource:
    type: object
    description: Represents a collection of DirectReportResources.
    properties:
      totalItems:
        type: integer
        description: The total number of items in the unbounded collection
        format: int32
      returnedItems:
        type: integer
        description: The number of items in the bound collection being returned
        format: int32
      limit:
        type: integer
        description: The current page size for the collection
        format: int32
      offset:
        type: integer
        description: The current offset for the collection
        format: int32
      directReports:
        type: array
        description: The paged collection of direct reports.
        items:
          $ref: '#/definitions/DirectReportResource'
  Link:
    type: object
    properties:
      Rel:
        $ref: '#/definitions/Relation'
      Items:
        type: array
        items:
          $ref: '#/definitions/LinkItem'
  Relation:
    type: object
    properties:
      Name:
        type: string
  LinkItem:
    type: object
    properties:
      Href:
        type: string
      Name:
        type: string
      Templated:
        type: boolean
      Type:
        type: string
      Deprecation:
        type: string
      Profile:
        type: string
      Title:
        type: string
      Hreflang:
        type: string
  IEmbeddedResource:
    type: object
    x-abstract: true
    properties:
      Name:
        type: string
      Resources:
        type: array
        items:
          $ref: '#/definitions/IResource'
  IResource:
    type: object
    x-abstract: true
    properties:
      Links:
        type: array
        items:
          $ref: '#/definitions/Link'
      EmbeddedResources:
        type: array
        items:
          $ref: '#/definitions/IEmbeddedResource'
  DirectReportResource:
    type: object
    description: >-
      Represents information about a direct report for an Integration API
      endpoint.
    properties:
      id:
        type: string
        description: |-
          `Filterable` 

          The user's ID.
        format: guid
      firstName:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The user's first name.
      middleName:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The user's middle name.
      lastName:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The user's last name.
      username:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The user's username.
      emailAddress:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The user's email address.
      isManager:
        type: boolean
        description: |-
          `Sortable` `Filterable` 

          Indicates whether the user is a manager or not.
      directReportCount:
        type: integer
        description: |-
          `Sortable` `Filterable` 

          The number of direct reports the user has if they are a manager.
        format: int32
  GenericErrorResponse:
    type: object
    description: |-
      This class is NOT to be used as an actual response. This is to be used as
      the return type for non-200 responses in `SwaggerResponse` attributes.
    properties:
      validations:
        type: array
        description: The validations (if any) which caused the error.
        items:
          type: string
      code:
        description: The status code returned.
        allOf:
          - $ref: '#/definitions/HttpStatusCode'
      message:
        type: string
        description: The error message.
      term:
        type: string
        description: The general error term.
      _meta:
        type: object
        description: 'A list of meta data (if any). '
        additionalProperties:
          type: string
  HttpStatusCode:
    type: integer
    description: ''
    x-enumNames:
      - Continue
      - SwitchingProtocols
      - OK
      - Created
      - Accepted
      - NonAuthoritativeInformation
      - NoContent
      - ResetContent
      - PartialContent
      - MultipleChoices
      - Ambiguous
      - MovedPermanently
      - Moved
      - Found
      - Redirect
      - SeeOther
      - RedirectMethod
      - NotModified
      - UseProxy
      - Unused
      - TemporaryRedirect
      - RedirectKeepVerb
      - BadRequest
      - Unauthorized
      - PaymentRequired
      - Forbidden
      - NotFound
      - MethodNotAllowed
      - NotAcceptable
      - ProxyAuthenticationRequired
      - RequestTimeout
      - Conflict
      - Gone
      - LengthRequired
      - PreconditionFailed
      - RequestEntityTooLarge
      - RequestUriTooLong
      - UnsupportedMediaType
      - RequestedRangeNotSatisfiable
      - ExpectationFailed
      - UpgradeRequired
      - InternalServerError
      - NotImplemented
      - BadGateway
      - ServiceUnavailable
      - GatewayTimeout
      - HttpVersionNotSupported
  UpdateDirectReportsRequest:
    type: object
    description: Request to update a manager's direct reports.
    required:
      - directReportIds
    properties:
      directReportIds:
        type: array
        description: The manager's direct report user Ids to be updated with for the user.
        items:
          type: string
          format: guid
  ManagerRolesResource:
    type: object
    description: Represents a collection of ManagerRoleResources.
    properties:
      totalItems:
        type: integer
        description: The total number of items in the unbounded collection
        format: int32
      returnedItems:
        type: integer
        description: The number of items in the bound collection being returned
        format: int32
      limit:
        type: integer
        description: The current page size for the collection
        format: int32
      offset:
        type: integer
        description: The current offset for the collection
        format: int32
      roles:
        type: array
        description: The paged collection of roles.
        items:
          $ref: '#/definitions/ManagerRoleResource'
  ManagerRoleResource:
    type: object
    description: >-
      Represents information about a manager role for an Integration API
      endpoint.
    properties:
      id:
        type: string
        description: |-
          `Filterable` 

          The ID of the role.
        format: guid
      name:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The name of the role.
      description:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The description of the role.
  UpdateUserManagerRolesRequestBody:
    type: object
    description: Request to update a manager's manager roles.
    required:
      - roleIds
    properties:
      roleIds:
        type: array
        description: The manager role IDs to be updated with for the manager.
        minItems: 1
        items:
          type: string
          format: guid
securityDefinitions:
  api_key:
    type: apiKey
    name: x-api-key
    in: header
tags:
  - name: Direct Reports
  - name: Manager Roles
x-servers:
  - url: https://rest.myabsorb.com
    description: US
  - url: https://rest.myabsorb.ca
    description: CA
  - url: https://rest.myabsorb.eu
    description: EU
  - url: https://rest.myabsorb.com.au
    description: AU
