Obtains the token used to remotely log on to the Webshell of an instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sae:GetWebshellToken |
get |
*All Resource
|
None | None |
Request syntax
GET /pop/v1/sam/instance/webshellToken HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AppId |
string |
Yes |
The ID of the interactive messaging application. |
017f39b8-dfa4-4e16-a84b-1dcee4b1**** |
| PodName |
string |
Yes |
The name of the pod. |
hello-podsdfsdfsdfsdf |
| ContainerName |
string |
No |
The name of the init container. Note:
|
ad-helper |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
Request ID. |
91F93257-7A4A-4BD3-9A7E-2F6EAE6D**** |
| Message |
string |
The returned message. Value description:
|
success |
| TraceId |
string |
The ID of the trace. |
0a98a02315955564772843261e**** |
| Data |
object |
The returned result. |
|
| Token |
string |
The information about the token. |
zWWpvRj_5pzof4hfo7-hGynM8oGMmO_7 |
| HttpUrl |
string |
Webshell page address |
HttpUrl : "https://saenext.console.aliyun.com/cn-shenzhen/app-list/app1/micro-app/shell/pod1?tokenId=xxx |
| WebSocketUrl |
string |
The WebSocket address. |
wss://sae-webshell.console.aliyun.com/websocket/eamWebshell?tokenId=xxx®ion=cn-shenzhen |
| ErrorCode |
string |
The error code returned if the call failed. Value values:
|
400 |
| Code |
string |
The HTTP status code. Valid values:
|
200 |
| Success |
boolean |
Indicates whether the request was successful. |
true |
Examples
Success response
JSON format
{
"RequestId": "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
"Message": "success",
"TraceId": "0a98a02315955564772843261e****",
"Data": {
"Token": "zWWpvRj_5pzof4hfo7-hGynM8oGMmO_7",
"HttpUrl": "HttpUrl : \"https://saenext.console.aliyun.com/cn-shenzhen/app-list/app1/micro-app/shell/pod1?tokenId=xxx",
"WebSocketUrl": "wss://sae-webshell.console.aliyun.com/websocket/eamWebshell?tokenId=xxx®ion=cn-shenzhen"
},
"ErrorCode": "400",
"Code": "200",
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidApplication.NotFound | The current application does not exist. | |
| 400 | InvalidParameter.NotEmpty | You must specify the parameter %s. | |
| 400 | InvalidParameter.Obviously | The specified parameter is invalid {%s}. | |
| 400 | InvalidParameter.WithMessage | The parameter is invalid {%s}: %s | |
| 500 | OperationFailed.RPCError | Internal RPC request processing error. | Internal RPC request processing error. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.