Updated on 2022-09-15 GMT+08:00

Querying the API List

Description

This API is used to query the API list.

URI

  • URI format

    GET /v1/{project_id}/service/apis

  • 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.

    limit

    No

    Integer

    Start coordinate of the query, that is, X pieces of data are skipped. The value can only be 0 or an integer multiple of the limit. If the value does not meet the requirement, it is rounded down.

    offset

    No

    Integer

    Number of records to be queried, that is, Y records

Request Message

  • Example request

    None

Response

  • Example response
    {
      "total": 1,
      "records": [
        {
          "id": "fd0beac79418d65e3b3ed24a6e53b24b",
          "name": "testApi",
          "catalog_id": "677942eeca42bc5d82fcef909d8345f4",
          "create_time": 1579162215000,
          "status": "API_STATUS_CREATED",
          "manager": "admin",
          "type": "API_SPECIFIC_TYPE_REGISTER",
          "debug_status": "API_DEBUG_WAITING",
          "description": "api description"
        }
      ]
    }
  • Response parameter description

    Parameter

    Type

    Description

    total

    Integer

    Total number of APIs

    records

    Dictionary

    API result set

    • records parameter description

      Parameter

      Type

      Description

      id

      String

      API Id

      name

      String

      API name

      catalog_id

      String

      API catalog ID

      description

      String

      API description

      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_STATUS_OFFLINE_WAIT_REVIEW: The API offline request is waiting to be reviewed.

      This parameter is unavailable for DLM Exclusive.

      debug_status

      String

      API_DEBUG_WAITING: The API is waiting to be debugged.

      API_DEBUG_FAILED: API debugging fails.

      API_DEBUG_SUCCESS: API debugging is successful.

      This parameter is unavailable for DLM Exclusive.

      type

      String

      API type. Available values include:

      The value can be API_SPECIFIC_TYPE_CONFIGURATION, API_SPECIFIC_TYPE_SCRIPT, or API_SPECIFIC_TYPE_REGISTER.

      manger

      String

      Reviewer name

      create_time

      Long

      Creation time (a 13-digit timestamp)

Status Code

Status Code

Description

200

The API list is obtained.

For details about status codes, see Status Codes.