openapi: 3.0.0
info:
  title: Liongard v2 Endpoints
  description: Liongard v2 API Endpoints.
  contact: {}
  version: '2.0'
servers:
  - url: https://{instance}.app.liongard.com/api/v2
    variables:
      instance:
        default: example
        description: This should be your instance of Roar, eg us1,us2,ca1
security:
  - ApiKeyAuth: []
paths:
  /dataprints/evaluate/{systemDetailId}:
    post:
      tags:
        - Dataprints
      summary: Fetch evaluated JMESPath values
      description: >-
        Returns the results of an evaluated JMESPath expression against a
        System.
      parameters:
        - name: systemDetailId
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  Success:
                    type: boolean
                    example: true
                  Data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DataprintResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataprintRequest'
  /detections/:
    post:
      tags:
        - Detections
      summary: List Detections
      description: Returns a list of all detection events.
      parameters: []
      responses:
        '200':
          description: Success
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                Pagination:
                  $ref: '#/components/schemas/Pagination'
                Filters:
                  $ref: '#/components/schemas/FilterBy'
                Sorting:
                  $ref: '#/components/schemas/SortByArray'
                StartDate:
                  type: string
                  example: '2023-07-12T05:00:00.911Z'
                EndDate:
                  type: string
                  example: '2023-07-12T05:00:00.911Z'
  /environments/count:
    get:
      tags:
        - Environment
      summary: Get Environment Count
      description: ''
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  Success:
                    type: boolean
                    example: true
                  Data:
                    type: integer
                    example: 123
  /environments/:
    get:
      tags:
        - Environment
      summary: List of Environments
      description: ''
      parameters:
        - name: page
          in: query
          description: A integer indicating the current page index
          required: false
          schema:
            type: integer
        - name: pageSize
          in: query
          description: A integer indicating the current page size
          required: false
          schema:
            type: integer
        - name: columns
          in: query
          description: A comma-separated string indicating the columns
          required: false
          schema:
            type: string
        - name: orderBy
          in: query
          description: A string containing the response order
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentResponse'
    post:
      tags:
        - Environment
      summary: Add an Environment
      description: ''
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/EnvironmentResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentAdd'
    put:
      tags:
        - Environment
      summary: Update multiple Environments
      description: ''
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentBulkResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/EnvironmentBulkResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentBulkUpdate'
  /environments/bulk:
    post:
      tags:
        - Environment
      summary: Add multiple Environments
      description: ''
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentBulkResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/EnvironmentBulkResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentBulkAdd'
  /environments/{environmentId}:
    put:
      tags:
        - Environment
      summary: Update a Single Environment
      description: ''
      parameters:
        - in: path
          name: environmentId
          schema:
            type: integer
          required: true
          description: Environment ID
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/EnvironmentResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentAdd'
    get:
      tags:
        - Environment
      summary: Get a Single Environment
      description: ''
      parameters:
        - in: path
          name: environmentId
          schema:
            type: integer
          required: true
          description: Environment ID
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/EnvironmentResponse'
    delete:
      tags:
        - Environment
      summary: Delete an Environment
      description: ''
      parameters:
        - in: path
          name: environmentId
          schema:
            type: integer
          required: true
          description: Environment ID
        - in: query
          name: relatedEntities
          schema:
            type: boolean
          description: Delete entities related to the environment ID
          required: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  Success:
                    type: boolean
                    example: true
                  Data:
                    type: integer
  /environments/{environmentId}/relatedEntities:
    get:
      tags:
        - Environment
      summary: Get Related Entities per Environment
      description: >-
        Returns all the Related Entities that are tied to a single Environment
        such as Agents, Launchpoints, and Integration mappings
      parameters:
        - in: path
          name: environmentId
          required: true
          schema:
            type: integer
          description: Environment ID
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentRelatedEntitiesResponse'
  /environments/{environmentId}/query:
    post:
      tags:
        - Environment
      summary: Get Dashboard queries per Environment
      description: >-
        Returns results for one or more environment queries for the given
        queryIdentifiers (array of query names)
      parameters:
        - name: environmentId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                queryIdentifiers:
                  type: array
                  items:
                    type: string
                    example:
                      - m365TotalUsers
                      - m365TotalUsersDrillDown
                      - m365PrivilegedUsers
                      - m365PrivilegedUsersDrillDown
                      - m365MfaEnabledTotalUsers
                      - m365MfaEnabledTotalUsersDrillDown
                      - m365MfaEnabledPrivilegedUsers
                      - m365MfaEnabledPrivilegedUsersDrillDown
                      - emailDomains
                      - emailDomainsWithEmailEnabledTotal
                      - emailDomainsWithEmailEnabledTotalDrillDown
                      - m365Defender
                      - m365DefenderDrillDown
                      - domainAndWebsiteSecurityTotalDomains
                      - domainAndWebsiteSecurityTotalDomainsDrillDown
                      - domainAndWebsiteSecurityTotalSubdomains
                      - domainAndWebsiteSecurityTotalSubdomainsDrillDown
                      - domainAndWebsiteSecurityDomainsWithTlsSsl
                      - domainAndWebsiteSecurityDomainsWithTlsSslDrillDown
                      - domainAndWebsiteSecurityExpiringDomainsWithTlsSsl
                      - >-
                        domainAndWebsiteSecurityExpiringDomainsWithTlsSslDrillDown
                      - workstationTotalCount
                      - workstationTotalCountDrillDown
                      - workstationOsVersionPct
                      - workstationOsVersionPctDrillDown
                      - workstationPctEncryptedAtRest
                      - workstationPctEncryptedAtRestDrillDown
                      - workstationPctRdpDisabled
                      - workstationPctRdpDisabledDrillDown
                      - workstationPctEndpointDetectionResponseSoftwareInstalled
                      - >-
                        workstationPctEndpointDetectionResponseSoftwareInstalledDrillDown
                      - workstationPctDomainFirewallEnabled
                      - workstationPctDomainFirewallEnabledDrillDown
                      - workstationPctPrivateFirewallEnabled
                      - workstationPctPrivateFirewallEnabledDrillDown
                      - workstationPctPublicFirewallEnabled
                      - workstationPctPublicFirewallEnabledDrillDown
                      - winServerTotalCount
                      - winServerTotalCountDrillDown
                      - winServerDomainFirewall
                      - winServerDomainFirewallDrillDown
                      - winServerOperatingSystem
                      - winServerOperatingSystemDrillDown
                      - winServerPrivateFirewall
                      - winServerPrivateFirewallDrillDown
                      - winServerPublicFirewall
                      - winServerPublicFirewallDrillDown
                      - winServerEDRSoftware
                      - winServerEDRSoftwareDrillDown
                      - winServerEncryptionAtRest
                      - winServerEncryptionAtRestDrillDown
                      - winServerRDPDisabled
                      - winServerRDPDisabledDrillDown
                      - macOSTotalCount
                      - macOSTotalCountDrillDown
                      - macOSPctFirewallEnabled
                      - macOSPctFirewallEnabledDrillDown
                      - macOSPctRemoteDesktopDisabled
                      - macOSPctRemoteDesktopDisabledDrillDown
                      - macOSPctEncryptedAtRest
                      - macOSPctEncryptedAtRestDrillDown
                    enum:
                      - m365TotalUsers
                      - m365TotalUsersDrillDown
                      - m365PrivilegedUsers
                      - m365PrivilegedUsersDrillDown
                      - m365MfaEnabledTotalUsers
                      - m365MfaEnabledTotalUsersDrillDown
                      - m365MfaEnabledPrivilegedUsers
                      - m365MfaEnabledPrivilegedUsersDrillDown
                      - emailDomains
                      - emailDomainsWithEmailEnabledTotal
                      - emailDomainsWithEmailEnabledTotalDrillDown
                      - m365Defender
                      - m365DefenderDrillDown
                      - domainAndWebsiteSecurityTotalDomains
                      - domainAndWebsiteSecurityTotalDomainsDrillDown
                      - domainAndWebsiteSecurityTotalSubdomains
                      - domainAndWebsiteSecurityTotalSubdomainsDrillDown
                      - domainAndWebsiteSecurityDomainsWithTlsSsl
                      - domainAndWebsiteSecurityDomainsWithTlsSslDrillDown
                      - domainAndWebsiteSecurityExpiringDomainsWithTlsSsl
                      - >-
                        domainAndWebsiteSecurityExpiringDomainsWithTlsSslDrillDown
                      - workstationTotalCount
                      - workstationTotalCountDrillDown
                      - workstationOsVersionPct
                      - workstationOsVersionPctDrillDown
                      - workstationPctEncryptedAtRest
                      - workstationPctEncryptedAtRestDrillDown
                      - workstationPctRdpDisabled
                      - workstationPctRdpDisabledDrillDown
                      - workstationPctEndpointDetectionResponseSoftwareInstalled
                      - >-
                        workstationPctEndpointDetectionResponseSoftwareInstalledDrillDown
                      - workstationPctDomainFirewallEnabled
                      - workstationPctDomainFirewallEnabledDrillDown
                      - workstationPctPrivateFirewallEnabled
                      - workstationPctPrivateFirewallEnabledDrillDown
                      - workstationPctPublicFirewallEnabled
                      - workstationPctPublicFirewallEnabledDrillDown
                      - winServerTotalCount
                      - winServerTotalCountDrillDown
                      - winServerDomainFirewall
                      - winServerDomainFirewallDrillDown
                      - winServerOperatingSystem
                      - winServerOperatingSystemDrillDown
                      - winServerPrivateFirewall
                      - winServerPrivateFirewallDrillDown
                      - winServerPublicFirewall
                      - winServerPublicFirewallDrillDown
                      - winServerEDRSoftware
                      - winServerEDRSoftwareDrillDown
                      - winServerEncryptionAtRest
                      - winServerEncryptionAtRestDrillDown
                      - winServerRDPDisabled
                      - winServerRDPDisabledDrillDown
                      - macOSTotalCount
                      - macOSTotalCountDrillDown
                      - macOSPctFirewallEnabled
                      - macOSPctFirewallEnabledDrillDown
                      - macOSPctRemoteDesktopDisabled
                      - macOSPctRemoteDesktopDisabledDrillDown
                      - macOSPctEncryptedAtRest
                      - macOSPctEncryptedAtRestDrillDown111
  /environment-groups:
    get:
      tags:
        - Environment Groups
      summary: List Environment Groups
      description: ''
      parameters:
        - name: ids
          in: query
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
        - name: pageSize
          in: query
          schema:
            type: integer
      responses:
        default:
          description: ''
    post:
      tags:
        - Environment Groups
      summary: Add an Evironment Group
      description: ''
      responses:
        default:
          description: ''
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentGroupRequest'
    delete:
      tags:
        - Environment Groups
      summary: Delete an Environment Group
      description: ''
      responses:
        default:
          description: ''
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                EnvironmentGroupIDs:
                  type: array
                  items:
                    type: integer
                    example: 323
  /environment-groups/{environmentGroupID}:
    put:
      tags:
        - Environment Groups
      summary: Update a Single Environment Group
      description: ''
      parameters:
        - name: environmentGroupID
          in: path
          required: true
          schema:
            type: string
      responses:
        default:
          description: ''
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentGroupRequest'
  /inventory/identities/query:
    post:
      tags:
        - Inventory (Beta)
      summary: List of Identities
      description: ''
      responses:
        default:
          description: ''
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetInventoryQuery'
  /inventory/identities/{inventoryIdentityID}:
    get:
      tags:
        - Inventory (Beta)
      summary: Get a single Identity
      description: ''
      parameters:
        - name: inventoryIdentityID
          in: path
          required: true
          schema:
            type: string
      responses:
        default:
          description: ''
    put:
      tags:
        - Inventory (Beta)
      summary: Update a single Identity
      description: ''
      parameters:
        - name: inventoryIdentityID
          in: path
          required: true
          schema:
            type: string
      responses:
        default:
          description: ''
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetInventoryIdentityUpdateRequest'
  /inventory/identities/bulk:
    post:
      tags:
        - Inventory (Beta)
      summary: Update multiple inventory identities
      description: ''
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetInventoryIdentityBulkUpdateRequest'
      responses:
        default:
          description: ''
  /inventory/device-profiles/query:
    post:
      tags:
        - Inventory (Beta)
      summary: List of Devices
      description: ''
      responses:
        default:
          description: ''
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetInventoryQuery'
  /inventory/device-profiles/{inventoryDeviceProfileID}:
    get:
      tags:
        - Inventory (Beta)
      summary: Get a single Device
      description: ''
      parameters:
        - name: inventoryDeviceProfileID
          in: path
          required: true
          schema:
            type: string
      responses:
        default:
          description: ''
    put:
      tags:
        - Inventory (Beta)
      summary: Update a single Device's properties
      description: ''
      parameters:
        - name: inventoryDeviceProfileID
          in: path
          required: true
          schema:
            type: string
      responses:
        default:
          description: ''
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetInventoryDeviceUpdateRequest'
  /inventory/device-profiles/bulk:
    post:
      tags:
        - Inventory (Beta)
      summary: Update multiple device properties
      description: ''
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetInventoryDeviceBulkUpdateRequest'
      responses:
        default:
          description: ''
  /metrics:
    get:
      summary: List Metrics
      tags:
        - Metrics
      description: Returns a list of metrics that have been created.
      parameters:
        - in: query
          name: Page
          schema:
            type: integer
          description: Page number your requesting
          example: 1
        - in: query
          name: PageSize
          schema:
            type: integer
          description: Number of rows your requesting
          example: 10
        - in: query
          name: Filters[]
          style: form
          explode: true
          description: >-
            FilterBy = (Name | UCK); Op = (contains | does_not_contain |
            matches_exactly | starts_with | ends_with); Value: string;
          schema: {}
          example: '{"FilterBy": "Name", "Op": "contains", "Value": "Active Directory"}'
        - in: query
          name: Sorting[]
          style: form
          explode: true
          description: SortBy = (ID | Name | UCK); Direction = (DESC | ASC);
          schema: {}
          example: '{"SortBy": "ID", "Direction": "DESC"}'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  Success:
                    type: boolean
                    example: true
                  Data:
                    $ref: '#/components/schemas/FetchAllMetricsV2'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
            application/xml:
              schema:
                $ref: '#/components/schemas/Error404'
  /metrics/{MetricID}/relatedEnvironments:
    get:
      summary: Get Related Environments
      tags:
        - Metrics
      description: >-
        Returns Environment IDs for all related Environments for a given Metric
        ID
      parameters:
        - in: path
          name: MetricID
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  Success:
                    type: boolean
                    example: true
                  Data:
                    $ref: '#/components/schemas/RelatedEnvironmentsRequest'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
            application/xml:
              schema:
                $ref: '#/components/schemas/Error404'
  /metrics/evaluate:
    post:
      tags:
        - Metrics
      summary: Get Metric Values for all systems
      parameters:
        - in: query
          name: includeNonVisible
          required: false
          schema:
            type: boolean
          description: >-
            Determines if metrics set to display off will be evaluated, default
            is false. Set to true if you would like to evaluate all metrics
            regardless if enabled or not
      description: >-
        Returns Metric values for all systems from the provided Metric
        ID/UUID(s).


        **Rate Limit**: Requests from a single user in excess of 100 requests
        per minute may be throttled.


        While its not required to specify filter or sorting objects, it is
        required to include an empty array in the request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EvaluateMetricRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  Success:
                    type: boolean
                    example: true
                  Data:
                    type: array
                    items:
                      $ref: '#/components/schemas/MetricResponse'
                  Pagination:
                    $ref: '#/components/schemas/PaginationResponse'
            application/xml:
              schema:
                type: object
                properties:
                  Success:
                    type: boolean
                    example: true
                  Data:
                    type: object
                    properties:
                      Pagination:
                        $ref: '#/components/schemas/PaginationResponse'
                xml:
                  name: main
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests
          headers:
            Retry-After:
              description: >-
                Number of seconds remaining until the rate-limit window will
                reset.
              schema:
                type: number
                format: float
            X-RateLimit-Limit:
              description: Number of requests allowed within the rate-limit window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: >-
                Number of requests remaining within the current rate-limit
                window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: The UTC date/time at which the current rate-limit window resets.
              schema:
                type: string
                format: date-time
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error429'
  /metrics/evaluate/systems:
    post:
      tags:
        - Metrics
      summary: Get all Metrics Values for a System
      description: >-
        Returns Metric values for all Enabled Metrics for a given System ID,
        Metrics must have "display" set to enabled to show in the response
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EvaluateMetricBySystemRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  Success:
                    type: boolean
                    example: true
                  Data:
                    type: array
                    items:
                      $ref: '#/components/schemas/MetricResponse'
                  Pagination:
                    $ref: '#/components/schemas/PaginationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /timelines/query:
    post:
      tags:
        - Timeline
      summary: List Timelines entries
      description: >-
        Fetch all timeline entries and associated SystemDetailID. If a timeline
        entry does not have a SystemDetailID it does not have an assoicated
        dataprint.
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  Data:
                    type: array
                    items:
                      $ref: '#/components/schemas/TimelineResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                Filters:
                  $ref: '#/components/schemas/Filters'
                Sorting:
                  $ref: '#/components/schemas/Sorting'
                Pagination:
                  $ref: '#/components/schemas/Pagination'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: X-ROAR-API-KEY
      description: base64 encoded string of Accesskey:Access Secret
      in: header
  schemas:
    Pagination:
      type: object
      properties:
        Page:
          type: integer
          example: 1
        PageSize:
          type: integer
          example: 10
    FilterBy:
      type: array
      items:
        type: object
        properties:
          FilterBy:
            type: string
          Op:
            type: string
            enum:
              - equal_to
              - contains
              - does_not_contain
              - matches_exactly
              - starts_with
              - ends_with
              - greater_than
              - lower_than
              - is_empty
              - is_not_empty
              - Match
              - AnyOf
          Values:
            type: array
            items:
              oneOf:
                - type: string
                - type: integer
    Filters:
      type: array
      items:
        type: object
        properties:
          Field:
            type: string
          Op:
            type: string
            enum:
              - equal_to
              - contains
              - does_not_contain
              - matches_exactly
              - starts_with
              - ends_with
              - greater_than
              - lower_than
              - is_empty
              - is_not_empty
              - Match
              - AnyOf
          Values:
            type: array
            items:
              oneOf:
                - type: string
                - type: integer
    SortByArray:
      type: array
      items:
        type: object
        properties:
          SortBy:
            type: string
          Direction:
            type: string
            enum:
              - ASC
              - DESC
    Sorting:
      type: array
      items:
        type: object
        properties:
          Field:
            type: string
            example: ID
          Direction:
            type: string
            enum:
              - ASC
              - DESC
            example: DESC
    Error:
      type: object
      properties:
        Success:
          type: boolean
          example: false
        Message:
          type: string
          example: Failure
    Error404:
      type: object
      properties:
        Success:
          type: boolean
          example: false
        Message:
          type: string
          example: Enitity not found
    Error429:
      type: object
      properties:
        error:
          type: string
    AssetInventoryQuery:
      type: object
      properties:
        Environment:
          type: integer
          example: 4
        Filters:
          type: array
          items:
            type: object
            properties:
              FilterBy:
                type: string
                example: InventoryState
              Op:
                type: string
                example: matches_exactly
              Value:
                anyOf:
                  - type: string
                  - type: integer
                example: Inventory
        Pagination:
          type: object
          properties:
            Page:
              type: integer
              example: 1
            PageSize:
              type: integer
              example: 25
        Sorting:
          type: array
          items:
            type: object
            properties:
              SortBy:
                type: string
                example: Hostname
              Direction:
                type: string
                example: ASC
    AssetInventoryIdentityUpdateRequest:
      type: object
      properties:
        Environment:
          type: integer
          example: 8815
        Type:
          type: string
          example: service
          enum:
            - service
            - user
            - admin
            - guest
            - shared
            - system
            - application
        Status:
          type: string
          example: active
          enum:
            - suspended
            - active
            - inactive
            - expired
            - deactivated
            - deleted
            - pending-activation
        Location:
          type: string
          example: Houston
        IsLocationManaged:
          type: boolean
          example: false
        InventoryState:
          type: string
          example: Inventory
          enum:
            - Inventory
            - Archive
            - Discovery
        IsManual:
          type: boolean
    AssetInventoryIdentityBulkUpdateRequest:
      type: object
      properties:
        Environment:
          type: integer
          example: 4
        IDs:
          type: array
          items:
            type: string
            example: f67ed3a3-ab41-4a03-ba96-aee435534fce
        InventoryState:
          type: string
          example: Archive
          enum:
            - Inventory
            - Archive
            - Discovery
        Status:
          type: string
          example: active
          enum:
            - suspended
            - active
            - inactive
            - expired
            - deactivated
            - deleted
            - pending-activation
        Type:
          type: string
          example: service
          enum:
            - service
            - user
            - admin
            - guest
            - shared
            - system
            - application
    AssetInventoryDeviceUpdateRequest:
      type: object
      properties:
        Alias:
          type: string
          example: CN-DC01
        Class:
          type: string
          example: critical
          enum:
            - critical
            - standar
        Status:
          type: string
          example: active
          enum:
            - active
            - inactive
            - idle
            - standby
        Category:
          type: string
          example: compute
          enum:
            - compute
            - network
            - iot-printer
            - storage
        Type:
          type: string
          example: server
          enum:
            - server
            - host
            - desktop
            - laptop
            - smartphone
            - tablet
        Role:
          type: string
          example: domain-directory
          enum:
            - domain-directory
            - web
            - email
            - application
            - vm-host
            - vm-guest
            - pbx
            - voip
            - dns
            - sql
            - backbone
            - anxillary
            - mesh
            - backup
            - user-device
        Location:
          type: string
          example: Main
        LocationManaged:
          type: boolean
          example: true
        Physical:
          type: boolean
          example: true
        HostServer:
          type: string
          example: RDSHOST-CN
        ClusterName:
          type: string
          example: Main-Cluster
        DataCenter:
          type: string
          example: CyrusOne
        VirtualizationSoftware:
          type: string
          example: Hyper-V
        HypervisorVersion:
          type: string
          example: 10.15.3
        ManagedDevice:
          type: boolean
          example: true
        AssetTagNumber:
          type: string
          example: CN-45322
        Purpose:
          type: string
          example: AD Server
        PurchaseDate:
          type: string
          format: date-time
          example: '2025-03-31T05:00:00.000Z'
        WarrantyExpiration:
          type: string
          format: date-time
          example: '2025-03-10T05:00:00.000Z'
        EOLDate:
          type: string
          format: date-time
          example: '2025-03-19T05:00:00.000Z'
        Environment:
          type: integer
          example: 4
        IsManual:
          type: boolean
          example: true
    AssetInventoryDeviceBulkUpdateRequest:
      type: object
      properties:
        Environment:
          type: integer
          example: 4
        IDs:
          type: array
          items:
            type: string
            example: f67ed3a3-ab41-4a03-ba96-aee435534fce
        InventoryState:
          type: string
          example: Archive
          enum:
            - Inventory
            - Archive
            - Discovery
        Status:
          type: string
          example: active
          enum:
            - active
            - inactive
            - idle
            - standby
        Type:
          type: string
          example: server
          enum:
            - server
            - host
            - desktop
            - laptop
            - smartphone
            - tablet
    EnvironmentGroupRequest:
      type: object
      properties:
        AutoAddNewEnvironments:
          type: boolean
          example: false
        Description:
          type: string
        Environments:
          type: array
          items:
            type: integer
            example: 2452
        Name:
          type: string
          example: Environment Group 1
        Users:
          type: array
          items:
            type: object
            properties:
              UserID:
                type: integer
                example: 4345
              GroupID:
                type: integer
                example: 108588
    DataprintResponse:
      type: object
      properties:
        Data:
          type: object
          properties:
            Type:
              type: string
              example: array
            Length:
              type: integer
              example: 50
            Key:
              type: string
              example: JMESPath Expression
            Value:
              type: array
              items:
                type: object
            Pagination:
              type: object
              properties:
                TotalRows:
                  type: integer
                  example: 914
                HasMoreRows:
                  type: boolean
                  example: true
                CurrentPage:
                  type: integer
                  example: 1
                TotalPages:
                  type: integer
                  example: 19
                PageSize:
                  type: integer
                  example: 50
    DataprintRequest:
      type: object
      properties:
        QueryPath:
          type: string
          example: JMESPath Expression
        Pagination:
          type: object
          properties:
            Page:
              type: integer
              example: 1
            PageSize:
              type: integer
              example: 50
    PaginationResponse:
      type: object
      properties:
        TotalRows:
          type: integer
          example: 1
        HasMoreRows:
          type: boolean
          example: false
        CurrentPage:
          type: integer
          example: 1
        TotalPages:
          type: integer
          example: 1
        PageSize:
          type: integer
          example: 25
    MetricResponse:
      type: object
      properties:
        SystemID:
          type: integer
        FriendlyName:
          type: string
          example: Active Directory - Contoso
        InspectorName:
          type: string
          example: active-directory-inspector
        EnvironmentName:
          type: string
          example: Contoso Nation
        MetricID:
          type: integer
        MetricUUID:
          type: string
          example: aa4eef4d-3dc5-4b3d-9d8a-00c1d9b68065
        MetricName:
          type: string
          example: 'Active Directory: Count of Joined Computers'
        TimelineID:
          type: integer
        TimelineDate:
          type: string
          format: date
          example: '2021-07-21T14:52:57.022Z'
        Value:
          nullable: true
          example: 5
        EnvironmentID:
          type: integer
    RelatedEnvironmentsRequest:
      type: array
      example:
        - 1
        - 2
        - 3
      items:
        type: integer
        example: 1
    FetchAllMetricsV2:
      type: object
      properties:
        Success:
          type: boolean
          example: true
        Data:
          type: array
          items:
            type: object
            properties:
              ID:
                type: integer
                example: 1
              Name:
                type: string
                example: 'Active Directory: User Password & Activity Summary [Power BI]'
              Description:
                type: string
                example: >-
                  Information related to user password settings and activity,
                  designed to be pulled into Power BI for reporting.
              CreatedOn:
                type: string
                format: date
                example: '2018-02-01T18:31:22.896Z'
              UpdatedOn:
                type: string
                format: date
                example: '2018-02-01T18:31:22.896Z'
              InspectorID:
                type: integer
                example: 1
              ServiceProviderID:
                type: integer
                example: 1
              EnvironmentID:
                type: integer
                example: 1
              CreatedBy:
                type: integer
                example: 1
              UpdatedBy:
                type: integer
                example: 1
              UCK:
                type: string
                example: >-
                  Active Directory: User Password & Activity Summary [Power BI]
                  - 26c53894f6af4b1ab2ca550e0f20f76d
              Enabled:
                type: boolean
                example: true
              Visible:
                type: boolean
                example: true
              UUID:
                type: string
                example: >-
                  Active Directory: User Password & Activity Summary [Power BI]
                  - 26c53894f6af4b1ab2ca550e0f20f76d
              MetricVersions:
                type: array
                items:
                  type: object
                  properties:
                    ID:
                      type: integer
                      example: 1
                    InspectorVersionID:
                      type: integer
                      example: 2
                    Query:
                      type: string
                      example: >-
                        Users[].{BadLogonCount: BadLogonCount,
                        DaysSinceLastLogin: DaysSinceLastLogin,
                        DaysSinceLastPasswordChange:
                        DaysSinceLastPasswordChange, LockedOut: LockedOut,
                        PasswordNeverExpires: PasswordNeverExpires,
                        PasswordNotRequired: PasswordNotRequired, Privileged:
                        Privileged, UserActivity: UserActivity, UserName:
                        UserName, LastLogonDate: LastLogonDate, CreateTime:
                        CreateTime}
              MetricDisplay:
                type: boolean
                example: true
              ChangesEnabled:
                type: boolean
                example: true
              Inspector:
                type: array
                items:
                  type: object
                  properties:
                    ID:
                      type: integer
                      example: 13
                    Name:
                      type: string
                      example: active-directory-inspector
                    Alias:
                      type: string
                      example: Active Directory
                    Published:
                      type: boolean
                      example: true
                    Author:
                      type: string
                      example: Liongard, Inc.
                    ContactEmail:
                      type: string
                      example: support@liongard.com
                    Logo:
                      type: string
                      example: >-
                        https://resources.static.liongard.com/images/active-directory-inspector.png
                    Icon:
                      type: string
                      example: >-
                        https://resources.static.liongard.com/images/icons/microsoft-windows-icon.png
                    Description:
                      type: string
                      example: >-
                        Inspects Active Directory, returning a wide variety of
                        data including actionable summary information such as
                        privileged users, security policies and much more.
                    HelpLink:
                      type: string
                      example: >-
                        https://docs.liongard.com/docs/active-directory-inspection-setup
                    PublishedStatus:
                      type: string
                      example: production
                    InspectorCategory:
                      type: string
                      example: appservices
                    EnhancedBilling:
                      type: boolean
                      example: false
                    DefaultFrequency:
                      type: object
                      properties:
                        Type:
                          type: string
                          example: days
                        Interval:
                          type: integer
                          example: 1
                    Constraints:
                      type: object
                      properties:
                        Tiers:
                          type: array
                          items:
                            type: string
                            example: core
                        Platform:
                          type: array
                          items:
                            type: string
                            example: windows
                        Frequency:
                          type: object
                          properties:
                            MaxIntervalType:
                              type: string
                              example: hours
                            MaxIntervalFrequency:
                              type: integer
                              example: 8
                        AgentConstraint:
                          type: array
                          items:
                            type: string
                            example: customer-on-prem
                        RecomendedAgent:
                          type: string
                          example: customer-on-prem
                    CreatedOn:
                      type: string
                      pattern: ^[0-9]{4}/[0-9]{2}/[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$
                      example: 2021/09/10 19:21:03
                    UpdatedOn:
                      type: string
                      pattern: ^[0-9]{4}/[0-9]{2}/[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$
                      example: 2021/09/10 19:21:03
                    DiagnosticsEnabled:
                      type: boolean
                      example: false
    EvaluateMetricRequest:
      type: object
      properties:
        Metrics:
          type: array
          items:
            oneOf:
              - type: string
                example: uuid
              - type: integer
                example: 1
        Filters:
          type: array
          items:
            type: object
            properties:
              Field:
                type: string
                enum:
                  - EnvironmentID
                  - EnvironmentName
                  - SystemID
                  - FriendlyName
              Op:
                type: string
                enum:
                  - contains
                  - does_not_contain
                  - matches_exactly
                  - starts_with
                  - ends_with
                  - equal_to
              Values:
                oneOf:
                  - type: integer
                  - type: string
                  - type: array
                    items:
                      oneOf:
                        - type: string
                        - type: integer
        Sorting:
          type: array
          items:
            type: object
            properties:
              SortBy:
                type: string
                example: EnvironmentName
                enum:
                  - MetricName
                  - EnvironmentName
                  - FriendlyName
                  - MetricID
                  - EnvironmentID
                  - SystemID
              Direction:
                type: string
                enum:
                  - ASC
                  - DESC
        Pagination:
          type: object
          properties:
            Page:
              type: integer
              example: 1
            PageSize:
              type: integer
              example: 25
      required:
        - Metrics
        - Pagination
      xml:
        name: EvaluateMetricResponse
    EvaluateMetricBySystemRequest:
      type: object
      properties:
        Systems:
          type: array
          items:
            type: integer
            example: 1241
        Filters:
          type: array
          items:
            type: object
            properties:
              Field:
                type: string
                enum:
                  - EnvironmentID
                  - EnvironmentName
                  - SystemID
                  - FriendlyName
              Op:
                type: string
                enum:
                  - contains
                  - does_not_contain
                  - matches_exactly
                  - starts_with
                  - ends_with
                  - equal_to
              Values:
                oneOf:
                  - type: integer
                  - type: string
                  - type: array
                    items:
                      oneOf:
                        - type: string
                        - type: integer
        Sorting:
          type: array
          items:
            type: object
            properties:
              SortBy:
                type: string
                enum:
                  - MetricName
                  - EnvironmentName
                  - FriendlyName
                  - MetricID
                  - EnvironmentID
                  - SystemID
              Direction:
                type: string
                enum:
                  - ASC
                  - DESC
        Pagination:
          type: object
          properties:
            Page:
              type: integer
              example: 1
            PageSize:
              type: integer
              example: 25
      required:
        - Systems
        - Pagination
      xml:
        name: EvaluateMetricBySystemRequest
    EnvironmentAdd:
      type: object
      properties:
        Name:
          type: string
          example: string
        Description:
          type: string
        Parent:
          nullable: true
          example: null
        ShortName:
          type: string
        Tier:
          type: string
          enum:
            - Core
            - Essentials
    EnvironmentResponse:
      type: object
      properties:
        Success:
          type: boolean
          example: true
        Data:
          type: array
          items:
            type: object
            properties:
              ID:
                type: integer
              ServiceProviderID:
                type: integer
              Name:
                type: string
                example: Contoso Nation
              Status:
                type: integer
              Visible:
                type: boolean
                example: true
              ExpiresOn:
                type: string
                format: date
                example: '2018-02-01T18:31:22.896Z'
              KeyRotation:
                type: integer
              LastKeyRotation:
                type: string
                format: date
                example: '2018-02-01T18:31:22.896Z'
              CreatedOn:
                type: string
                format: date
                example: '2018-02-01T18:31:22.896Z'
              UpdatedOn:
                type: string
                format: date
                example: '2018-02-01T18:31:22.896Z'
              EndpointInspectorCount:
                type: integer
              Tier:
                type: object
                properties:
                  Type:
                    type: string
                    enum:
                      - Essentials
                      - Core
                  CanDownGrade:
                    type: boolean
                    example: true
                  AssociatedInspectors:
                    type: integer
              AgentsCount:
                type: integer
              UpdatedBy:
                type: object
                properties:
                  ID:
                    type: integer
                  FirstName:
                    type: string
                    example: John
                  LastName:
                    type: string
                    example: Doe
                  FullName:
                    type: string
                    example: John Doe
                  Email:
                    type: string
                    example: JDoe@contoso.com
                  Username:
                    type: string
                    example: j.doe.contoso
                  MfaFactorAuth:
                    type: boolean
                    example: true
                  Status:
                    type: string
                    example: active
                  Owner:
                    type: boolean
                    example: true
                  Visibile:
                    type: boolean
                    example: true
                  Locked:
                    type: boolean
                    example: true
                  Department:
                    type: string
                    example: Other
                  ReceiveTechUpdates:
                    type: boolean
                    example: true
                  LastLogin:
                    type: string
                    example: '2018-02-01T18:31:22.896Z'
                  CreatedOn:
                    type: string
                    example: '2018-02-01T18:31:22.896Z'
                  UpdatedOn:
                    type: string
                    example: '2018-02-01T18:31:22.896Z'
                  Groups:
                    example: []
              CreatedBy:
                type: object
                properties:
                  ID:
                    type: integer
                  FirstName:
                    type: string
                    example: John
                  LastName:
                    type: string
                    example: Doe
                  FullName:
                    type: string
                    example: John Doe
                  Email:
                    type: string
                    example: JDoe@contoso.com
                  Username:
                    type: string
                    example: j.doe.contoso
                  MfaFactorAuth:
                    type: boolean
                    example: true
                  Status:
                    type: string
                    example: active
                  Owner:
                    type: boolean
                    example: true
                  Visibile:
                    type: boolean
                    example: true
                  Locked:
                    type: boolean
                    example: true
                  Department:
                    type: string
                    example: Other
                  ReceiveTechUpdates:
                    type: boolean
                    example: true
                  LastLogin:
                    type: string
                    example: '2018-02-01T18:31:22.896Z'
                  CreatedOn:
                    type: string
                    example: '2018-02-01T18:31:22.896Z'
                  UpdatedOn:
                    type: string
                    example: '2018-02-01T18:31:22.896Z'
                  Groups:
                    example: []
    EnvironmentBulkAdd:
      type: array
      items:
        $ref: '#/components/schemas/EnvironmentAdd'
    EnvironmentBulkUpdate:
      type: array
      items:
        type: object
        properties:
          EnvironmentId:
            type: integer
          Name:
            type: string
          Description:
            type: string
          Parent:
            type: object
            nullable: true
            example: null
          ShortName:
            type: string
          Tier:
            type: string
            enum:
              - Essentials
              - Core
      xml:
        name: EnvironmentBulkUpdate
    EnvironmentBulkResponse:
      type: array
      items:
        $ref: '#/components/schemas/EnvironmentResponse'
    EnvironmentRelatedEntitiesResponse:
      type: object
      properties:
        Success:
          type: boolean
          example: true
        Data:
          type: object
          properties:
            ID:
              type: integer
              example: 1
            LaunchPoints:
              type: array
              items:
                type: object
                properties:
                  ID:
                    type: integer
                    example: 1
                  Alias:
                    type: string
                    example: string
                  SystemID:
                    type: integer
                    example: 1
                  InspectorID:
                    type: integer
                    example: 25
                  InspectorName:
                    type: string
                    example: string
                  Enabled:
                    type: boolean
                    example: true
                  Status:
                    type: string
                    example: string
            Agents:
              type: array
              items:
                type: object
                properties:
                  ID:
                    type: integer
                    example: 1
                  Name:
                    type: string
                    example: string
                  Description:
                    type: string
                    example: string
                  Hostname:
                    type: string
                    example: ip address
                  Platform:
                    type: string
                    example: string
                  Managed:
                    type: boolean
                    example: true
            IntegrationMappings:
              type: array
              items:
                type: object
                properties:
                  ID:
                    type: integer
                    example: 1
                  Integration:
                    type: string
                    example: string
            ChildEnvironments:
              type: array
              items:
                type: object
                properties:
                  ID:
                    type: integer
                    example: 1
                  Name:
                    type: string
                    example: string
                  Status:
                    type: integer
                    example: 1
                  Visible:
                    type: boolean
                    example: true
      xml:
        name: EnvironmentRelatedEntitiesResponse
    TimelineResponse:
      type: object
      properties:
        ID:
          type: integer
          example: 3054681
        ServiceProviderID:
          type: integer
          example: 78
        EnvironmentID:
          type: integer
          example: 33897
        LaunchpointID:
          type: integer
          example: 95248
        Status:
          type: string
          example: Completed
        AdHoc:
          type: boolean
          example: false
        SystemID:
          type: integer
          example: 21955
          nullable: true
        SystemDetailID:
          type: integer
          nullable: true
          example: 613300
        ChangeDetections:
          type: integer
          example: 1
        Latest:
          type: boolean
          example: true
        CreatedOn:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}\+\d{2}:\d{2}$
          example: '2024-08-21T21:46:31.185+00:00'
        UpdatedOn:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}\+\d{2}:\d{2}$
          example: '2024-08-21T21:46:48.989+00:00'
        ExitCode:
          type: integer
          example: 0
        ExitMessage:
          type: string
          example: ''
        ScheduledAt:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}\+\d{2}:\d{2}$
          example: '2024-08-21T21:46:31.185+00:00'
        ProcessingAt:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}\+\d{2}:\d{2}$
          example: '2024-08-21T21:42:30.761+00:00'
          nullable: true
        RunningAt:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}\+\d{2}:\d{2}$
          example: '2024-08-21T21:45:42.832+00:00'
        FinishedAt:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}\+\d{2}:\d{2}$
          example: '2024-08-21T21:45:44.286+00:00'
        PayloadSizeBytes:
          type: integer
          example: 232541
          nullable: true
        PayloadPath:
          type: string
          nullable: true
        LamdaID:
          type: string
          nullable: true
        Alerts:
          type: integer
          example: 0
        Launchpoint:
          type: object
          properties:
            NextScheduledFor:
              type: string
              pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}\+\d{2}:\d{2}$
              example: '2024-08-22T21:44:56.000+00:00'
x-readme:
  explorer-enabled: true
  proxy-enabled: true
  samples-enabled: true
