Query inspection objects

2025-01-10 06:15:54  Updated

Description

You can call this operation to query a list of inspection objects by type.

Call description

Prerequisites

You have passed the authentication for the OceanBase Cloud Platform (OCP) application service.

Request path

GET /api/v2/inspection/overview

Request parameters

Parameter Type Required Example value Description
objectIds Integer Yes 1 The ID of the inspection object in OCP, such as a cluster ID or tenant ID. Separate multiple IDs with commas (,).
inspectionObjectType Array Yes OB_CLUSTER The type of the inspection object. Valid values:
  • OB_CLUSTER: indicates an OceanBase cluster.
  • OB_TENANT: indicates an OceanBase Database tenant.
  • HOST: indicates a host.
  • OB_PROXY: indicates an OBProxy.
  • scheduleStates Array Yes ACTIVE The inspection scheduling status. Valid values:
  • ACTIVE: The inspection is enabled.
  • INACTIVE: The inspection is disabled.
  • EXPIRED: The inspection has expired.
  • name String Yes cluster_test The name of the inspection object.
    parentName String No AdminMeta The name of the parent object of the inspection object.

    Response parameters

    Basic data structure

    Parameter Type Description
    data Object The information of InspectionObjectOverview. For more information, see Data structure of InspectionObjectOverview.
    successful Boolean Indicates whether the request was successful.
    timestamp Datetime The timestamp when the server completed the request.
    duration Integer The amount of time taken by the server to process the request, in milliseconds.
    status Integer The HTTP status code.
    traceId String The trace ID of the request. This trace ID is used for troubleshooting.
    server String The address of the application server that responded to the request.

    Data structure of InspectionObjectOverview

    Parameter Type Description
    inspectionObject InspectionObject The information of InspectionObject. For more information, see Data structure of InspectionObject.
    scheduleState String The inspection scheduling status.
    deadline String The inspection scheduling deadline. If this parameter is left empty, there is no deadline for inspection scheduling.

    Data structure of InspectionObject

    Parameter Type Description
    objectId Integer The ID of the inspection object.
    inspectionObjectType String The type of the inspection object. Valid values:
  • OB_CLUSTER: indicates an OceanBase cluster.
  • OB_TENANT: indicates an OceanBase Database tenant.
  • HOST: indicates a host.
  • OB_PROXY: indicates an OBProxy.
  • name String The name of the inspection object.

    Examples

    Sample request

    GET /api/v2/inspection/overview

    Sample response

    {
        "data": {
            "contents": [
                {
                    "inspectionObject": {
                        "info": {
                            "obClusterId": "12",
                            "type": "PRIMARY"
                        },
                        "inspectionObjectType": "OB_CLUSTER",
                        "name": "OB_TEST_1",
                        "objectId": 1
                    },
                    "scheduleState": "INACTIVE"
                }
            ],
            "page": {
                "number": 1,
                "size": 10,
                "totalElements": 1,
                "totalPages": 1
            }
        },
        "duration": 31,
        "server": "124075fe52",
        "status": 200,
        "successful": true,
        "timestamp": "2024-07-30T16:21:34.918+08:00",
        "traceId": "72232d83a8af3bf6"
    }
    

    Contact Us