Red Hat OpenShift Service Logs API

The Service Logs API from Red Hat OpenShift — 6 operation(s) for service logs.

GitHub OpenAPI

Operations 9

GET /api/service_logs/v1/cluster_logs Get all service logs #
POST /api/service_logs/v1/cluster_logs Create a new log record #
DELETE /api/service_logs/v1/cluster_logs/{id} Delete log record by record id #
GET /api/service_logs/v1/cluster_logs/{id} Get log by record id #
GET /api/service_logs/v1/clusters/cluster_logs Get all service logs for a cluster specified by cluster_id and/or cluster_uuid #
GET /api/service_logs/v1/clusters/cluster_logs/notifications Get notification status for service logs of a cluster #
GET /api/service_logs/v1/clusters/{uuid}/cluster_logs Get all service logs for a specific cluster #
DELETE /api/service_logs/v1/warehouse Warehouse service logs for clusters specified by a comma-separated cluster_ids… #
GET /api/service_logs/v1/warehouse Get number of service logs for clusters specified by a comma-separated… #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/red-hat-openshift:red-hat-openshift-service-logs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

red-hat-openshift-service-logs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Red Hat Openshift Service Logs API
  version: 0.0.1
  description: 'Operations tagged Service Logs across 2 of this provider''s published API definitions: red-hat-openshift-ocm-service-logs-openapi.json, red-hat-openshift-ocm-service-logs-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- description: current domain
  url: http://localhost:8000
- description: Main (production) server
  url: https://api.openshift.com
- description: Staging server
  url: https://api.stage.openshift.com
