openapi: 3.0.0 info: title: API Reference AlertService ServiceAccountService 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: ServiceAccountService paths: /v1/serviceaccounts: get: operationId: ListServiceAccounts responses: '200': description: A successful response. content: application/json: schema: $ref: '#/components/schemas/v1ListServiceAccountResponse' parameters: - name: query in: query required: false schema: type: string - name: pagination.limit in: query required: false schema: type: integer format: int32 - name: pagination.offset in: query required: false schema: type: integer format: int32 - name: pagination.sort_option.field in: query required: false schema: type: string - name: pagination.sort_option.reversed in: query required: false schema: type: boolean format: boolean tags: - ServiceAccountService /v1/serviceaccounts/{id}: get: operationId: GetServiceAccount responses: '200': description: A successful response. content: application/json: schema: $ref: '#/components/schemas/v1GetServiceAccountResponse' parameters: - name: id in: path required: true schema: type: string tags: - ServiceAccountService components: schemas: v1GetServiceAccountResponse: type: object properties: saAndRole: $ref: '#/components/schemas/v1ServiceAccountAndRoles' title: 'One service account Next Tag: 2' v1ServiceAccountAndRoles: type: object properties: serviceAccount: $ref: '#/components/schemas/storageServiceAccount' clusterRoles: type: array items: $ref: '#/components/schemas/storageK8sRole' scopedRoles: type: array items: $ref: '#/components/schemas/v1ScopedRoles' deploymentRelationships: type: array items: $ref: '#/components/schemas/v1SADeploymentRelationship' title: 'A service account and the roles that reference it Next Tag: 5' storageServiceAccount: type: object properties: id: type: string name: type: string namespace: type: string clusterName: type: string clusterId: type: string labels: type: object additionalProperties: type: string annotations: type: object additionalProperties: type: string createdAt: type: string format: date-time automountToken: type: boolean format: boolean secrets: type: array items: type: string imagePullSecrets: type: array items: type: string title: 'Any properties of an individual service account. (regardless of time, scope, or context) ////////////////////////////////////////' storageK8sRole: type: object properties: id: type: string name: type: string namespace: type: string clusterId: type: string clusterName: type: string clusterRole: type: boolean format: boolean labels: type: object additionalProperties: type: string annotations: type: object additionalProperties: type: string createdAt: type: string format: date-time rules: type: array items: $ref: '#/components/schemas/storagePolicyRule' title: 'Properties of an individual k8s Role or ClusterRole. ////////////////////////////////////////' v1ScopedRoles: type: object properties: namespace: type: string roles: type: array items: $ref: '#/components/schemas/storageK8sRole' v1SADeploymentRelationship: type: object properties: id: type: string title: Id of the deployment using the service account name: type: string description: Name of the deployment. title: 'Service accounts can be used by a deployment. Next Tag: 3' storagePolicyRule: type: object properties: verbs: type: array items: type: string apiGroups: type: array items: type: string resources: type: array items: type: string nonResourceUrls: type: array items: type: string resourceNames: type: array items: type: string title: 'Properties of an individual rules that grant permissions to resources. ////////////////////////////////////////' v1ListServiceAccountResponse: type: object properties: saAndRoles: type: array items: $ref: '#/components/schemas/v1ServiceAccountAndRoles' title: 'A list of service accounts (free of scoped information) Next Tag: 2' securitySchemes: ApiToken: type: apiKey in: header name: Authorization description: 'StackRox API token. Format: Bearer {token}'