GetDigitalEmployee
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. |
||
| requestId |
string |
The request ID. |
0B9377D9-C56B-5C2E-A8A4-************ |
| name |
string |
The name of the digital employee. |
test |
| defaultRule |
string |
The default rule of the digital employee. |
test |
| description |
string |
The description of the digital employee. |
test |
| createTime |
string |
The creation time in RFC 3339 format and the UTC time zone. |
2025-03-11T08:21:58Z |
| displayName |
string |
The display name of the digital employee. |
test |
| updateTime |
string |
The update time in RFC 3339 format and the UTC time zone. |
2025-02-18T02:25:06Z |
| roleArn |
string |
The ARN of the RAM role. |
acs:ram::12345678912:role/testrole |
| regionId |
string |
The resource property field that represents the region ID. |
cn-beijing |
| 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. |
||
| workspaceId |
string |
The workspace ID of Model Studio. |
llm-xxxxx |
| indexId |
string |
The index ID of Model Studio. |
index-xxxx |
| region |
string |
The region of the knowledge base. |
cn-beijing |
| attributes |
string |
The attributes of the knowledge base. |
test |
| 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" } |
|
| employeeType |
string |
The type of the digital employee. |
custom |
| channel |
string |
The channel type. |
default |
| tags |
array |
The tags. |
|
| Tag |
The tags. |
||
| resourceGroupId |
string |
The resource group ID. |
rg-ae******ey |
| attributes |
object |
The attributes. |
|
|
string |
The attributes. |
{} |
|
| toolPolicy |
object |
The tool policy. |
{"aliyun":{"enable":true,"statements":[{"decision":"user_ack","product":"Sls","apiVersion":"2020-12-30","actions":["log:GetProject","log:CreateDashboard"]}]}} |
| global |
object |
The global auto-pass configuration for the digital employee. |
|
| autoPassPolicy |
array |
The auto-pass policy for CLI commands. |
[{"version":"v1.0.0","fullCommand":"starops tool list"},{"version":"v1.0.0","commandPrefix":["starops sls"]}] |
| AutoPassPolicy |
The auto-pass definition struct. |
||
| 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"]}]} |
| enable |
boolean |
Specifies whether the policy is enabled. |
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"]} |
|
| decision |
string |
The execution policy. Valid values:
|
user_ack |
| product |
string |
The code of the cloud service. |
Sls |
apiVersion
deprecated
|
string |
The API version. |
2020-12-30 |
| actions |
array |
The list of RAM actions. |
["log:GetProject","log:CreateDashboard"] |
|
string |
RAM action |
log:GetProject |
|
| 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. If a STAROps operation matches the policy, it is directly denied. The POP side provides a secondary fallback mechanism. |
["ecs:RunCommand","ecs:Delete*"] |
|
string |
The denied RAM action, in the format of , product:ApiName, or product:Prefix. |
ecs:Delete* |
|
| autoPassPolicy |
array |
The auto-pass policy. Each entry is a RAM action string in the format of product:ApiName, product:Prefix*, or product:. If an operation matches the policy, it is automatically allowed without manual confirmation. If this parameter is empty or not configured, built-in read-only actions (Get, List*, and Describe*) are automatically allowed. Unmatched operations require manual confirmation (HIL). |
["log:Get*","log:List*"] |
|
string |
The auto-passed RAM action, in the format of , product:ApiName, or product:Prefix. |
log:Get* |
|
| hooks |
array |
The hook configuration. |
|
| Hook |
The hook definition struct. |
||
| 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} |
| allowFqdns |
array |
The list of allowed FQDNs. |
|
|
string |
The list of allowed FQDNs. |
api.example.com |
|
| 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 |
|
| enableAcl |
boolean |
Specifies whether to enable the sandbox network ACL. |
false |
| status |
integer |
The status of the digital employee. Valid values: 0: Normal. 1: Disabled. |
0 |
Hook configuration
Configure digital employee hooks through 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 digital employee hooks are loaded.
schemaVersion: The configuration protocol version. Set the value to v1.
name: A non-empty name. Only English letters, digits, underscores, and hyphens are allowed.
scope: all (Chat and Mission), chat, or mission.
event: TurnStart, TurnEnd, ToolStart, or ToolEnd.
match: An array of tool names. This field is only used for ToolStart and ToolEnd. It performs exact matching based on the actual name and does not support wildcards. An empty array does not restrict tools. This field is ignored for other events.
execution.type: prompt, bash, python3, or hint. For instruction, enter a prompt, a Bash script, a Python 3 script, or text appended to the context. The value must be non-empty UTF-8 text.
execution.timeoutSeconds: 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: If the handler return value is still invalid after retries, the operation is processed as allow or reject.
Global auto-pass policy
Configure command auto-pass rules through toolPolicy.global.autoPassPolicy. Each rule must provide version: "v1.0.0" and use one of the following two matching methods:
fullCommand: An exact match for a non-empty full command.
commandPrefix: An array of command prefixes. It must and can only contain one non-empty prefix.
fullCommand and commandPrefix cannot be configured at the same time, nor can they be omitted at the same time. The rules here use the command format, whereas toolPolicy.aliyun.autoPassPolicy uses RAM action strings. The two formats are different.
The following is a configuration example for 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
{
"requestId": "0B9377D9-C56B-5C2E-A8A4-************\n",
"name": "test",
"defaultRule": "test",
"description": "test",
"createTime": "2025-03-11T08:21:58Z\n",
"displayName": "test",
"updateTime": "2025-02-18T02:25:06Z\n",
"roleArn": "acs:ram::12345678912:role/testrole",
"regionId": "cn-beijing\n",
"knowledges": {
"bailian": [
{
"workspaceId": "llm-xxxxx\n",
"indexId": "index-xxxx\n",
"region": "cn-beijing\n",
"attributes": "test"
}
],
"sop": [
{
"type": "oss",
"basePath": "docs/",
"region": "cn-hangzhou",
"endpoint": "oss-cn-hangzhou.aliyuncs.com",
"bucket": "my-sop-bucket",
"description": "sls sop"
}
]
},
"employeeType": "custom",
"channel": "default",
"tags": [
{
"key": "test-key",
"value": "test-value"
}
],
"resourceGroupId": "rg-ae******ey",
"attributes": {
"key": "{}"
},
"toolPolicy": {
"global": {
"autoPassPolicy": [
{
"commandPrefix": [
"starops sls"
],
"fullCommand": "starops tool list",
"version": "v1.0.0"
}
]
},
"aliyun": {
"enable": true,
"statements": [
{
"decision": "user_ack",
"product": "Sls",
"apiVersion": "2020-12-30",
"actions": [
"log:GetProject"
]
}
],
"denyPolicy": [
"ecs:Delete*"
],
"autoPassPolicy": [
"log:Get*"
]
},
"hooks": [
{
"schemaVersion": "v1",
"name": "command-guard",
"description": "Check whether the command in the tool invoke is safe.",
"enable": true,
"debug": false,
"invisible": false,
"scope": "all",
"execution": {
"type": "prompt",
"instruction": "Check whether the current tool invoke is safe.",
"timeoutSeconds": 10,
"maxRetry": 0,
"failResult": "allow"
},
"event": "ToolStart",
"match": [
"Bash,Write,Edit,Read"
]
}
]
},
"sandboxNetworkPolicy": {
"allowFqdns": [
"api.example.com"
],
"allowCidrs": [
"1.2.3.0/24"
],
"enableAcl": false
},
"status": 0
}
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.