Snow Software Computer application metering API

The Computer application metering API from Snow Software — 2 operation(s) for computer application metering.

OpenAPI Specification

snow-software-computer-application-metering-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: 'SAM: Computers Applications Computer application metering API'
  description: API for interacting with computers.
  contact:
    name: Flexera
    url: https://www.flexera.com
  version: 1.0.0
servers:
- url: https://{region}.snowsoftware.io
  variables:
    region:
      enum:
      - westeurope
      - australiasoutheast
      - eastus2
      - uksouth
      default: westeurope
tags:
- name: Computer application metering
paths:
  /api/sam/estate/v1/computers-metering:
    get:
      tags:
      - Computer application metering
      summary: Get Application Metering
      description: Returns a collection of metric tracking data for computer applications.
      operationId: getApplicationMetering
      parameters:
      - name: page_number
        in: query
        description: The page number.
        schema:
          type: integer
          default: 1
          minimum: 1.0
      - name: page_size
        in: query
        description: The maximum number of items in the response.
        schema:
          type: integer
          default: 100
          minimum: 1.0
      - name: filter
        in: query
        description: 'The fields which you can use to filter the results. Format of the query string parameter:

          ```

          ?filter=<filter name> <operator> <value>

          ```

          Filter name | Description | Data type | Example

          :--- | --- | --- | ---


          For more information on the available operators and which data types those operators work on, see [Filter API call results](https://docs.snowsoftware.io/snow-atlas-api/resources/get-started-with-apis/api-conventions#filter-api-call-results).

          '
        schema:
          type: string
      responses:
        '200':
          description: 'OK: Your request succeeded.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilteredResponseWithLinksOfComputerApplicationMetering'
        '400':
          $ref: '#/components/responses/400'
        '500':
          $ref: '#/components/responses/500'
      security:
      - BearerAuth:
        - sam.computer.r
  /api/sam/estate/v1/computers/{id}/metering:
    get:
      tags:
      - Computer application metering
      summary: Get Application Metering by Computer
      description: Returns a collection of metric tracking data for applications on the given computer.
      operationId: getComputerApplicationMetering
      parameters:
      - name: id
        in: path
        required: true
        description: The unique ID of the computer.
        schema:
          type: string
      - name: page_number
        in: query
        description: The page number.
        schema:
          type: integer
          default: 1
          minimum: 1.0
      - name: page_size
        in: query
        description: The maximum number of items in the response.
        schema:
          type: integer
          default: 100
          minimum: 1.0
      - name: filter
        in: query
        description: 'The fields which you can use to filter the results. Format of the query string parameter:

          ```

          ?filter=<filter name> <operator> <value>

          ```

          Filter name | Description | Data type | Example

          :--- | --- | --- | ---


          For more information on the available operators and which data types those operators work on, see [Filter API call results](https://docs.snowsoftware.io/snow-atlas-api/resources/get-started-with-apis/api-conventions#filter-api-call-results).

          '
        schema:
          type: string
      responses:
        '200':
          description: 'OK: Your request succeeded.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilteredResponseWithLinksOfComputerApplicationMetering'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
      security:
      - BearerAuth:
        - sam.computer.r
components:
  schemas:
    ComputerApplicationMetering:
      allOf:
      - $ref: '#/components/schemas/BaseResponse'
      - type: object
        description: Response class for Computer application metric tracking.
        additionalProperties: false
        required:
        - computerId
        - metricId
        - applicationId
        properties:
          computerId:
            type: string
            description: The unique ID of the computer.
            format: guid
            minLength: 1
            example: a2c8ef89-cb18-49ea-b3c0-122d40fc0ba7
          metricId:
            type: string
            description: The unique ID of the metric used.
            format: guid
            minLength: 1
            example: ca90b444-dcd0-43ce-9190-0e51af24613c
          applicationId:
            type: string
            description: The unique ID of the application.
            format: guid
            minLength: 1
            example: 6f1cbfb3-ecc2-4e1b-8376-537ace3503c2
          initialRequirement:
            type: integer
            description: The initial requirement of the metric.
            format: int32
            example: 5
          includedInBundle:
            type: integer
            description: The number of applications included in the bundle.
            format: int32
            example: 5
          outsideMetricPeriod:
            type: integer
            description: The number of computers outside of the metric period.
            format: int32
            example: 5
          secondaryUseRightsDesktopLaptop:
            type: integer
            description: The number of computers with secondary use rights for a desktop or laptop.
            format: int32
            example: 5
          secondaryUseRightsDevice:
            type: integer
            description: The number of computers with secondary use rights for a device.
            format: int32
            example: 5
          extendedCoverageForDcc:
            type: integer
            description: The number of computers with extended coverage for DCC.
            format: int32
            example: 5
          extendedCoverageForHost:
            type: integer
            description: The number of computers with extended coverage for host.
            format: int32
            example: 5
          multipleVersionEdition:
            type: integer
            description: The number of computers with multiple version editions.
            format: int32
            example: 5
          virtualDesktopInfrastructure:
            type: integer
            description: The number of computers with virtual desktop infrastructure.
            format: int32
            example: 5
          minimumRequirement:
            type: integer
            description: The minimum requirement for the metric.
            format: int32
            example: 5
          coreFactor:
            type: integer
            description: The core factor of the computer for the metric.
            format: int32
            example: 5
          physicalHost:
            type: integer
            description: The physical host of the application for the metric.
            format: int32
            example: 5
          requirement:
            type: integer
            description: The requirement for the metric.
            format: int32
            example: 5
          computerAppExclusions:
            type: integer
            description: The number of computers which have application exclusions.
            format: int32
            example: 5
          windowsServer:
            type: integer
            description: The number of computers which are Windows servers.
            format: int32
            example: 5
          virtualMachine:
            type: integer
            description: The number of computers which are virtual machines.
            format: int32
            example: 5
          unknownPhysicalHost:
            type: integer
            description: The number of computers with an unknown physical host.
            format: int32
            example: 5
          manuallyExcluded:
            type: integer
            description: The number of computers manually excluded.
            format: int32
            example: 5
          requirementMoved:
            type: integer
            description: The number of computers with the requirements moved.
            format: int32
            example: 5
          windowsServerFlag:
            type: integer
            description: The number of computers with the Windows Server flag.
            format: int32
            example: 5
          sqlServer:
            type: integer
            description: The number of computers with the SQL Server flag.
            format: int32
            example: 5
    FilteredResponseWithLinksOfComputerApplicationMetering:
      allOf:
      - $ref: '#/components/schemas/BaseResponse'
      - type: object
        description: Generic response class supporting filtering and including links.
        additionalProperties: false
        required:
        - items
        - pagination
        properties:
          items:
            type: array
            description: A collection of items returned in the response.
            items:
              $ref: '#/components/schemas/ComputerApplicationMetering'
          pagination:
            description: The pagination details.
            oneOf:
            - $ref: '#/components/schemas/PaginationResponse'
    Link:
      type: object
      required:
      - href
      - rel
      - method
      properties:
        href:
          type: string
          description: The associated relative URL.
          example: api/computers/v1/...
        rel:
          type: string
          description: Specifies the relationship between the current document and the linked document/resource.
          example: self
        method:
          type: string
          description: The method to access related resources.
          example: GET
    ErrorResponse:
      type: object
      description: Response representing error.
      additionalProperties: false
      required:
      - error
      properties:
        error:
          description: The error details.
          oneOf:
          - $ref: '#/components/schemas/ErrorContent'
    ErrorContent:
      type: object
      description: Details of error.
      additionalProperties: false
      required:
      - code
      - message
      properties:
        code:
          type: integer
          description: Http error code.
          format: int32
          example: 400
        message:
          type: string
          description: Additional error message.
          nullable: true
          example: 'Invalid GUID format: 123. All computer IDs must be in valid GUID format (00000000-0000-0000-0000-000000000000).'
    BaseResponse:
      type: object
      description: Base response class.
      additionalProperties: false
      required:
      - _links
      properties:
        _links:
          type: array
          description: A collection of links to related resources.
          items:
            $ref: '#/components/schemas/Link'
    PaginationResponse:
      type: object
      description: Generic response class for the pagination part. Properties are annotated using DataMemberAttribute so that we're aligned with REST style guide regarding the json payload.
      additionalProperties: false
      required:
      - page_size
      - page_number
      properties:
        page_size:
          type: integer
          description: The page size you requested.
          format: int32
          example: 25
        page_number:
          type: integer
          description: The page number you requested.
          format: int32
          example: 1
        total_pages:
          type: integer
          description: The total number of pages.
          format: int32
          nullable: true
          example: 10
        total_items:
          type: integer
          description: The total number of items.
          format: int32
          nullable: true
          example: 240
  responses:
    '500':
      description: 'Internal Server Error: Your request failed due to an internal error.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: 500
              message: The service encountered an unexpected condition that prevented it from fulfilling the request.
    '400':
      description: 'Bad Request: Your request is invalid or improperly formed. Consequently, the API server could not understand your request.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: 400
              message: Filter field name needs to be formatted as a string.
    '404':
      description: 'Not Found: The operation you requested failed because a resource associated with your request could not be found.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: 404
              message: Resource with ID '32aeda0a-80dc-475a-907f-2d250a3a8614' not found.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT