DescribeDeployedApi

Updated at:

Queries the running definition of a specified API in a specified environment. This is the definition that actually takes effect in the specified environment and may differ from the definition being edited.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

apigateway:DescribeDeployedApi

get

*ApiGroup

acs:apigateway:{#regionId}:{#accountId}:apigroup/{#GroupId}

None None

Request parameters

Parameter

Type

Required

Description

Example

GroupId

string

No

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

81750604ccff48c48f34d6c0165e09db

ApiId

string

Yes

The ID of the API.

ab7c95a01a7e42f28718f34497bbf47c

StageName

string

Yes

The environment in which the API operates. Valid values:

  • RELEASE: Production.

  • PRE: Staging.

  • TEST: Testing.

RELEASE

Response elements

Element

Type

Description

Example

object

ApiId

string

The API ID.

4eed13a57d4e42fbb51316be8a5329ff

ResultType

string

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

HTML

DisableInternet

boolean

  • If you set DisableInternet to true, the API can be called only over the internal network.

  • If you set DisableInternet to false, no restrictions are imposed on API calls.

Note

When you modify an API, if you do not specify this parameter, the original value is retained.

true

ResultBodyModel

string

The response body model of the API.

{}

ResultSample

string

The sample response returned by the backend service.

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

AllowSignatureMethod

string

The signature methods allowed for client requests to the API. Valid values:

  • HmacSHA256

  • HmacSHA1,HmacSHA256

HmacSHA256

RegionId

string

The region ID of the group.

cn-beijing

ForceNonceCheck

boolean

  • If you set ForceNonceCheck to true, the system forcibly checks the X-Ca-Nonce parameter in requests. This parameter is a unique identifier for a request and is typically a UUID. After API Gateway receives this parameter, it verifies the validity of the parameter. The same value can be used only once within 15 minutes. This effectively prevents replay attacks on the API.

  • If you set ForceNonceCheck to false, the system does not check the parameter. Default value when you create an API: false.

true

Visibility

string

Specifies whether the API is public. Valid values:

  • PUBLIC: The API is public. If you select this value, the definition of the API in the production environment is visible on the "Discover APIs" page in the console of all users.

  • PRIVATE: The API is private. If you select this value, the API is not listed in Alibaba Cloud Marketplace when the API group is listed.

PUBLIC

FailResultSample

string

The sample error response returned by the backend service.

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

AuthType

string

The security authentication type of the API. Valid values:

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

  • ANONYMOUS: Anonymous calls are allowed. If you select this value, take note of the following items:
    • Anyone who can obtain the API service information can call the API. API Gateway does not authenticate the callers and does not support user-specific throttling. If you make the API public, configure API-specific throttling.

APP

RequestId

string

The ID of the request.

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

Description

string

The description.

Api description

GroupName

string

The name of the API group.

Weather

GroupId

string

The ID of the group.

bc77f5b49c974437a9912ea3755cd834

DeployedTime

string

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

2022-07-25T17:47:51Z

StageName

string

The environment in which the API operates. Valid values:

  • RELEASE: Production.

  • PRE: Staging.

  • TEST: Testing.

RELEASE

ApiName

string

The name of the API.

weather

RequestConfig

object

The configuration items for API requests sent from the consumer to API Gateway.

For more information, see RequestConfig.

BodyModel

string

The body model.

https://apigateway.aliyun.com/models/3a240a127dcc4afd9ab1bf7e947b4095/9e2df550e85b4121a79ec33e2619eaab

RequestPath

string

The API path. For example, if the full URL of the API is http://api.a.com:8080/object/add?key1=value1&key2=value2, the path is /object/add.

/api/billing/test/[type]

RequestHttpMethod

string

The HTTP method. Valid values: GET, POST, DELETE, PUT, HEADER, TRACE, PATCH, CONNECT, and OPTIONS.

POST

BodyFormat

string

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

For POST or PUT requests, this parameter specifies the method used to pass data to the server. Valid values: FORM and STREAM. FORM indicates the form format (key-value pairs), and STREAM indicates the byte stream format.

STREAM

RequestMode

string

The request mode for input parameters. Valid values:

  • MAPPING: Maps input parameters and filters out unknown parameters.

  • PASSTHROUGH: Passes through input parameters.

  • MAPPING_PASSTHROUGH: Maps input parameters and passes through unknown parameters.

MAPPING

PostBodyDescription

string

The description of the request body.

fwefwef

RequestProtocol

string

The protocol types supported by the API. You can select multiple protocol types and separate them with commas (,), such as "HTTP,HTTPS". Valid values: HTTP, HTTPS, and WebSocket.

HTTP

ServiceConfig

object

The configuration items for API requests sent from API Gateway to the backend service.

For more information, see ServiceConfig.

VpcId

string

The VPC ID.

vpc-uf6kg9x8sx2tbxxxx

MockStatusCode

integer

The HTTP status code returned in Mock mode.

200

ServicePath

string

The path used to call the backend service. For example, if the full URL of the backend service is http://api.a.com:8080/object/add?key1=value1&key2=value2, ServicePath is /object/add.

/object/add

Mock

string

Specifies whether to enable Mock mode. Valid values:

  • TRUE: Enables Mock mode.

  • FALSE: Disables Mock mode.

TRUE

ServiceAddress

string

The address used to call the backend service. For example, if the full URL of the backend service is http://api.a.com:8080/object/add?key1=value1&key2=value2, ServiceAddress is http://api.a.com:8080.

http://api.a.com:8080

ServiceVpcEnable

string

Specifies whether to enable the VPC channel. Valid values:

  • TRUE: Enables the VPC channel. You must add VPC authorization before you can enable the VPC channel.

  • FALSE: Disables the VPC channel.

TRUE

MockResult

string

The result returned when Mock mode is enabled.

test result

ServiceHttpMethod

string

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

POST

ServiceProtocol

string

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

HTTP

ServiceTimeout

integer

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

1000

MockHeaders

object

MockHeader

array<object>

The mock headers.

object

HeaderValue

string

The value of the HTTP header.

86400

HeaderName

string

The name of the HTTP header.

Content-Type

VpcConfig

object

The configuration items for the VPC channel.

VpcId

string

The VPC ID.

vpc-2zeafsc3fygk1***

InstanceId

string

The instance ID (ECS or load balancing) in the VPC.

i-bp1h497hkijewv2***

Port

integer

The port number of the instance.

8080

Name

string

The name of the VPC authorization.

glmall-app-test

FunctionComputeConfig

object

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

FcType

string

The type of the Function Compute service.

HttpTrigger

RoleArn

string

The ARN of the RAM role that authorizes API Gateway to access Function Compute.

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

Method

string

The request method.

GET

FcBaseUrl

string

The root path of the Function Compute service.

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

ContentTypeValue

string

The value of the ContentType header when the backend service is an HTTP service and ContentTypeCatagory is set to DEFAULT or CUSTOM.

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

RegionId

string

The region ID.

cn-beijing

OnlyBusinessPath

boolean

Specifies whether the backend service receives only the business path.

false

FunctionName

string

The function name defined in Function Compute.

domain_business_control

ContentTypeCatagory

string

The policy for the value of the ContentType header when the backend service is an HTTP service. Valid values:

  • DEFAULT: Uses the default value of API Gateway.

  • CUSTOM: Uses a custom value.

  • CLIENT: Uses the ContentType header from the client request.

DEFAULT

Path

string

The path of the request for the API.

/api/offline/cacheData

ServiceName

string

The service name defined in Function Compute.

fcservicename

Qualifier

string

The function alias.

2

OpenIdConnectConfig

object

The configuration items for OpenID Connect authentication of third-party accounts.

OpenIdApiType

string

The OpenID Connect mode. Valid values:

  • IDTOKEN: Obtains the authorization API and issues a token. If you select this value, the PublicKeyId and PublicKey parameters are required.

  • BUSINESS: The business API for token verification. If you select this value, the IdTokenParamName parameter is required.

IDTOKEN

IdTokenParamName

string

The name of the parameter that corresponds to the token.

id_token

PublicKeyId

string

The ID of the public key.

88483727556929326703309904351185815489

PublicKey

string

The public key of the API.

EB1837F8693CCED0BF750B3AD48467BEB569E780A14591CF92

ErrorCodeSamples

object

ErrorCodeSample

array<object>

The sample error codes returned by the backend service.

For more information, see ErrorCodeSample.

object

Code

string

The error code.

Error

Message

string

The error message.

error message

Description

string

The description.

Error description

ResultDescriptions

object

ResultDescription

array<object>

The response descriptions of the API.

object

The response descriptions of the API.

Type

string

The type.

string

Key

string

The response parameter.

key

HasChild

boolean

Specifies whether the node has child nodes.

false

Description

string

The description.

result description

Pid

string

The ID of the parent node.

11

Mandatory

boolean

Specifies whether the parameter is required.

true

Name

string

The name of the response parameter.

name

Id

string

The node ID.

1

SystemParameters

object

SystemParameter

array<object>

The list of system parameters.

object

DemoValue

string

The example value.

192.168.1.1

Description

string

The description.

QueryParamDTO

ParameterName

string

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

CaClientIp

Location

string

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

HEAD

ServiceParameterName

string

The name of the corresponding backend parameter.

clientIp

CustomSystemParameters

object

CustomSystemParameter

array<object>

The list of custom system parameters.

object

DemoValue

string

The sample value.

192.168.1.1

Description

string

The description.

123

ParameterName

string

The custom system parameter name.

appid

Location

string

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

HEAD

ServiceParameterName

string

The name of the corresponding backend parameter.

clientIp

ConstantParameters

object

ConstantParameter

array<object>

The list of constant parameters.

object

Description

string

The description.

123

Location

string

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

HEAD

ServiceParameterName

string

The name of the backend parameter.

constance

ConstantValue

string

The constant value.

constance

RequestParameters

object

RequestParameter

array<object>

The description of the parameters that the consumer sends to the API gateway in an API request.

For more information, see RequestParameter.

object

JsonScheme

string

JSON scheme

{}

MaxValue

integer

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

123456

ArrayItemsType

string

The type of the array element.

String

MinValue

integer

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

123456

DocShow

string

Specifies whether the parameter is visible in the documentation. Valid values: PUBLIC and PRIVATE.

PUBLIC

MaxLength

integer

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

123456

DefaultValue

string

The default value.

20

ApiParameterName

string

The API parameter name.

age

EnumValue

string

The enumerated values that are allowed for the parameter. This parameter takes effect when ParameterType is set to Int, Long, Float, Double, or String. Separate multiple values with commas (,). Examples: 1,2,3,4,9 and A,B,C,E,F.

boy,girl

DemoValue

string

The sample value.

20

Required

string

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

OPTIONAL

Description

string

The parameter description.

parameter description

ParameterType

string

The parameter type. Valid values: String (string), Int (integer), Long (long integer), Float (single-precision floating-point number), Double (double-precision floating-point number), and Boolean (Boolean).

String

RegularExpression

string

The regular expression used to validate the parameter. This parameter takes effect when ParameterType is set to String.

^[a-zA-Z0-9]+$

MinLength

integer

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

123456

DocOrder

integer

The display order of the parameter in the documentation.

0

Location

string

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

HEAD

ServiceParameters

object

ServiceParameter

array<object>

The description of the parameters that the API gateway sends to the backend service in an API request.

For more information, see ServiceParameter.

object

Location

string

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

HEAD

ParameterType

string

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

String

ServiceParameterName

string

The name of the backend parameter.

clientIp

ServiceParametersMap

object

ServiceParameterMap

array<object>

The mapping between the parameters that the consumer sends to the API gateway and the parameters that the API gateway sends to the backend service.

For more information, see ServiceParameterMap.

object

RequestParameterName

string

The name of the frontend request parameter.

sex

ServiceParameterName

string

The name of the backend parameter.

sex

Examples

Success response

JSON format

{
  "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": "Error description",
  "GroupName": "Weather",
  "GroupId": "bc77f5b49c974437a9912ea3755cd834",
  "DeployedTime": "2022-07-25T17:47:51Z",
  "StageName": "RELEASE",
  "ApiName": "weather",
  "RequestConfig": {
    "BodyModel": "https://apigateway.aliyun.com/models/3a240a127dcc4afd9ab1bf7e947b4095/9e2df550e85b4121a79ec33e2619eaab",
    "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": "id_token",
    "PublicKeyId": "88483727556929326703309904351185815489",
    "PublicKey": "EB1837F8693CCED0BF750B3AD48467BEB569E780A14591CF92"
  },
  "ErrorCodeSamples": {
    "ErrorCodeSample": [
      {
        "Code": "Error",
        "Message": "error message",
        "Description": "错误描述"
      }
    ]
  },
  "ResultDescriptions": {
    "ResultDescription": [
      {
        "Type": "string",
        "Key": "key",
        "HasChild": false,
        "Description": "result description",
        "Pid": "11",
        "Mandatory": true,
        "Name": "name",
        "Id": "1"
      }
    ]
  },
  "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": "^[a-zA-Z0-9]+$",
        "MinLength": 123456,
        "DocOrder": 0,
        "Location": "HEAD"
      }
    ]
  },
  "ServiceParameters": {
    "ServiceParameter": [
      {
        "Location": "HEAD",
        "ParameterType": "String",
        "ServiceParameterName": "clientIp"
      }
    ]
  },
  "ServiceParametersMap": {
    "ServiceParameterMap": [
      {
        "RequestParameterName": "sex",
        "ServiceParameterName": "sex"
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.