Help Center> DataArts Studio> API Reference> Data Lake Mall APIs> API Management> Querying Instances for API Operations in DLM Exclusive
Updated on 2022-09-15 GMT+08:00

Querying Instances for API Operations in DLM Exclusive

Description

This API is used to query instances for API operations (Exclusive Edition).

URL

  • URI format

    GET /v1/{project_id}/service/apis/{api_id}/instances[?action, show_all, check_status, check_debug]

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID. For details about how to obtain the project ID, see Project ID and Account ID.

    api_id

    Yes

    String

    API ID

    action

    Yes

    String

    Operation on the API. Available values include:

    PUBLISH: publishing the API

    UNPUBLISH: unpublishing the API

    RECOVER: restoring the API

    show_all

    No

    Boolean

    Whether to show all instances. The default value is false, indicating that only operable instances are displayed.

    check_status

    No

    Boolean

    Whether to verify the API status. The default value is true, indicating that the system determines whether the instance can be operated based on the API status.

    check_debug

    No

    Boolean

    Whether to verify the API debugging status. The default value is true, indicating that the system determines whether the instance can be operated based on the API debugging status.

Request Message

  • Example request

    None

Response

  • Example response
    {
      "instances": [
        {
          "instance_id": "c2e27497562ed193583378e052248003",
          "instance_type": "DLM",
          "name": "cluster_test_001",
          "action": "PUBLISH",
          "result": false,
          "cause": "API_STATUS_ERROR",
          "api_status": "API_STATUS_CREATED",
          "api_debug": "API_DEBUG_WAITING"
        }
      ]
    }
  • Response parameter description

    Parameter

    Type

    Description

    instances

    Dictionary

    Instance list

    • instances parameters

      Parameter

      Type

      Description

      instance_id

      String

      Cluster ID

      instance_type

      String

      Cluster type. Available values include:

      DLM: no gateway

      APIG: API Gateway Shared edition

      APIGW: API Gateway Dedicated edition

      ROMA_APIC: ROMA-APIC gateway

      name

      String

      Cluster name

      action

      String

      Operation on the API. Available values include:

      PUBLISH: publishing the API

      UNPUBLISH: unpublishing the API

      STOP: suspending the API

      RECOVER: restoring the API

      result

      Boolean

      Verification result

      cause

      String

      Verification failure cause

      api_status

      String

      API status. Available values include:

      API_STATUS_CREATED: The API has been created.

      API_STATUS_PUBLISH_WAIT_REVIEW: The API has been published and is waiting to be reviewed.

      API_STATUS_PUBLISH_REJECT: The request to publish the API has been rejected.

      API_STATUS_PUBLISHED: The API has been published.

      API_STATUS_WAITING_STOP: The API is to be suspended.

      API_STATUS_STOPPED: The API has been suspended.

      API_STATUS_RECOVER_WAIT_REVIEW: The request to recover the API waits to be reviewed.

      API_STATUS_WAITING_OFFLINE: The API is pending offline.

      API_STATUS_OFFLINE: The API is offline.

      api_debug

      String

      API debugging status. Available values include:

      API_DEBUG_WAITING: The API is waiting to be debugged.

      API_DEBUG_FAILED: API debugging fails.

      API_DEBUG_SUCCESS: API debugging is successful.

Status Code

Status Code

Description

200

success

For details about status codes, see Status Codes.