tags:
- name: Service Logs
paths:
  /api/service_logs/v1/cluster_logs:
    get:
      deprecated: true
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/size'
      - $ref: '#/components/parameters/search'
      - $ref: '#/components/parameters/order'
      - $ref: '#/components/parameters/orderBy'
      - $ref: '#/components/parameters/fields'
      - $ref: '#/components/parameters/format'
      - $ref: '#/components/parameters/fetchAccounts'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClusterLogList'
          description: A JSON array of Cluster Service records
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Auth token is invalid
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unauthorized to perform operation
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error occurred
      security:
      - Bearer: []
      - AccessToken: []
      summary: Get all service logs
      tags:
      - Service Logs
      operationId: getApiServiceLogsV1ClusterLogs
      x-operation-id-source: derived
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClusterLogRequest'
        description: Log record
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClusterLog'
          description: Log record was Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Validation errors occurred
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Auth token is invalid
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unauthorized to perform operation
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: An unexpected error occurred creating the log
      security:
      - Bearer: []
      - AccessToken: []
      summary: Create a new log record
      tags:
      - Service Logs
      operationId: postApiServiceLogsV1ClusterLogs
      x-operation-id-source: derived
    servers:
    - description: current domain
      url: http://localhost:8000
    - description: Main (production) server
      url: https://api.openshift.com
    - description: Staging server
      url: https://api.stage.openshift.com
  /api/service_logs/v1/cluster_logs/{id}:
    delete:
      parameters:
      - $ref: '#/components/parameters/id'
      responses:
        '204':
          description: Log record successfully deleted
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Auth token is invalid
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unauthorized to perform operation
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: No log record with specified id exist
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: An unexpected error occurred deleting the log records
      security:
      - Bearer: []
      - AccessToken: []
      summary: Delete log record by record id
      tags:
      - Service Logs
      operationId: deleteApiServiceLogsV1ClusterLogsById
      x-operation-id-source: derived
    get:
      parameters:
      - $ref: '#/components/parameters/id'
      - $ref: '#/components/parameters/cluster_id'
      - $ref: '#/components/parameters/subscription_id'
      - $ref: '#/components/parameters/organization_id'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClusterLog'
          description: A JSON of the log record
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Auth token is invalid
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unauthorized to perform operation
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error occurred
      security:
      - Bearer: []
      - AccessToken: []
      summary: Get log by record id
      tags:
      - Service Logs
      operationId: getApiServiceLogsV1ClusterLogsById
      x-operation-id-source: derived
    servers:
    - description: current domain
      url: http://localhost:8000
    - description: Main (production) server
      url: https://api.openshift.com
    - description: Staging server
      url: https://api.stage.openshift.com
  /api/service_logs/v1/clusters/cluster_logs:
    get:
      parameters:
      - $ref: '#/components/parameters/any_id'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/size'
      - $ref: '#/components/parameters/search'
      - $ref: '#/components/parameters/order'
      - $ref: '#/components/parameters/orderBy'
      - $ref: '#/components/parameters/fields'
      - $ref: '#/components/parameters/format'
      - $ref: '#/components/parameters/fetchAccounts'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClusterLogList'
            text/csv:
              schema:
                type: string
          description: A JSON array or CSV of Cluster Service records
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Bad request: At least one of cluster_uuid and cluster_id is required'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Auth token is invalid
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unauthorized to perform operation
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error occurred
      security:
      - Bearer: []
      summary: Get all service logs for a cluster specified by cluster_id and/or cluster_uuid
      tags:
      - Service Logs
      operationId: getApiServiceLogsV1ClustersClusterLogs
      x-operation-id-source: derived
    servers:
    - description: current domain
      url: http://localhost:8000
    - description: Main (production) server
      url: https://api.openshift.com
    - description: Staging server
      url: https://api.stage.openshift.com
  /api/service_logs/v1/clusters/cluster_logs/notifications:
    get:
      description: 'Returns notification bookkeeping fields for service logs on a cluster

        identified by cluster_id and/or cluster_uuid (via any-id). Supported

        query parameters are any-id, page, size, search, order, and orderBy. Unlike

        GET /api/service_logs/v1/clusters/cluster_logs, this endpoint does not

        support fields, format, or fetchAccounts.


        Field semantics:

        - notification_uuid is null until the log matches a notification trigger

        and is queued; a pending notification has a uuid and a null notified_at.

        - notified_at is set when the async trigger job finishes processing the

        log (all matched actions for that run completed).

        - completed_actions lists each successfully executed trigger action

        (opaque hash, type, status, completed_at). Empty until at least one

        action has completed.'
      parameters:
      - $ref: '#/components/parameters/any_id'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/size'
      - $ref: '#/components/parameters/search'
      - $ref: '#/components/parameters/order'
      - $ref: '#/components/parameters/orderBy'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClusterLogNotificationList'
          description: Notification status for matching service logs
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Bad request: At least one of cluster_uuid and cluster_id is required'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Auth token is invalid
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unauthorized to perform operation
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error occurred
      security:
      - Bearer: []
      summary: Get notification status for service logs of a cluster
      tags:
      - Service Logs
      operationId: getApiServiceLogsV1ClustersClusterLogsNotifications
      x-operation-id-source: derived
    servers:
    - description: current domain
      url: http://localhost:8000
    - description: Main (production) server
      url: https://api.openshift.com
    - description: Staging server
      url: https://api.stage.openshift.com
  /api/service_logs/v1/clusters/{uuid}/cluster_logs:
    get:
      parameters:
      - $ref: '#/components/parameters/uuid'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/size'
      - $ref: '#/components/parameters/search'
      - $ref: '#/components/parameters/order'
      - $ref: '#/components/parameters/orderBy'
      - $ref: '#/components/parameters/fields'
      - $ref: '#/components/parameters/format'
      - $ref: '#/components/parameters/fetchAccounts'
      - $ref: '#/components/parameters/cluster_id'
      - $ref: '#/components/parameters/subscription_id'
      - $ref: '#/components/parameters/organization_id'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClusterLogList'
            text/csv:
              schema:
                type: string
          description: A JSON array or CSV of Cluster Service records
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Auth token is invalid
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unauthorized to perform operation
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error occurred
      security:
      - Bearer: []
      summary: Get all service logs for a specific cluster
      tags:
      - Service Logs
      operationId: getApiServiceLogsV1ClustersByUuidClusterLogs
      x-operation-id-source: derived
    servers:
    - description: current domain
      url: http://localhost:8000
    - description: Main (production) server
      url: https://api.openshift.com
    - description: Staging server
      url: https://api.stage.openshift.com
  /api/service_logs/v1/warehouse:
    delete:
      parameters:
      - $ref: '#/components/parameters/any_id'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WarehouseCount'
          description: Log records were successfully warehoused
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Auth token is invalid
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unauthorized to perform operation
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: No log record with specified id exist
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: An unexpected error occurred deleting the log records
      security:
      - Bearer: []
      summary: Warehouse service logs for clusters specified by a comma-separated cluster_ids…
      tags:
      - Service Logs
      operationId: deleteApiServiceLogsV1Warehouse
      x-operation-id-source: derived
    get:
      parameters:
      - $ref: '#/components/parameters/any_id'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WarehouseCount'
          description: A number of records found (in `total` field)
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Bad request: At least one of cluster_uuid and cluster_id is required'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Auth token is invalid
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unauthorized to perform operation
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error occurred
      security:
      - Bearer: []
      summary: Get number of service logs for clusters specified by a comma-separated…
      tags:
      - Service Logs
      operationId: getApiServiceLogsV1Warehouse
      x-operation-id-source: derived
    servers:
    - description: current domain
      url: http://localhost:8000
    - description: Main (production) server
      url: https://api.openshift.com
    - description: Staging server
      url: https://api.stage.openshift.com
