Queries enterprise codes.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListEnterpriseCode

The operation that you want to perform. Set the value to ListEnterpriseCode.

RegionId String Yes cn-shanghai

The ID of the region.

You can call the DescribeRegions operation to query the most recent region list.

EnterpriseCode String No 12P**

The enterprise code that you want to query.

IsDefault Boolean No false

Specifies whether to query only default enterprise codes. Valid values:

  • true: yes
  • false (default): no
NextToken String No caeba0bbb2be03f84eb48b699f0*****

The token for returning the next page when the data is returned in more than one page.

MaxResults Integer No 2

The number of entries returned per page.

Valid values: 1 to 100. Default value: 10.

Response parameters

Parameter Type Example Description
TotalCount Integer 2

The total number of entries returned.

NextToken String caeba0bbb2be03f84eb48b699f0*****

The token for returning the next page when the data is returned in more than one page.

RequestId String 1A57EF84-D587-4CF9-B0C8-307488BF52C9

The ID of the request.

MaxResults Integer 2

The number of entries returned per page.

EnterpriseCodes Array of EnterpriseCode

The information about enterprise codes.

IsDefault Boolean true

Indicates whether the enterprise code is the default one.

  • true: yes
  • false: no
EnterpriseCode String 12P**

The enterprise code.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListEnterpriseCode
&RegionId=cn-shanghai
&EnterpriseCode=12P**
&IsDefault=true
&NextToken=caeba0bbb2be03f84eb48b699f0*****
&MaxResults=2
&Common request parameters

Sample responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListEnterpriseCodeResponse>
    <TotalCount>2</TotalCount>
    <RequestId>1A57EF84-D587-4CF9-B0C8-307488BF52C9</RequestId>
    <MaxResults>10</MaxResults>
    <EnterpriseCodes>
        <IsDefault>false</IsDefault>
        <EnterpriseCode>12P**</EnterpriseCode>
        <SmartAGCount>2</SmartAGCount>
    </EnterpriseCodes>
    <EnterpriseCodes>
        <IsDefault>true</IsDefault>
        <EnterpriseCode>12P**</EnterpriseCode>
        <SmartAGCount>5</SmartAGCount>
    </EnterpriseCodes>
</ListEnterpriseCodeResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TotalCount" : 2,
  "RequestId" : "1A57EF84-D587-4CF9-B0C8-307488BF52C9",
  "MaxResults" : 10,
  "EnterpriseCodes" : [ {
    "IsDefault" : false,
    "EnterpriseCode" : "12P**",
    "SmartAGCount" : 2
  }, {
    "IsDefault" : true,
    "EnterpriseCode" : "12P**",
    "SmartAGCount" : 5
  } ]
}

Error codes

For a list of error codes, visit the API Error Center.