All Products
Search
Document Center

Serverless App Engine:GetApplication

Last Updated:Mar 21, 2025

Queries the basic information of an application.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
sae:GetApplicationget
*All Resources
*
    none
none

Request syntax

GET /pop/v1/sam/app/getApplication HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
AppIdstringNo

The application ID.

017f39b8-dfa4-4e16-a84b-1dcee4b1****
AppNamestringNo

The application name.

test
NamespaceIdstringNo

The ID of the namespace.

cn-shenzhen

Response parameters

ParameterTypeDescriptionExample
object

The result returned.

RequestIdstring

The ID of the request.

01CF26C7-00A3-4AA6-BA76-7E95F2A3****
Messagestring

The additional information returned. Valid values:

  • When a request is successful, successis returned.
  • An error code is returned when a request failed.
success
TraceIdstring

The ID of the trace. The ID is used to query the details of a request.

ac1a0b2215622920113732501e****
Applicationobject

The details of the application.

AppIdstring

The application ID.

443d638a-ef76-47c4-b707-61197d******
AppNamestring

The application name.

test
AppDescriptionstring

The description of the application.

NamespaceIdstring

The namespace ID.

cn-shenzhen
ScaleRuleTypestring

The type of the auto scaling policy. Valid values:

  • timing: a scheduled auto scaling policy.
  • metric: a metric-based auto scaling policy.
  • mix: a hybrid auto scaling policy.
timing
ScaleRuleEnabledstring

Indicates whether the auto scaling policy is enabled. Valid values:

  • true: The auto scaling policy is enabled.
  • false: The auto scaling policy is disabled.
true
RunningInstancesinteger

The number of application instances that are running.

1
Instancesinteger

The number of application instances.

i-8ps2o182102o1jv05bys
Cpuinteger

The CPU specifications that are required for each instance. Unit: millicores. This parameter cannot be set to 0. Valid values:

  • 500
  • 1000
  • 2000
  • 4000
  • 8000
  • 12000
  • 16000
  • 32000
2000
Meminteger

The memory size that is required by each instance. Unit: MB. This parameter cannot be set to 0. The values of this parameter correspond to the values of the Cpu parameter:

  • This parameter is set to 1024 if the Cpu parameter is set to 500 or 1000.
  • This parameter is set to 2048 if the Cpu parameter is set to 500, 1000, or 2000.
  • This parameter is set to 4096 if the Cpu parameter is set to 1000, 2000, or 4000.
  • This parameter is set to 8192 if the Cpu parameter is set to 2000, 4000, or 8000.
  • This parameter is set to 12288 if the Cpu parameter is set to 12000.
  • This parameter is set to 16384 if the Cpu parameter is set to 4000, 8000, or 16000.
  • This parameter is set to 24576 if the Cpu parameter is set to 12000.
  • This parameter is set to 32768 if the Cpu parameter is set to 16000.
  • This parameter is set to 65536 if the Cpu parameter is set to 8000, 16000, or 32000.
  • This parameter is set to 131072 if the Cpu parameter is set to 32000.
4096
MseEnabledboolean

Specifies whether to enable WebAssembly Filter. Valid values:

  • true: enables this parameter.
  • false: disables this parameter.
true
MseNamespaceIdstring

The ID of the namespace to which the MSE instance belongs.

test
ProgrammingLanguagestring

The programming language that is used to create the application. Valid values:

  • java :Java.
  • php: PHP.
  • other: other programming languages, such as Python, C++, Go, .NET, and Node.js
java
BaseAppIdstring

The ID of the basic application.

ee99cce6-1c8e-4bfa-96c3-3e2fa9******

Examples

Sample success responses

JSONformat

{
  "RequestId": "01CF26C7-00A3-4AA6-BA76-7E95F2A3****",
  "Message": "success",
  "TraceId": "ac1a0b2215622920113732501e****",
  "Application": {
    "AppId": "443d638a-ef76-47c4-b707-61197d******",
    "AppName": "test",
    "AppDescription": "",
    "NamespaceId": "cn-shenzhen",
    "ScaleRuleType": "timing",
    "ScaleRuleEnabled": "true",
    "RunningInstances": 1,
    "Instances": 0,
    "Cpu": 2000,
    "Mem": 4096,
    "MseEnabled": true,
    "MseNamespaceId": "test",
    "ProgrammingLanguage": "java",
    "BaseAppId": "ee99cce6-1c8e-4bfa-96c3-3e2fa9******"
  }
}

Error codes

HTTP status codeError codeError message
400InvalidApplication.NotFoundThe current application does not exist.
400InvalidParameter.WithMessageThe parameter is invalid {%s}: %s
400InvalidParameter.ObviouslyThe specified parameter is invalid {%s}.
400InvalidParameter.NotEmptyYou must specify the parameter %s.
400InvalidParameter.NoPermissionResource no permission
404InvalidAppId.NotFoundThe specified AppId does not exist.

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