openapi: 3.1.0 info: title: openobserve Actions ServiceAccounts API description: OpenObserve API documents [https://openobserve.ai/docs/](https://openobserve.ai/docs/) contact: name: OpenObserve url: https://openobserve.ai/ email: hello@zinclabs.io license: name: AGPL-3.0 identifier: AGPL-3.0 version: 0.90.0 tags: - name: ServiceAccounts paths: /api/{org_id}/service_accounts: get: tags: - ServiceAccounts summary: List service accounts description: Retrieves a list of all service accounts in the organization. Service accounts are special user accounts designed for automated systems and applications to authenticate and access resources without human intervention. Each service account has an associated API token for programmatic access. operationId: ServiceAccountsList parameters: - name: org_id in: path description: Organization name required: true schema: type: string responses: '200': description: Success content: application/json: schema: type: object security: - Authorization: [] x-o2-mcp: description: List service accounts category: users summary_fields: - email - role - first_name - last_name x-o2-ratelimit: module: Service Accounts operation: list post: tags: - ServiceAccounts summary: Create service account description: Creates a new service account for automated systems and applications. Service accounts provide a secure way for non-human users to authenticate and access resources programmatically. Each service account is automatically assigned an API token that can be used for authentication in automated workflows and integrations. operationId: ServiceAccountSave parameters: - name: org_id in: path description: Organization name required: true schema: type: string requestBody: description: ServiceAccount data content: application/json: schema: type: object required: - email properties: email: type: string first_name: type: string last_name: type: string required: true responses: '200': description: Success content: application/json: schema: type: object security: - Authorization: [] x-o2-ratelimit: module: Service Accounts operation: create x-o2-mcp: description: Create service account category: users /api/{org_id}/service_accounts/{email_id}: put: tags: - ServiceAccounts summary: Update service account description: Updates an existing service account's information such as first name and last name. You can also rotate the API token by adding the 'rotateToken=true' query parameter, which generates a new authentication token while invalidating the old one. This is useful for security maintenance and credential rotation policies. operationId: ServiceAccountUpdate parameters: - name: org_id in: path description: Organization name required: true schema: type: string - name: email_id in: path description: Service Account email id required: true schema: type: string requestBody: description: Service Account data content: application/json: schema: type: object properties: first_name: type: string last_name: type: string required: true responses: '200': description: Success content: application/json: schema: type: object security: - Authorization: [] x-o2-ratelimit: module: Service Accounts operation: update x-o2-mcp: description: Update service account category: users delete: tags: - ServiceAccounts summary: Delete service account description: Permanently removes a service account from the organization. This action immediately invalidates the associated API token and revokes all access permissions for the service account. Use this when decommissioning automated systems or cleaning up unused accounts. This operation cannot be undone. operationId: RemoveServiceAccount parameters: - name: org_id in: path description: Organization name required: true schema: type: string - name: email_id in: path description: Service Account email id required: true schema: type: string responses: '200': description: Success content: application/json: schema: type: object '404': description: NotFound content: application/json: schema: default: null security: - Authorization: [] x-o2-mcp: description: Delete service account category: users requires_confirmation: true x-o2-ratelimit: module: Service Accounts operation: delete components: securitySchemes: Authorization: type: apiKey in: header name: Authorization BasicAuth: type: http scheme: basic