Snow Software Policies API
The Policies API from Snow Software — 4 operation(s) for policies.
The Policies API from Snow Software — 4 operation(s) for policies.
openapi: 3.0.3
info:
title: 'SAM: Computers Applications Policies 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: Policies
paths:
/api/sam/v1/licenses-policies/{policyId}/fields:
get:
tags:
- Policies
summary: Get License Policy Fields
description: Returns a collection of license policy fields.
operationId: getLicensePolicyFieldCollection
parameters:
- name: policyId
in: path
required: true
description: The unique ID of the policy.
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/HateoasCollectionOfLicensePolicyFieldCollection'
'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-policies/{policyId}/fields/{fieldId}:
get:
tags:
- Policies
summary: Get License Policy Field Details
description: Returns the details of a license policy field.
operationId: getLicensePolicyField
parameters:
- name: policyId
in: path
required: true
description: The unique ID of the policy.
schema:
type: string
example: 49cdd99f-bc16-40f9-ad40-48f12182fb30
- name: fieldId
in: path
required: true
description: The unique ID of the policy field.
schema:
type: string
example: 49cdd99f-bc16-40f9-ad40-48f12182fb30
responses:
'200':
description: 'OK: Your request succeeded.'
content:
application/json:
schema:
$ref: '#/components/schemas/LicensePolicyField'
'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-policies:
get:
tags:
- Policies
summary: Get License Policies
description: Returns a collection of license policies.
operationId: getPolicyCollection
parameters:
- 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/HateoasCollectionOfPolicy'
'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.'
'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-policies/{policyId}:
get:
tags:
- Policies
summary: Get License Policy Details
description: Returns the details of a license policy.
operationId: getPolicy
parameters:
- name: policyId
in: path
required: true
description: The unique ID of the policy.
schema:
type: string
example: 49cdd99f-bc16-40f9-ad40-48f12182fb30
responses:
'200':
description: 'OK: Your request succeeded.'
content:
application/json:
schema:
$ref: '#/components/schemas/Policy'
'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
HateoasCollectionOfPolicy:
allOf:
- $ref: '#/components/schemas/FilteredResponseOfPolicy'
- type: object
additionalProperties: false
required:
- _links
properties:
_links:
type: array
description: A collection of links to related resources.
items:
$ref: '#/components/schemas/Link'
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
FilteredResponseOfPolicy:
type: object
description: Filtered response.
additionalProperties: false
required:
- items
- pagination
properties:
items:
type: array
description: A collection of items.
items:
$ref: '#/components/schemas/Policy'
pagination:
description: The pagination details.
oneOf:
- $ref: '#/components/schemas/Pagination'
HateoasResource:
type: object
additionalProperties: false
required:
- _links
properties:
_links:
type: array
description: A collection of links to related resources.
items:
$ref: '#/components/schemas/Link'
ErrorResponse:
type: object
required:
- error
properties:
error:
$ref: '#/components/schemas/Error'
LicensePolicyFieldCollection:
allOf:
- $ref: '#/components/schemas/HateoasResource'
- type: object
additionalProperties: false
properties:
id:
type: string
description: The unique ID of the policy field.
format: guid
example: 49cdd99f-bc16-40f9-ad40-48f12182fb30
name:
type: string
description: The policy field name.
nullable: true
example: InvoiceReference
description:
type: string
description: The policy field description.
nullable: true
example: InvoiceReference
isRequired:
type: boolean
description: '```true``` if is required; otherwise, ```false```.'
example: true
isComboBox:
type: boolean
description: '```true``` if is combo box; otherwise, ```false```.'
example: true
isEditingAllowed:
type: boolean
description: '```true``` if is editing allowed; otherwise, ```false```.'
example: true
listItems:
type: array
description: The list of item values.
nullable: true
example:
- Item
items:
type: string
HateoasCollectionOfLicensePolicyFieldCollection:
allOf:
- $ref: '#/components/schemas/FilteredResponseOfLicensePolicyFieldCollection'
- type: object
additionalProperties: false
required:
- _links
properties:
_links:
type: array
description: A collection of links to related resources.
items:
$ref: '#/components/schemas/Link'
FilteredResponseOfLicensePolicyFieldCollection:
type: object
description: Filtered response.
additionalProperties: false
required:
- items
- pagination
properties:
items:
type: array
description: A collection of items.
items:
$ref: '#/components/schemas/LicensePolicyFieldCollection'
pagination:
description: The pagination details.
oneOf:
- $ref: '#/components/schemas/Pagination'
LicensePolicyField:
allOf:
- $ref: '#/components/schemas/HateoasResource'
- type: object
additionalProperties: false
properties:
id:
type: string
description: The unique ID of the policy field.
format: guid
example: 49cdd99f-bc16-40f9-ad40-48f12182fb30
name:
type: string
description: The policy field name.
nullable: true
example: InvoiceReference
description:
type: string
description: The policy field description.
nullable: true
example: InvoiceReference
isRequired:
type: boolean
description: '```true``` if is required; otherwise, ```false```.'
nullable: true
example: true
isComboBox:
type: boolean
description: '```true``` if is combo box; otherwise, ```false```.'
nullable: true
example: true
isEditingAllowed:
type: boolean
description: '```true``` if editing is allowed; otherwise, ```false```.'
nullable: true
example: true
listItems:
type: array
description: The list of item values.
nullable: true
example:
- Item
items:
type: string
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.
Policy:
allOf:
- $ref: '#/components/schemas/HateoasResource'
- type: object
description: The license policy.
additionalProperties: false
properties:
id:
type: string
description: The unique ID of the license policy.
format: guid
example: 49cdd99f-bc16-40f9-ad40-48f12182fb30
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT