UpdateSkill
Updates a skill.
Operation description
- Update rules:
Nameis used only to locate the skill and cannot be modified.The caller must be the creator of the skill or the root account of the tenant that has permissions to manage the tenant-level skill.
- Replacement rules:
If
DescriptionandVisibilityare omitted, their original values are retained. Passingnullis treated as omission and cannot be used to clear the original values.Metadatais replaced as a whole, not merged incrementally. IfMetadatais omitted, the original content is retained. If it is passed, old fields not included in the new object are deleted.When modifying only
DescriptionorVisibility, do not passMetadataor an empty object{}. An empty object replaces the original metadata with an empty object.
- Content sources:
When replacing the body or bundle, you must choose one and only one of
skillMd,transitId, orbundleUrl.For the field formats of the three sources, the Transit upload confirmation process, and the
bundleUrlrestrictions, refer to CreateSkill. Pass the selected source inUpdateSkill.Metadata.
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:UpdateSkill |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
Yes |
The name of the skill to be updated. This parameter is used only to locate the skill and cannot be used to modify the name. |
code-review |
| ExpectedVersion |
integer |
No |
The expected version number. |
2 |
| Description |
string |
No |
The updated description of the skill. |
A skill used to perform code review, security checks, and risk alerts |
| Metadata |
any |
No |
The updated metadata of the skill. The JSON object is replaced as a whole. The content supports one of the following: Transit ID, bundleUrl, or skillMd. |
{"transitId":"transit_example456"} |
| Visibility |
string |
No |
The updated visibility. Valid values: |
tenant |
Metadata definition
| Name | Type | Description | Example |
skillMd | string | The Markdown body. For the format and restrictions, refer to CreateSkill. | # Code Review\nCheck code quality, security risks, and coding standards. |
transitId | string | The uploaded and confirmed Transit ID. For the upload process, refer to CreateSkill. | transit_example456 |
bundleUrl | string | The one-time public HTTPS ZIP direct link. For security restrictions, refer to CreateSkill. | https://example.com/code-review-v2.zip |
Request example
{
"Name": "code-review",
"Description": "A skill used to perform code review, security checks, and risk alerts",
"Metadata": {
"transitId": "transit_example456"
},
"Visibility": "tenant"
}
The preceding example uses Transit. When updating the URL or body, replace Metadata with one of the following objects:
{"bundleUrl": "https://example.com/code-review-v2.zip"}
{"skillMd": "# Code Review\nCheck code quality, security risks, and coding standards."}
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| SkillId |
string |
The skill ID. |
skill_example123 |
| Name |
string |
The name of the skill. |
code-review |
| UpdatedAt |
integer |
The time when the skill was updated. The value is a UNIX timestamp in milliseconds. |
1760000200000 |
| Success |
boolean |
Indicates whether the operation is successful. A value of |
true |
| RequestId |
string |
The request ID. |
0A1B2C3D-4E5F-6789-ABCD-EF0123456789 |
Success response example
{
"SkillId": "skill_example123",
"Name": "code-review",
"UpdatedAt": 1760000200000,
"Success": true,
"RequestId": "0A1B2C3D-4E5F-6789-ABCD-EF0123456789"
}
Examples
Success response
JSON format
{
"SkillId": "skill_example123",
"Name": "code-review",
"UpdatedAt": 1760000200000,
"Success": true,
"RequestId": "0A1B2C3D-4E5F-6789-ABCD-EF0123456789"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is invalid. | |
| 400 | Skill.BundleUrlRejected | The skill bundle URL was rejected. | |
| 400 | Skill.BundleInvalid | The specified skill bundle is invalid. | |
| 401 | Unauthenticated | Authentication required. | |
| 500 | InternalError | Internal server error. | |
| 413 | Skill.BundleTooLarge | The skill bundle exceeds the allowed size. | |
| 403 | Skill.Forbidden | You are not authorized to operate this skill. | |
| 404 | Skill.ResourceNotFound | The specified skill was not found. | |
| 404 | Skill.BundleSourceNotFound | The specified skill bundle source was not found. | |
| 503 | ServiceUnavailable | The service is not ready or temporarily unavailable. | |
| 504 | ServiceTimeout | A required service timed out. | |
| 504 | Skill.BundleDownloadTimeout | Downloading the skill bundle timed out. | |
| 504 | Skill.OperationResultUnknown | The result of the skill operation is unknown. | |
| 409 | Skill.VersionConflict | The skill has a version conflict. Refresh it and retry. | |
| 409 | Skill.InvalidState | The skill is not in a state that allows this operation. | |
| 409 | Skill.BundleQuotaExceeded | The skill bundle storage quota would be exceeded. |
See Error CodesError Codes for a complete list.
Release notes
See Release NotesRelease Notes for a complete list.