Initiate an inspection

2024-09-13 09:55:53  Updated

Description

You can call this operation to initiate an inspection of a particular scenario for a specified object.

Call description

Prerequisites

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

Request path

POST /api/v2/inspection/run

Request parameters

Parameter Type Required Example value Description
inspectionObjectType String 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.
  • objectIds Array Yes 1002 The ID of the inspection object in OCP, such as a cluster ID or tenant ID. Separate multiple IDs with commas (,).
    tags Integer Yes 1 The tag of the inspection scenario. The tag IDs are listed as follows:
  • 1: indicates basic inspection.
  • 2: indicates performance inspection.
  • 3: indicates in-depth inspection.
  • 4: indicates installation inspection.
  • Response parameters

    Basic data structure

    Parameter Type Description
    data Object The information about the asynchronous task. For more information, see Task return structure.
    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.

    Examples

    Sample request

    POST /api/v2/inspection/run

    Sample response

    {
        "data": {
            "contents": [
                {
                    "creator": "admin",
                    "executor": "xxx.xxx.xxx.xxx",
                    "id": 6058460,
                    "name": "Inspection task",
                    "operation": "EXECUTE",
                    "prohibitRollback": false,
                    "startTime": "2024-07-30T14:03:41.269+08:00",
                    "status": "RUNNING",
                    "subtasks": [
                        {
                            "description": "Manual inspection task",
                            "downstreams": [],
                            "id": 6062131,
                            "name": "Manual inspection task",
                            "nodeType": "JAVA_TASK",
                            "operation": "EXECUTE",
                            "parallelIdx": -1,
                            "prohibitRollback": false,
                            "runTime": 1,
                            "seriesId": 0,
                            "status": "READY",
                            "timeout": 7200,
                            "upstreams": []
                        }
                    ],
                    "taskDefinitionId": -1,
                    "type": "SCHEDULED"
                }
            ]
        },
        "duration": 93,
        "server": "124075fe52",
        "status": 200,
        "successful": true,
        "timestamp": "2024-07-30T14:03:41.316+08:00",
        "traceId": "ec5ce7cbd4403746"
    }
    

    Contact Us