Retrieves a digital employee.
Operation description
Retrieves a digital employee.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
starops:GetDigitalEmployee |
get |
*DigitalEmployee
|
None | None |
Request syntax
GET /digital-employee/{name} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| name |
string |
Yes |
The name of the digital employee. |
test |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
No parameters required.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data returned by the API operation. |
||
| attributes |
object |
The attributes. |
|
|
string |
The attributes. |
{} |
|
| channel |
string |
The channel type. |
default |
| createTime |
string |
The creation time in RFC 3339 format. The time zone is UTC. |
2025-03-11T08:21:58Z |
| defaultRule |
string |
The default rules of the digital employee. |
test |
| description |
string |
The description of the digital employee. |
test |
| displayName |
string |
The display name of the digital employee. |
test |
| employeeType |
string |
The type of the digital employee. |
custom |
| knowledges |
object |
The list of knowledge bases. |
|
| bailian |
array<object> |
The list of Model Studio knowledge bases. |
|
|
object |
The list of Model Studio knowledge bases. |
||
| attributes |
string |
The attributes of the knowledge base. |
test |
| indexId |
string |
The index ID in Model Studio. |
index-xxxx |
| region |
string |
The region of the knowledge base. |
cn-beijing |
| workspaceId |
string |
The workspace ID in Model Studio. |
llm-xxxxx |
| sop |
array<object> |
The list of SOP knowledge bases. |
|
|
object |
The SOP knowledge base. |
{ "type": "oss", "basePath": "docs/", "region": "cn-hangzhou", "endpoint": "oss-cn-hangzhou.aliyuncs.com", "bucket": "my-sop-bucket", "description": "sls sop" } |
|
| name |
string |
The name of the digital employee. |
test |
| regionId |
string |
The resource property field that represents the region ID. |
cn-beijing |
| requestId |
string |
The request ID. |
0B9377D9-C56B-5C2E-A8A4-************ |
| resourceGroupId |
string |
The resource group ID. |
rg-ae******ey |
| roleArn |
string |
The ARN of the RAM role. |
acs:ram::12345678912:role/testrole |
| sandboxNetworkPolicy |
object |
The sandbox network ACL policy configuration for the digital employee. |
{"allowFqdns":["api.example.com"],"allowCidrs":["1.2.3.0/24","8.8.8.8"],"enableAcl":false} |
| allowCidrs |
array |
The list of allowed CIDR blocks or IP addresses. |
|
|
string |
The list of allowed CIDR blocks or IP addresses. |
1.2.3.0/24 |
|
| allowFqdns |
array |
The list of allowed FQDNs. |
|
|
string |
The list of allowed FQDNs. |
api.example.com |
|
| enableAcl |
boolean |
Specifies whether to enable the sandbox network ACL. |
false |
| status |
integer |
The status of the digital employee. Valid values:
|
0 |
| tags |
array |
The tags. |
|
| Tag |
The tags. |
||
| toolPolicy |
object |
The tool policy. |
{"aliyun":{"enable":true,"statements":[{"decision":"user_ack","product":"Sls","apiVersion":"2020-12-30","actions":["log:GetProject","log:CreateDashboard"]}]}} |
| aliyun |
object |
The security policy configuration for Aliyun CLI tool invocation. |
{"enable":true,"statements":[{"decision":"user_ack","product":"Sls","apiVersion":"2020-12-30","actions":["log:GetProject","log:CreateDashboard"]}]} |
| autoPassPolicy |
array |
The automatic pass policy. Each entry is a RAM action string in the format of product:ApiName, product:Prefix*, or product:. If an action matches an entry, it is automatically passed without manual confirmation. If this parameter is empty or not configured, built-in read-only actions (Get, List*, and Describe*) are automatically passed. Unmatched actions require manual confirmation (HIL). |
["log:Get*","log:List*"] |
|
string |
The RAM action to be automatically passed, in the format of , product:ApiName, or product:Prefix. |
log:Get* |
|
| denyPolicy |
array |
The explicit deny policy, which has the highest priority. Each entry is a RAM action string in the format of product:ApiName, product:Prefix*, or product:*. If this parameter is empty or not configured, no operations are actively denied. Matched actions in STAROps are directly denied, and a secondary fallback check is performed on the POP side. |
["ecs:RunCommand","ecs:Delete*"] |
|
string |
The RAM action to be denied, in the format of , product:ApiName, or product:Prefix. |
ecs:Delete* |
|
| enable |
boolean |
Specifies whether to enable the policy. |
true |
statements
deprecated
|
array<object> |
The list of Aliyun CLI tool policy statements. |
[{"decision":"user_ack","product":"Sls","apiVersion":"2020-12-30","actions":["log:GetProject","log:CreateDashboard"]}] |
|
object |
[Deprecated] |
{"decision":"user_ack","product":"Sls","apiVersion":"2020-12-30","actions":["log:GetProject","log:CreateDashboard"]} |
|
| actions |
array |
The list of RAM actions. |
["log:GetProject","log:CreateDashboard"] |
|
string |
RAM action |
log:GetProject |
|
apiVersion
deprecated
|
string |
The API version. |
2020-12-30 |
| decision |
string |
The execution policy. Valid values:
|
user_ack |
| product |
string |
The code of the cloud service. |
Sls |
| global |
object |
The global automatic pass configuration for the digital employee. |
|
| autoPassPolicy |
array |
The automatic pass policy for CLI commands. |
[{"version":"v1.0.0","fullCommand":"starops tool list"},{"version":"v1.0.0","commandPrefix":["starops sls"]}] |
| AutoPassPolicy |
The struct that defines the automatic pass rule. |
||
| hooks |
array |
The hook configuration. |
|
| Hook |
The struct that defines a hook. |
||
| updateTime |
string |
The update time in RFC 3339 format. The time zone is UTC. |
2025-02-18T02:25:06Z |
Hook configuration
You can configure hooks for the digital employee by using toolPolicy.hooks. Each item corresponds to an event and a handler, and is loaded and executed in the order of the array. Hooks with the same name are executed independently. A hook is executed only when enable is set to true and the scope, event, and tool name match. An empty array indicates that no hooks are loaded for the digital employee.
schemaVersion: The configuration protocol version. Set the value tov1.name: The non-empty name. Only English letters, digits, underscores (_), and hyphens (-) are allowed.scope: The scope. Valid values:all(Chat and Mission),chat, andmission.event: The event. Valid values:TurnStart,TurnEnd,ToolStart, andToolEnd.match: The array of tool names. This parameter is only used forToolStartandToolEnd. It performs exact matching based on the actual name and does not support wildcards. An empty array does not limit the tools. This field is ignored for other events.execution.type: The execution type. Valid values:prompt,bash,python3, andhint. Theinstructionfield must be filled with a prompt, a Bash script, a Python 3 script, or text appended to the context, and must be non-empty UTF-8 text.execution.timeoutSeconds: The timeout period, which ranges from 1 to 30 seconds. All attempts and waits share this timeout period.execution.maxRetry: The number of additional attempts after a failure. Valid values: 0 to 3.execution.failResult: The action to take if the handler return value is still invalid after retries. Valid values:allowandreject.
Global automatic pass policy
You can configure automatic pass rules for commands by using toolPolicy.global.autoPassPolicy. Each rule must provide version: "v1.0.0" and use one of the following two matching methods:
fullCommand: The exact non-empty full command to match.commandPrefix: The array of command prefixes. It must contain exactly one non-empty prefix.
You cannot configure both fullCommand and commandPrefix at the same time, and you cannot omit both. The rules here use the command format, whereas toolPolicy.aliyun.autoPassPolicy uses RAM action strings. The two formats are different.
The following example shows the configuration of these two parts in toolPolicy:
{
"global": {
"autoPassPolicy": [
{
"version": "v1.0.0",
"fullCommand": "starops tool list"
},
{
"version": "v1.0.0",
"commandPrefix": [
"starops sls"
]
}
]
},
"hooks": [
{
"schemaVersion": "v1",
"name": "tool-reminder",
"enable": true,
"scope": "all",
"event": "ToolStart",
"match": [
"Bash"
],
"execution": {
"type": "hint",
"instruction": "Confirm the target resources and parameters before executing the tool.",
"timeoutSeconds": 10,
"maxRetry": 0,
"failResult": "reject"
}
}
]
}
Examples
Success response
JSON format
{
"attributes": {
"key": "{}"
},
"channel": "default",
"createTime": "2025-03-11T08:21:58Z\n",
"defaultRule": "test",
"description": "test",
"displayName": "test",
"employeeType": "custom",
"knowledges": {
"bailian": [
{
"attributes": "test",
"indexId": "index-xxxx\n",
"region": "cn-beijing\n",
"workspaceId": "llm-xxxxx\n"
}
],
"sop": [
{
"type": "oss",
"basePath": "docs/",
"region": "cn-hangzhou",
"endpoint": "oss-cn-hangzhou.aliyuncs.com",
"bucket": "my-sop-bucket",
"description": "sls sop"
}
]
},
"name": "test",
"regionId": "cn-beijing\n",
"requestId": "0B9377D9-C56B-5C2E-A8A4-************\n",
"resourceGroupId": "rg-ae******ey",
"roleArn": "acs:ram::12345678912:role/testrole",
"sandboxNetworkPolicy": {
"allowCidrs": [
"1.2.3.0/24"
],
"allowFqdns": [
"api.example.com"
],
"enableAcl": false
},
"status": 0,
"tags": [
{
"key": "test-key",
"value": "test-value"
}
],
"toolPolicy": {
"aliyun": {
"autoPassPolicy": [
"log:Get*"
],
"denyPolicy": [
"ecs:Delete*"
],
"enable": true,
"statements": [
{
"actions": [
"log:GetProject"
],
"apiVersion": "2020-12-30",
"decision": "user_ack",
"product": "Sls"
}
]
}
},
"updateTime": "2025-02-18T02:25:06Z\n"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 404 | InvalidDigitalEmployee.NotFound | The specified DigitalEmployee does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.