All Products
Search
Document Center

API Gateway:DescribeApis

Last Updated:Mar 01, 2024

Queries a list of APIs that are being defined.

Operation description

  • This operation is intended for API callers.
  • This operation returns a list of all APIs that are being defined. The basic information about these APIs is also returned in the list.
  • This operation returns all APIs that are being edited, regardless of their environments. The returned definitions may be different from the definitions in the environments.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
apigateway:DescribeApisRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
GroupIdstringNo

The API group ID.

c4a4d2de657548a2bd485d5d4df42b4a
ApiIdstringNo

The API ID.

f68c19ee3bd1478fb58aa05ce8ae9b5a
ApiNamestringNo

The API name. The name is used for fuzzy match.

weather
CatalogIdstringNo

The category ID.

1553414085247362
VisibilitystringNo

Specifies whether the API is public. Valid values:

  • PUBLIC: The API is public. If you publish the definition of a public API to the production environment, the definition is displayed on the APIs page for all users.
  • PRIVATE: The API is private. If you publish an API group that contains a private API in Alibaba Cloud Marketplace, the API is not displayed in Alibaba Cloud Marketplace.
PUBLIC
PageSizeintegerNo

The number of entries to return on each page. Default value: 10.

10
PageNumberintegerNo

The number of the page to return. Pages start from page 1. Default value: 1.

1
EnableTagAuthbooleanNo

Specifies whether to enable tag verification.

true
Tagobject []No

The tags of objects that match the rule.

Key, Value
KeystringNo

The tag key.

key
ValuestringNo

The tag value.

value
ApiPathstringNo

The request path of the API.

/illegal/query
ApiMethodstringNo

The HTTP method of the API request.

GET
UnDeployedbooleanNo

Specifies whether to filter unpublished APIs.

true
StageNamestringNo

The environment in which you want to perform this operation. Valid values:

  • RELEASE: the production environment
  • PRE: the staging environment
  • TEST: the test environment
RELEASE

Response parameters

ParameterTypeDescriptionExample
object
PageNumberinteger

The page number of the returned page.

3
RequestIdstring

The request ID.

CEF72CEB-54B6-4AE8-B225-F876FF7BZ002
PageSizeinteger

The number of entries returned per page.

15
TotalCountinteger

The total number of returned entries.

32
ApiSummarysobject []

The queried API definitions.

Visibilitystring

Indicates whether the API is public. Valid values:

  • PUBLIC: The API is public.
  • PRIVATE: The API is private.
PUBLIC
ApiIdstring

The API ID.

5af418828f0344a3b588c0cc1331a3bc
ModifiedTimestring

The time when the API was modified. The time is displayed in UTC.

2016-07-23T08:28:48Z
Descriptionstring

The API description.

Creates an object
GroupNamestring

The name of the API group to which the API belongs.

myGroup2
GroupIdstring

The API group ID.

1084f9034c744137901057206b39d2b6
CreatedTimestring

The time when the API was created. The time is displayed in UTC.

2016-05-20T18:18:25Z
ApiNamestring

The API name.

CreateObject
RegionIdstring

The ID of the region to which the API belongs.

cn-qingdao
ApiPathstring

The request path of the API.

/sqb/
ApiMethodstring

The HTTP method of the API request.

GET
DeployedInfosobject []

The API publishing statuses.

StageNamestring

Stage Name:

  • RELEASE: production environment
  • PRE: staging environment
  • TEST: test environment
RELEASE
EffectiveVersionstring

The deployed version.

20220103170737313
DeployedStatusstring

The deployment status. Valid values: DEPLOYED and NONDEPLOYED.

DEPLOYED
TagListobject []

The tags that are added to the APIs.

TagKeystring

The tag key.

tagKey
TagValuestring

The tag value.

tagValue

Examples

Sample success responses

JSONformat

{
  "PageNumber": 3,
  "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BZ002",
  "PageSize": 15,
  "TotalCount": 32,
  "ApiSummarys": {
    "ApiSummary": [
      {
        "Visibility": "PUBLIC",
        "ApiId": "5af418828f0344a3b588c0cc1331a3bc",
        "ModifiedTime": "2016-07-23T08:28:48Z",
        "Description": "Creates an object\n",
        "GroupName": "myGroup2",
        "GroupId": "1084f9034c744137901057206b39d2b6",
        "CreatedTime": "2016-05-20T18:18:25Z",
        "ApiName": "CreateObject\n",
        "RegionId": "cn-qingdao",
        "ApiPath": "/sqb/",
        "ApiMethod": "GET",
        "DeployedInfos": {
          "DeployedInfo": [
            {
              "StageName": "RELEASE",
              "EffectiveVersion": "20220103170737313",
              "DeployedStatus": "DEPLOYED"
            }
          ]
        },
        "TagList": {
          "Tag": [
            {
              "TagKey": "tagKey",
              "TagValue": "tagValue"
            }
          ]
        }
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-03-23The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2022-09-02The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ApiPath
    Added Input Parameters: ApiMethod
    Added Input Parameters: UnDeployed
Output ParametersThe response structure of the API has changed.