openapi: 3.0.0 info: title: API Reference AlertService LicenseService API version: '1' description: API reference for the StackRox Kubernetes Security Platform (upstream of Red Hat Advanced Cluster Security). Provides risk analysis, visibility, runtime alerts, policy management, compliance checking, and vulnerability management for containerized workloads. Authentication uses API tokens generated via /v1/apitokens/generate and passed as Bearer tokens. contact: email: support@stackrox.com url: https://www.stackrox.io/ license: name: All Rights Reserved url: https://www.stackrox.com/ servers: - url: https://{central-host} description: StackRox Central API server variables: central-host: default: stackrox.localhost description: StackRox Central hostname or IP security: - ApiToken: [] tags: - name: LicenseService paths: /v1/licenses/add: post: operationId: AddLicense responses: '200': description: A successful response. content: application/json: schema: $ref: '#/components/schemas/v1AddLicenseResponse' requestBody: content: application/json: schema: $ref: '#/components/schemas/v1AddLicenseRequest' required: true tags: - LicenseService /v1/licenses/expiration: get: operationId: GetActiveLicenseExpiration responses: '200': description: A successful response. content: application/json: schema: $ref: '#/components/schemas/v1GetActiveLicenseExpirationResponse' tags: - LicenseService /v1/licenses/list: get: operationId: GetLicenses responses: '200': description: A successful response. content: application/json: schema: $ref: '#/components/schemas/v1GetLicensesResponse' parameters: - name: active in: query required: false schema: type: boolean format: boolean - name: statuses in: query required: false explode: true schema: type: array items: type: string enum: - UNKNOWN - VALID - REVOKED - NOT_YET_VALID - EXPIRED - OTHER tags: - LicenseService components: schemas: LicenseContact: type: object properties: phone: type: string email: type: string url: type: string name: type: string licenseLicenseMetadata: type: object properties: id: type: string signingKeyId: type: string issueDate: type: string format: date-time licensedForId: type: string licensedForName: type: string v1GetLicensesResponse: type: object properties: licenses: type: array items: $ref: '#/components/schemas/v1LicenseInfo' LicenseRestrictions: type: object properties: notValidBefore: type: string format: date-time notValidAfter: type: string format: date-time enforcementUrl: type: string description: URL for on-line license enforcement. Must be set unless allow_offline is true. allowOffline: type: boolean format: boolean description: Allow offline use (i.e., no online license enforcement). maxNodes: type: integer format: int32 description: Maximum number of nodes. Must be set unless no_node_restriction is true. noNodeRestriction: type: boolean format: boolean description: Do not restrict the number of nodes. buildFlavors: type: array items: type: string description: 'Build flavors of the product this license is valid for (e.g., "development" or "release"). Must be set unless no_build_flavor_restriction is true.' noBuildFlavorRestriction: type: boolean format: boolean description: Do not restrict license to certain build flavors. deploymentEnvironments: type: array items: type: string description: 'Deployment environments that are valid for the product, such as `gcp` or `gcp/ultra-current-825`. Must be set unless no_deployment_environment_restriction is true.' noDeploymentEnvironmentRestriction: type: boolean format: boolean description: Do not restrict license to certain deployment environments. v1AddLicenseRequest: type: object properties: licenseKey: type: string activate: type: boolean format: boolean description: Indicates whether the license represented by this key should be made the active license. v1AddLicenseResponse: type: object properties: license: $ref: '#/components/schemas/v1LicenseInfo' accepted: type: boolean format: boolean description: 'Indicates whether or not the license was accepted by the product. Only licenses which are either valid or not yet valid will be accepted. Note that we prefer this over a GRPC error, as it might be helpful to show the, e.g., contact information from the decoded blob.' v1LicenseInfo: type: object properties: license: $ref: '#/components/schemas/licenseLicense' status: $ref: '#/components/schemas/v1LicenseInfoStatus' statusReason: type: string active: type: boolean format: boolean licenseLicense: type: object properties: metadata: $ref: '#/components/schemas/licenseLicenseMetadata' supportContact: $ref: '#/components/schemas/LicenseContact' restrictions: $ref: '#/components/schemas/LicenseRestrictions' v1GetActiveLicenseExpirationResponse: type: object properties: expirationTime: type: string format: date-time v1LicenseInfoStatus: type: string enum: - UNKNOWN - VALID - REVOKED - NOT_YET_VALID - EXPIRED - OTHER default: UNKNOWN securitySchemes: ApiToken: type: apiKey in: header name: Authorization description: 'StackRox API token. Format: Bearer {token}'