All Products
Search
Document Center

API Gateway:DescribeDeployedApi

Last Updated:May 25, 2023

Queries the running definition of an API in a specified environment.

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:DescribeDeployedApiRead
  • ApiGateway
    acs:apigateway:*:{#accountId}:*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
GroupIdstringNo

The ID of the API group. An API group ID is generated by the system and is globally unique.

81750604ccff48c48f34d6c0165e09db
ApiIdstringYes

The ID of the API.

ab7c95a01a7e42f28718f34497bbf47c
StageNamestringYes

The environment in which the API runs. Valid values:

  • RELEASE: the production environment
  • PRE: the pre-release environment
  • TEST: the test environment
RELEASE

Response parameters

ParameterTypeDescriptionExample
object
ApiIdstring

The ID of the API.

4eed13a57d4e42fbb51316be8a5329ff
ResultTypestring

The format of the response from the backend service. Valid values: JSON, TEXT, BINARY, XML, and HTML. Default value: JSON.

HTML
DisableInternetboolean
  • Indicates whether to call the API only in an internal network. If this parameter is set to true, the API can be called only in an internal network.
  • If this parameter is set to false, the API can be called over the Internet and in an internal network.
NoteIf you do not configure this parameter when you modify the API, the original value is used.
true
ResultBodyModelstring

The return description of the API.

ResultSamplestring

The sample response from the backend service.

{code: 200, message:'success', data: ''}
AllowSignatureMethodstring

The signature method used by the client. Valid values:

  • HmacSHA256
  • HmacSHA1,HmacSHA256
HmacSHA256
RegionIdstring

The region in which the API group resides.

cn-beijing
ForceNonceCheckboolean
  • Indicates whether to forcibly check X-Ca-Nonce. If the ForceNonceCheck parameter is set to true, X-Ca-Nonce is forcibly checked. X-Ca-Nonce is the unique identifier of a request and is generally identified by UUID. After receiving this parameter, API Gateway verifies the validity of this parameter. The same value can be used only once within 15 minutes. This helps prevent replay attacks.
  • If the ForceNonceCheck parameter is set to false, the X-Ca-Nonce is not checked. Default value: false.
true
Visibilitystring

Indicates whether the API is public. Valid values:

  • PUBLIC: The API is public. If this parameter is set to PUBLIC, the API is displayed on the APIs page for all users after the API is published to the production environment.
  • PRIVATE: The API is private. Private APIs are not displayed in the Alibaba Cloud Marketplace after the API group to which they belong is made available.
PUBLIC
FailResultSamplestring

The sample error response from the backend service.

{"errorCode":"fail","errorMessage":"param invalid"}
AuthTypestring

The authentication method of the API. Valid values:

  • APP: Only authorized apps are allowed to call the API.

  • ANONYMOUS: The API can be anonymously called. In this mode, you must take note of the following rules:

    • All users who have obtained the API service information can call this API. API Gateway does not authenticate callers and cannot set user-specific throttling policies. If the API is made public, set API-specific throttling policies.
APP
RequestIdstring

The ID of the request.

EF924FE4-2EDD-4CD3-89EC-34E4708574E7
Descriptionstring

The description of the parameter.

Api description
GroupNamestring

The name of the API group.

Weather
GroupIdstring

The ID of the API group.

bc77f5b49c974437a9912ea3755cd834
DeployedTimestring

The deployment time. Format: yyyy-mm-ddhh:mm:ss.

2022-07-25T17:47:51Z
StageNamestring

The environment in which the API runs. Valid values:

  • RELEASE: the production environment
  • PRE: the pre-release environment
  • TEST: the test environment
RELEASE
ApiNamestring

The name of the API.

weather
RequestConfigobject

The configuration items of API requests sent by the consumer to API Gateway.

For more information, see RequestConfig.

BodyModelstring

The body model.

RequestPathstring

The path of the API request. If the complete API URL is http://api.a.com:8080/object/add?key1=value1&key2=value2, The path of the API request is /object/add .

/api/billing/test/[type]
RequestHttpMethodstring

The HTTP method that is used to make the request. Valid values: GET, POST, DELETE, PUT, HEADER, TRACE, PATCH, CONNECT, and OPTIONS.

POST
BodyFormatstring

This parameter takes effect only when the RequestMode parameter is set to MAPPING.

The format in which data is transmitted to the server for POST and PUT requests. Valid values: FORM and STREAM. FORM indicates that data is transmitted in the key-value pair format. STREAM indicates that data is transmitted as byte streams.

STREAM
RequestModestring

The request mode. Valid values:

  • MAPPING: Parameters are mapped. Unknown parameters are filtered out.
  • PASSTHROUGH: Parameters are passed through.
  • MAPPING_PASSTHROUGH: Parameters are mapped. Unknown parameters are passed through.
MAPPING
PostBodyDescriptionstring

The description of the request body.

fwefwef
RequestProtocolstring

The protocol type supported by the API. Valid values: HTTP, HTTPS, and WebSocket. Separate multiple values with commas (,). Example: "HTTP,HTTPS".

HTTP
ServiceConfigobject

The configuration items of API requests sent by API Gateway to the backend service.

For more information, see ServiceConfig.

VpcIdstring

The ID of the VPC.

vpc-uf6kg9x8sx2tbxxxx
MockStatusCodeinteger

The status code returned for service mock.

200
ServicePathstring

The path that is used to call the backend service. If the complete URL of a backend service is http://api.a.com:8080/object/add?key1=value1&key2=value2, the value of the ServicePath parameter is /object/add.

/object/add
Mockstring

Indicates whether the Mock mode is enabled. Valid values:

  • TRUE: The Mock mode is enabled.
  • FALSE: The Mock mode is not enabled.
TRUE
ServiceAddressstring

The URL that is used to call the backend service. If the complete URL of a backend service is http://api.a.com:8080/object/add?key1=value1&key2=value2, the value of ServiceAddress is **http://api.a.com:8080**.``

http://api.a.com:8080
ServiceVpcEnablestring

Indicates whether to enable the VPC channel. Valid values:

  • TRUE: The VPC channel is enabled. You can enable a VPC channel only after you create the corresponding access authorization for the VPC.
  • FALSE: The VPC channel is not enabled.
TRUE
MockResultstring

The result returned when the Mock mode is enabled.

test result
ServiceHttpMethodstring

The HTTP method that is used to call a backend service. Valid values: GET, POST, DELETE, PUT, HEADER, TRACE, PATCH, CONNECT, and OPTIONS.

POST
ServiceProtocolstring

The backend service protocol. Only HTTP, HTTPS, and Function Compute are supported.

HTTP
ServiceTimeoutinteger

The timeout period of the backend service. Unit: milliseconds.

1000
MockHeadersobject []

The mock headers.

HeaderValuestring

The value of the HTTP header parameter.

86400
HeaderNamestring

The name of the HTTP header parameter.

Content-Type
VpcConfigobject

The configuration items of the VPC channel.

VpcIdstring

The ID of the VPC.

vpc-2zeafsc3fygk1***
InstanceIdstring

The ID of the Elastic Compute Service (ECS) or Server Load Balancer (SLB) instance in the VPC.

i-bp1h497hkijewv2***
Portinteger

The port number that corresponds to the instance.

8080
Namestring

The name of the VPC access authorization.

glmall-app-test
FunctionComputeConfigobject

The backend configuration items when the backend service is Function Compute.

FcTypestring

The type of the Function Compute instance.

HttpTrigger
RoleArnstring

The ARN of the RAM role assumed by API Gateway to access Function Compute.

acs:ram::111***:role/aliyunserviceroleforsas
Methodstring

The request method.

GET
FcBaseUrlstring

The root path of Function Compute.

https://122xxxxxxx.fc.aliyun.com/2016xxxx/proxy/testSxxx.xxx/testHttp/
ContentTypeValuestring

The value of the ContentType header when the ServiceProtocol parameter is set to HTTP and the ContentTypeCatagory parameter is set to DEFAULT or CUSTOM.

application/x-www-form-urlencoded; charset=UTF-8
RegionIdstring

The region in which the instance resides.

cn-beijing
OnlyBusinessPathboolean

Indicates whether the backend receives only the service path.

false
FunctionNamestring

The function name defined in Function Compute.

domain_business_control
ContentTypeCatagorystring

The ContentType header used when a backend HTTP service is called. Valid values:

  • DEFAULT: the default header in API Gateway
  • CUSTOM: a custom header
  • CLIENT: the ContentType header specified by the client
DEFAULT
Pathstring

The API request path.

/api/offline/cacheData
ServiceNamestring

The service name defined in Function Compute.

fcservicename
Qualifierstring

The alias of the function.

2
OpenIdConnectConfigobject

The configuration items of the third-party OpenID Connect authentication method.

OpenIdApiTypestring

The OpenID Connect mode. Valid values:

  • IDTOKEN: OpenID Connect calls the authentication API to issue tokens. If the value is specified, the PublicKeyId parameter and the PublicKey parameter are required.
  • BUSINESS: OpenID Connect calls the business API to verify identities by using existing tokens. If this value is specified, the IdTokenParamName parameter is required.
IDTOKEN
IdTokenParamNamestring

The name of the parameter that corresponds to the token.

xxx
PublicKeyIdstring

The ID of the public key.

88483727556929326703309904351185815489
PublicKeystring

The public key of the API.

EB1837F8693CCED0BF750B3AD48467BEB569E780A14591CF92
ErrorCodeSamplesobject []

The sample error codes returned by the backend service.

For more information, see ErrorCodeSample.

Codestring

The error code returned if the request failed.

Error
Messagestring

The error message returned if the request failed.

error message
Descriptionstring

The description of the error.

Error description
ResultDescriptionsobject []

The returned description of the API.

Descriptionstring

The description of the parameter.

result description
Mandatoryboolean

Indicates whether the parameter is required.

true
SystemParametersobject []

The system parameters.

DemoValuestring

The example.

192.168.1.1
Descriptionstring

The description of the parameter.

QueryParamDTO
ParameterNamestring

The name of the system parameter. Valid values: CaClientIp, CaDomain, CaRequestHandleTime, CaAppId, CaRequestId, CaHttpSchema, CaProxy.

CaClientIp
Locationstring

The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.

HEAD
ServiceParameterNamestring

The name of the corresponding backend parameter.

clientIp
CustomSystemParametersobject []

The custom system parameters.

DemoValuestring

The sample value.

192.168.1.1
Descriptionstring

The description of the parameter.

123
ParameterNamestring

The name of the custom system parameter.

appid
Locationstring

The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.

HEAD
ServiceParameterNamestring

The name of the corresponding backend parameter.

clientIp
ConstantParametersobject []

The constant parameters.

Descriptionstring

The description of the parameter.

123
Locationstring

The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.

HEAD
ServiceParameterNamestring

The name of the backend service parameter.

constance
ConstantValuestring

The constant value.

constance
RequestParametersobject []

The parameters of API requests sent by the consumer to API Gateway.

For more information, see RequestParameter.

JsonSchemestring

JSON scheme

{}
MaxValuelong

The maximum value of the ParameterType parameter when the parameter is set to Int, Long, Float, or Double.

123456
ArrayItemsTypestring

The type of the array element.

String
MinValuelong

The minimum value of the ParameterType parameter when the parameter is set to Int, Long, Float, or Double.

123456
DocShowstring

Indicates whether the document is public. Valid values: PUBLIC and PRIVATE.

PUBLIC
MaxLengthlong

The maximum length of the ParameterType parameter when the parameter is set to String.

123456
DefaultValuestring

The default value.

20
ApiParameterNamestring

The name of the API parameter.

age
EnumValuestring

The hash values that can be entered when ParameterType is set to Int, Long, Float, Double, or String. Separate different values with commas (,). Examples: 1,2,3,4,9 and A,B,C,E,F.

boy,girl
DemoValuestring

The sample value.

20
Requiredstring

Indicates whether the parameter is required. Valid values: REQUIRED and OPTIONAL.

OPTIONAL
Descriptionstring

The parameter description.

parameter description
ParameterTypestring

The type of the parameter. Valid values: String, Int, Long, Float, Double, and Boolean.

String
RegularExpressionstring

The regular expression used for parameter validation when ParameterType is set to String.

xxx
MinLengthlong

The minimum length of the ParameterType parameter when the parameter is set to String.

123456
DocOrderinteger

The order in the document.

0
Locationstring

The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.

HEAD
ServiceParametersobject []

The parameters of API requests sent by API Gateway to the backend service.

For more information, see ServiceParameter.

Locationstring

The parameter location. Valid values: BODY, HEAD, QUERY, and PATH.

HEAD
ParameterTypestring

The data type of the backend service parameter. Valid values: STRING, NUMBER, and BOOLEAN.

String
ServiceParameterNamestring

The name of the backend service parameter.

clientIp
ServiceParametersMapobject []

The mappings between parameters of requests sent by the consumer to API Gateway and parameters of requests sent by API Gateway to the backend service.

For more information, see ServiceParameterMap.

RequestParameterNamestring

The name of the frontend input parameter.

sex
ServiceParameterNamestring

The name of the backend service parameter.

sex

Examples

Sample success responses

JSONformat

{
  "ApiId": "4eed13a57d4e42fbb51316be8a5329ff",
  "ResultType": "HTML",
  "DisableInternet": true,
  "ResultBodyModel": "",
  "ResultSample": "{code: 200, message:'success', data: ''}",
  "AllowSignatureMethod": "HmacSHA256",
  "RegionId": "cn-beijing",
  "ForceNonceCheck": true,
  "Visibility": "PUBLIC",
  "FailResultSample": "{\"errorCode\":\"fail\",\"errorMessage\":\"param invalid\"}",
  "AuthType": "APP",
  "RequestId": "EF924FE4-2EDD-4CD3-89EC-34E4708574E7",
  "Description": "Api description",
  "GroupName": "Weather",
  "GroupId": "bc77f5b49c974437a9912ea3755cd834",
  "DeployedTime": "2022-07-25T17:47:51Z",
  "StageName": "RELEASE",
  "ApiName": "weather",
  "RequestConfig": {
    "BodyModel": "",
    "RequestPath": "/api/billing/test/[type]",
    "RequestHttpMethod": "POST",
    "BodyFormat": "STREAM",
    "RequestMode": "MAPPING",
    "PostBodyDescription": "fwefwef",
    "RequestProtocol": "HTTP"
  },
  "ServiceConfig": {
    "VpcId": "vpc-uf6kg9x8sx2tbxxxx",
    "MockStatusCode": 200,
    "ServicePath": "/object/add",
    "Mock": "TRUE",
    "ServiceAddress": "http://api.a.com:8080",
    "ServiceVpcEnable": "TRUE",
    "MockResult": "test result",
    "ServiceHttpMethod": "POST",
    "ServiceProtocol": "HTTP",
    "ServiceTimeout": 1000,
    "MockHeaders": {
      "MockHeader": [
        {
          "HeaderValue": "86400",
          "HeaderName": "Content-Type"
        }
      ]
    },
    "VpcConfig": {
      "VpcId": "vpc-2zeafsc3fygk1***",
      "InstanceId": "i-bp1h497hkijewv2***",
      "Port": 8080,
      "Name": "glmall-app-test"
    },
    "FunctionComputeConfig": {
      "FcType": "HttpTrigger",
      "RoleArn": "acs:ram::111***:role/aliyunserviceroleforsas",
      "Method": "GET",
      "FcBaseUrl": "https://122xxxxxxx.fc.aliyun.com/2016xxxx/proxy/testSxxx.xxx/testHttp/",
      "ContentTypeValue": "application/x-www-form-urlencoded; charset=UTF-8\n",
      "RegionId": "cn-beijing",
      "OnlyBusinessPath": false,
      "FunctionName": "domain_business_control",
      "ContentTypeCatagory": "DEFAULT",
      "Path": "/api/offline/cacheData",
      "ServiceName": "fcservicename",
      "Qualifier": "2"
    }
  },
  "OpenIdConnectConfig": {
    "OpenIdApiType": "IDTOKEN",
    "IdTokenParamName": "xxx",
    "PublicKeyId": "88483727556929326703309904351185815489",
    "PublicKey": "EB1837F8693CCED0BF750B3AD48467BEB569E780A14591CF92"
  },
  "ErrorCodeSamples": {
    "ErrorCodeSample": [
      {
        "Code": "Error",
        "Message": "error message",
        "Description": "Error description\n"
      }
    ]
  },
  "ResultDescriptions": {
    "ResultDescription": [
      {
        "Type": "",
        "Key": "",
        "HasChild": false,
        "Description": "result description",
        "Pid": "",
        "Mandatory": true,
        "Name": "",
        "Id": ""
      }
    ]
  },
  "SystemParameters": {
    "SystemParameter": [
      {
        "DemoValue": "192.168.1.1",
        "Description": "QueryParamDTO",
        "ParameterName": "CaClientIp",
        "Location": "HEAD",
        "ServiceParameterName": "clientIp"
      }
    ]
  },
  "CustomSystemParameters": {
    "CustomSystemParameter": [
      {
        "DemoValue": "192.168.1.1",
        "Description": "123",
        "ParameterName": "appid",
        "Location": "HEAD",
        "ServiceParameterName": "clientIp"
      }
    ]
  },
  "ConstantParameters": {
    "ConstantParameter": [
      {
        "Description": "123",
        "Location": "HEAD",
        "ServiceParameterName": "constance",
        "ConstantValue": "constance"
      }
    ]
  },
  "RequestParameters": {
    "RequestParameter": [
      {
        "JsonScheme": "{}",
        "MaxValue": 123456,
        "ArrayItemsType": "String",
        "MinValue": 123456,
        "DocShow": "PUBLIC",
        "MaxLength": 123456,
        "DefaultValue": "20",
        "ApiParameterName": "age",
        "EnumValue": "boy,girl",
        "DemoValue": "20",
        "Required": "OPTIONAL",
        "Description": "parameter description",
        "ParameterType": "String",
        "RegularExpression": "xxx",
        "MinLength": 123456,
        "DocOrder": 0,
        "Location": "HEAD"
      }
    ]
  },
  "ServiceParameters": {
    "ServiceParameter": [
      {
        "Location": "HEAD",
        "ParameterType": "String",
        "ServiceParameterName": "clientIp"
      }
    ]
  },
  "ServiceParametersMap": {
    "ServiceParameterMap": [
      {
        "RequestParameterName": "sex",
        "ServiceParameterName": "sex"
      }
    ]
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history