GetSkill
Queries the skills visible to the current caller by name.
Operation description
- Query target:
Queries by
Name. Querying bySkillIdis not supported.Prioritizes returning skills with the same name that are visible to the caller under the current tenant. If no visible records are found, it queries official skills with the same name.
If
SkillVersionis omitted, the current skill is returned. This parameter is omitted by default.
- Download URL:
Networksupportspublicandinternal. If omitted, no download URL is generated.If the skill has an accessible artifact, a temporary
DownloadUrland the correspondingDownloadUrlNetworkare returned.If the artifact does not exist, access is denied, or URL generation fails, the skill query still succeeds, but the download URL-related fields may not be returned.
The original
bundleUrlused during creation is not saved and will not be echoed back through this API.
Try it now
Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ada:GetSkill |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
Yes |
The name of the skill. |
code-review |
| SkillVersion |
integer |
No |
Specifies the published historical version number to query. If omitted, the current primary record of the skill is returned. |
2 |
| Network |
string |
No |
The network type of the download URL. Valid values: public and internal. If omitted, no download URL is generated. |
public |
Nameis a required parameter and specifies the name of the skill to query.If
SkillVersionis omitted, the current primary record of the skill is returned. If this parameter is specified, the corresponding published historical version is returned.To generate a bundle download URL, set
Networktopublicorinternal. If this parameter is omitted, no download URL is generated.Networkonly controls the generation of the download URL. If the artifact does not exist, access is denied, or URL generation fails, the skill query still succeeds, but the download URL-related fields may not be returned.
Request example
{
"Name": "code-review",
"SkillVersion": 2,
"Network": "public"
}
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The skill information returned by the GetSkill API. |
||
| SkillId |
string |
The skill ID. |
skill_example123 |
| Name |
string |
The name of the skill. |
code-review |
| Description |
string |
The description in the current primary record of the skill. |
A skill for performing code review and risk alerts |
| Visibility |
string |
The visibility of the current skill. Common values are user and tenant. |
user |
| Status |
string |
The current status of the skill. Common values are DRAFT and PUBLISHED. |
PUBLISHED |
| CreatedAt |
integer |
The creation time of the skill. The value is a UNIX timestamp in milliseconds. |
1760000000000 |
| UpdatedAt |
integer |
The update time of the skill. The value is a UNIX timestamp in milliseconds. |
1760000300000 |
| Metadata |
any |
The metadata of the skill, which is mapped to the metadata field in the backend response. |
{"skillMd":"# Code Review\nCheck code quality.","artifactId":"artifact_example003"} |
| DownloadUrl |
string |
The download URL of the bundle. This field is returned when the network is specified, an accessible artifact exists, and presigning is successful. |
https://example.com/artifacts/code-review-v2.zip?signature=example |
| DownloadUrlNetwork |
string |
The network type actually used to generate the download URL. |
public |
| CanModify |
boolean |
Indicates whether the current caller can modify the skill. |
true |
| Official |
boolean |
Indicates whether the skill is an official skill. |
false |
| CanDelete |
boolean |
Indicates whether the current caller can delete the skill. |
true |
| IconUrl |
string |
The URL of the skill icon, which is derived from the iconUrl in the metadata. This field may be empty if no icon is configured. |
https://example.com/icons/code-review.png |
| RequestId |
string |
The request ID, which is used for Tracing Analysis and troubleshooting. |
0A1B2C3D-4E5F-6789-ABCD-EF0123456789 |
Metadata definition
| Name | Type | Description | Example |
skillMd | string | The inline body of SKILL.md, excluding the YAML front matter. | # Code Review\nCheck code quality and security risks. |
artifactId | string | The ID of the artifact currently associated with the skill, which is used to read or generate the bundle download URL. | artifact_example003 |
Sample success response
{
"SkillId": "skill_example123",
"Name": "code-review",
"Description": "A skill for performing code review and risk alerts",
"Visibility": "user",
"Status": "PUBLISHED",
"CreatedAt": 1760000000000,
"UpdatedAt": 1760000300000,
"Metadata": {
"skillMd": "# Code Review\nCheck code quality and security risks.",
"artifactId": "artifact_example003"
},
"DownloadUrl": "https://example.com/artifacts/code-review-v2.zip?signature=example",
"DownloadUrlNetwork": "public",
"CanModify": true,
"Official": false,
"CanDelete": true,
"RequestId": "0A1B2C3D-4E5F-6789-ABCD-EF0123456789"
}
Examples
Success response
JSON format
{
"SkillId": "skill_example123",
"Name": "code-review",
"Description": "A skill for code review and risk alerting",
"Visibility": "user",
"Status": "PUBLISHED",
"CreatedAt": 1760000000000,
"UpdatedAt": 1760000300000,
"Metadata": "{\"skillMd\":\"# Code Review\\nCheck code quality.\",\"artifactId\":\"artifact_example003\"}",
"DownloadUrl": "https://example.com/artifacts/code-review-v2.zip?signature=example",
"DownloadUrlNetwork": "public",
"CanModify": true,
"Official": false,
"CanDelete": true,
"IconUrl": "https://example.com/icons/code-review.png",
"RequestId": "0A1B2C3D-4E5F-6789-ABCD-EF0123456789"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is invalid. | |
| 401 | Unauthenticated | Authentication required. | |
| 500 | InternalError | Internal server error. | |
| 404 | Skill.ResourceNotFound | The specified skill was not found. | |
| 404 | Skill.VersionNotFound | The specified skill version was not found. | |
| 503 | ServiceUnavailable | The service is not ready or temporarily unavailable. | |
| 504 | ServiceTimeout | A required service timed out. |
See Error CodesError Codes for a complete list.
Release notes
See Release NotesRelease Notes for a complete list.