openapi: 3.0.3 info: title: 'SAM: Computers Applications Costs 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: Costs paths: /api/sam/v1/licenses/{id}/costs: get: tags: - Costs summary: Get License Costs description: Returns a collection of license costs. operationId: getLicenseCostCollection parameters: - name: id in: path required: true description: The unique ID of the license. schema: type: string example: 49cdd99f-bc16-40f9-ad40-48f12182fb30 - name: filter in: query description: 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 example: filter=status -eq "active" - name: page_number in: query description: The page number. schema: type: integer default: 1 minimum: 1 - name: page_size in: query description: The maximum number of items in the response. schema: type: integer default: 100 minimum: 1 responses: '200': description: 'OK: Your request succeeded.' content: application/json: schema: $ref: '#/components/schemas/HateoasCollectionOfLicenseCost' '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: 'Bad Request: Your request is invalid or improperly formed. Consequently, the API server could not understand your request.' '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. '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. security: - BearerAuth: - sam.license.r /api/sam/v1/licenses/{id}/costs/{organizationId}: get: tags: - Costs summary: Get a License Costs for an Organization description: Returns the details of a license costs for an organization. operationId: getLicenseCost parameters: - name: id in: path required: true description: The unique ID of the license. schema: type: string example: 49cdd99f-bc16-40f9-ad40-48f12182fb30 - name: organizationId in: path required: true description: The unique ID of the organization. schema: type: string example: 49cdd99f-bc16-40f9-ad40-48f12182fb30 responses: '200': description: 'OK: Your request succeeded.' content: application/json: schema: $ref: '#/components/schemas/LicenseCost' '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: 'Bad Request: Your request is invalid or improperly formed. Consequently, the API server could not understand your request.' '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. '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. security: - BearerAuth: - sam.license.r /api/sam/v1/licenses/{id}/costs-summary: get: tags: - Costs summary: Get a License Costs Summary description: Returns the details of a license costs. operationId: getLicenseCostSummary parameters: - name: id in: path required: true description: The unique ID of the license. schema: type: string example: 49cdd99f-bc16-40f9-ad40-48f12182fb30 responses: '200': description: 'OK: Your request succeeded.' content: application/json: schema: $ref: '#/components/schemas/LicenseCostSummary' '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: 'Bad Request: Your request is invalid or improperly formed. Consequently, the API server could not understand your request.' '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. '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. security: - BearerAuth: - sam.license.r components: schemas: Link: type: object description: Represents a hypermedia link referenced from a IResource, according to HATEOAS. additionalProperties: false properties: href: type: string description: The associated relative URL. nullable: true example: /api/custom-fields/v1/custom-fields rel: type: string description: Specifies the relationship between the current document and the linked document/resource. nullable: true example: self method: type: string description: The method to access related resources. nullable: true example: GET HateoasCollectionOfLicenseCost: allOf: - $ref: '#/components/schemas/FilteredResponseOfLicenseCost' - type: object additionalProperties: false required: - _links properties: _links: type: array description: A collection of links to related resources. items: $ref: '#/components/schemas/Link' HateoasResource: type: object additionalProperties: false required: - _links properties: _links: type: array description: A collection of links to related resources. items: $ref: '#/components/schemas/Link' LicenseCost: allOf: - $ref: '#/components/schemas/HateoasResource' - type: object description: The license cost. additionalProperties: false properties: licenseId: type: string description: The unique ID of the license. format: guid example: 49cdd99f-bc16-40f9-ad40-48f12182fb30 organizationId: type: string description: The unique ID of the organization. format: guid example: 49cdd99f-bc16-40f9-ad40-48f12182fb30 licenseQuantity: type: integer description: The quantity. format: int32 example: 1 licensePurchaseCost: type: number description: The license purchase value. format: decimal example: 1000 currentMaintenanceCost: type: number description: The current maintenance cost. format: decimal example: 1000 accumulatedMaintenanceCost: type: number description: The accumulated maintenance cost. format: decimal example: 1000 currentSupportCost: type: number description: The current support cost. format: decimal example: 1000 accumulatedSupportCost: type: number description: The accumulated support cost. format: decimal example: 1000 totalCost: type: number description: The total license cost. format: decimal example: 1000 currency: type: string description: The currency. nullable: true example: USD ErrorResponse: type: object required: - error properties: error: $ref: '#/components/schemas/Error' FilteredResponseOfLicenseCost: type: object description: Filtered response. additionalProperties: false required: - items - pagination properties: items: type: array description: A collection of items. items: $ref: '#/components/schemas/LicenseCost' pagination: description: The pagination details. oneOf: - $ref: '#/components/schemas/Pagination' LicenseCostSummary: allOf: - $ref: '#/components/schemas/HateoasResource' - type: object description: The license cost summary. additionalProperties: false properties: licenseId: type: string description: The unique ID of the license. format: guid example: 49cdd99f-bc16-40f9-ad40-48f12182fb30 quantity: type: integer description: The quantity. format: int32 example: 1 purchaseCost: type: number description: The license purchase value. format: decimal example: 1000 currentMaintenanceCost: type: number description: The current maintenance cost. format: decimal example: 1000 accumulatedMaintenanceCost: type: number description: The accumulated maintenance cost. format: decimal example: 1000 currentSupportCost: type: number description: The current support cost. format: decimal example: 1000 accumulatedSupportCost: type: number description: The accumulated support cost. format: decimal example: 1000 totalCost: type: number description: The total license cost. format: decimal example: 1000 averageCostPerLicensePurchase: type: number description: The average cost per license purchase. format: decimal example: 100 currency: type: string description: The currency. nullable: true example: USD Pagination: type: object description: The pagination details. 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: 5 total_items: type: integer description: The total number of items. format: int32 nullable: true example: 100 Error: description: The error details. type: object required: - code - message properties: code: type: integer format: int32 description: The HTTP status code. message: type: string description: The error message. securitySchemes: BearerAuth: type: http scheme: bearer bearerFormat: JWT