components:
  schemas:
    CompletedAction:
      properties:
        completed_at:
          description: When this action finished successfully.
          format: date-time
          type: string
        hash:
          description: 'Opaque SHA-256 digest of the trigger action identity (Action.Hash).

            Does not contain raw webhook URLs, tokens, or other secrets.

            '
          type: string
        status:
          description: 'Completion status. Currently always "completed"; reserved for

            future states (e.g. failed / skipped).

            '
          type: string
        type:
          description: Trigger action type that completed.
          enum:
          - email
          - webhook
          - support_case
          type: string
      required:
      - hash
      - status
      - completed_at
      type: object
    ClusterLog:
      allOf:
      - $ref: '#/components/schemas/ObjectReference'
      - properties:
          cluster_id:
            description: Internal Id of a cluster, required unless cluster_uuid is provided
            type: string
          cluster_uuid:
            description: External id of a cluster, required unless cluster_id is provided
            type: string
          created_at:
            format: date-time
            type: string
          created_by:
            type: string
          description:
            type: string
          doc_references:
            items:
              type: string
            type: array
          email:
            type: string
          event_stream_id:
            type: string
          first_name:
            type: string
          internal_only:
            default: false
            type: boolean
          last_name:
            type: string
          log_type:
            enum:
            - clustercreate-high-level
            - clustercreate-details
            - clusterremove-high-level
            - clusterremove-details
            - cluster-state-updates
            - Cluster Subscription
            - Cluster Lifecycle
            - Cluster Updates
            - Cluster Ownership
            - Cluster Access
            - Cluster Scaling
            - Capacity Management
            - Cluster Configuration
            - Cluster Security
            - Cluster Add-ons
            - Customer Support
            - Cluster Networking
            - General Notification
            - cluster-transfer-recipient
            type: string
          service_name:
            type: string
          severity:
            enum:
            - Debug
            - Low
            - Moderate
            - Important
            - Critical
            type: string
          subscription_id:
            type: string
          summary:
            type: string
          timestamp:
            format: date-time
            type: string
          username:
            type: string
        type: object
    ClusterLogNotification:
      allOf:
      - $ref: '#/components/schemas/ObjectReference'
      - properties:
          completed_actions:
            description: 'Per-action completion records for this log. Empty (or omitted)

              until at least one trigger action has completed successfully.

              '
            items:
              $ref: '#/components/schemas/CompletedAction'
            type: array
          notification_uuid:
            description: 'UUID assigned when the log matches a notification trigger and is

              queued. Null if the log has never been selected for notification.

              '
            type:
            - string
            - 'null'
          notified_at:
            description: 'Timestamp when the async trigger job finished processing this

              log. Null while still pending (even if notification_uuid is set)

              or if never notified. Per-action detail is in completed_actions.

              '
            format: date-time
            type:
            - string
            - 'null'
        type: object
    WarehouseCount:
      properties:
        total:
          format: int64
          type: integer
      required:
      - total
    ClusterLogNotificationList:
      allOf:
      - $ref: '#/components/schemas/List'
      - properties:
          items:
            items:
              $ref: '#/components/schemas/ClusterLogNotification'
            type: array
        type: object
    ObjectReference:
      properties:
        href:
          type: string
        id:
          type: string
        kind:
          type: string
      type: object
    List:
      properties:
        kind:
          type: string
        page:
          format: int32
          type: integer
        size:
          format: int32
          type: integer
        total:
          format: int32
          type: integer
      required:
      - items
      - kind
      - page
      - size
      - total
      type: object
    ClusterLogList:
      allOf:
      - $ref: '#/components/schemas/List'
      - properties:
          items:
            items:
              $ref: '#/components/schemas/ClusterLog'
            type: array
        type: object
    ClusterLogRequest:
      allOf:
      - $ref: '#/components/schemas/ClusterLog'
      - required:
        - severity
        - service_name
        - summary
        type: object
    Error:
      allOf:
      - $ref: '#/components/schemas/ObjectReference'
      - properties:
          code:
            type: string
          operation_id:
            type: string
          reason:
            type: string
        type: object
  parameters:
    organization_id:
      description: Id of an organization (organization_id)
      in: query
      name: organization_id
      required: false
      schema:
        type: string
    page:
      description: 'Page number of record list when record list exceeds specified page size

        '
      explode: true
      in: query
      name: page
      required: false
      schema:
        default: 1
        format: int32
        minimum: 1
        type: integer
      style: form
    subscription_id:
      description: Id of a subscription (subscription_id)
      in: query
      name: subscription_id
      required: false
      schema:
        type: string
    order:
      description: 'Specifies the order criteria using the syntax of an SQL ORDER BY

        clause, with service log field names. For example: `timestamp desc`.

        If omitted, the result order is undefined.'
      explode: true
      in: query
      name: order
      required: false
      schema:
        type: string
      style: form
    any_id:
      in: query
      name: any-id
      required: true
      schema:
        minProperties: 1
        properties:
          cluster_id:
            description: Id of a cluster (cluster_id)
            type: string
          cluster_uuid:
            description: External id of a cluster (cluster_uuid)
            type: string
        type: object
    search:
      description: 'Specifies the search criteria. The syntax of this parameter is

        similar to the syntax of the _where_ clause of an SQL statement,

        using the names of the json attributes / column names of the account.

        For example, in order to retrieve all the accounts with a username

        starting with `my`:

        ```sql

        username like ''my%''\n

        ```


        > **Important Note**:

        OCM Service Log uses **KSUID** as an **ID** field.

        KSUID contains a timestamp component that allows them to be sorted by generation time.

        As this field uses an index, please use it to sort by instead of `created_at` field.


        The search criteria can also be applied on related resource.

        For example, in order to retrieve all the subscriptions

        labeled by `foo=bar`,


        ```sql

        subscription_labels.key = ''foo'' and subscription_labels.value = ''bar''

        ```


        If the parameter isn''t provided, or if the value is empty, then

        all the accounts that the user has permission to see will be returned."

        '
      explode: true
      in: query
      name: search
      required: false
      schema:
        type: string
      style: form
    size:
      description: Maximum number of records to return
      explode: true
      in: query
      name: size
      required: false
      schema:
        default: 100
        format: int32
        minimum: 0
        type: integer
      style: form
    uuid:
      description: UUID of the record (clusterUUID)
      explode: false
      in: path
      name: uuid
      required: true
      schema:
        type: string
      style: simple
    orderBy:
      description: Legacy alias for `order`; accepts the same ordering criteria.
      explode: true
      in: query
      name: orderBy
      required: false
      schema:
        type: string
      style: form
    cluster_id:
      description: Id of a cluster (cluster_id)
      in: query
      name: cluster_id
      required: false
      schema:
        type: string
    id:
      description: The id of the record
      explode: false
      in: path
      name: id
      required: true
      schema:
        type: string
      style: simple
    fields:
      description: "Supplies a comma-separated list of fields to be returned.\nFields of sub-structures and of arrays use <structure>.<field>\nnotation.\n<stucture>.* means all field of a structure\nExample: For each Subscription to get id, href, plan(id and kind) and\nlabels (all fields)\n\n```\nocm get subscriptions \\\n  --parameter fields=id,href,plan.id,plan.kind,labels.* \\\n  --parameter fetchLabels=true\n```"
      in: query
      name: fields
      required: false
      schema:
        type: string
    fetchAccounts:
      description: 'If true, includes the account reference information in the output.

        Could slow request response time.

        '
      in: query
      name: fetchAccounts
      required: false
      schema:
        type: boolean
    format:
      description: Get log records in various format types (eg. csv/json)
      explode: true
      in: query
      name: format
      required: false
      schema:
        type: string
      style: form
  securitySchemes:
    AccessToken:
      description: 'Authorization: AccessToken {cluster-uuid}:{access-token}'
      in: header
      name: Authorization
      type: apiKey
    Bearer:
      bearerFormat: JWT
      scheme: bearer
      type: http
x-refined-from:
- red-hat-openshift-ocm-service-logs-openapi.json
- red-hat-openshift-ocm-service-logs-openapi.yml