UpdateSkill
Updates a specified skill and generates a new version.
Operation description
Request description
This API allows you to update an existing skill and create a new version based on the current highest version or a specified version. Fields that are not provided in the request remain unchanged. You can update the skill content by providing either SkillMdOverride or BundleUrl. Additionally, you can configure extra information such as the visibility scope.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:UpdateSkill |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
Yes |
The name of the skill to update. |
my-skill |
| ExpectedVersion |
integer |
No |
The expected version number for optimistic locking. If not specified, the update is based on the current highest version. |
1 |
| Description |
string |
No |
The description of the skill. |
Data analytics skill |
| VersionNote |
string |
No |
The version note. |
Revision note |
| SkillMdOverride |
string |
No |
The body of SKILL.md. Mutually exclusive with BundleUrl. |
Putting an elephant into a refrigerator involves three steps: open the refrigerator door, put the elephant in, and close the refrigerator door |
| BundleUrl |
string |
No |
The downloadable URL (HTTP or HTTPS) of bundle.zip. Mutually exclusive with SkillMdOverride. If specified, the bundle is replaced. |
https://example.com/skill.zip |
| Extra |
object |
No |
The extended metadata as key-value pairs. |
{"appId": "APP_Q2SDWKIGFWNZTR68K1GQ"} |
| VisibilityScope |
object |
No |
The visibility scope. The corresponding fields are used based on the visibility level. |
|
| ProjectIds |
array |
No |
The list of visible project IDs. |
|
|
string |
No |
The project ID. |
123456 |
|
| UserIds |
array |
No |
The list of visible user IDs. |
|
|
string |
No |
The user ID. |
123456 |
|
| PublishImmediately |
boolean |
No |
Specifies whether to publish the current skill version immediately after saving. If this parameter is omitted, set to null, or set to false, only a draft is saved. If this parameter is set to true, the existing publish validation is reused to publish the exact saved version. If publishing fails, the saved draft is retained and the original error is returned. Call GetSkill to read back the data before you retry. |
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
824F80BA-1778-5D8A-BAFF-668A4D9C4CC7 |
| Skill |
object |
The skill details. |
|
| SkillVersion |
integer |
The integer definition version saved in this request. You can use it as ExpectedVersion for concurrency control in subsequent updates. |
2 |
| PublishedVersion |
integer |
The integer version number of the currently published skill. This field is empty if the skill has not been published. If |
2 |
| Status |
string |
The current status of the skill. Saving a new draft does not automatically clear the existing publish pointer. Check both SkillVersion and PublishedVersion to determine the status. |
PUBLISHED |
| Name |
string |
The name of the skill. |
my-skill |
| SkillId |
string |
The stable resource identifier of the skill. |
skill_mj7a4p2x9k3q |
| GmtCreateTime |
string |
The creation time as a timestamp in milliseconds. |
1780555634000 |
| GmtModifiedTime |
string |
The last modification time as a timestamp in milliseconds. |
1780555634000 |
| CreatorId |
string |
The ID of the creator. |
123456 |
| ModifierId |
string |
The ID of the last modifier. |
123456 |
| Description |
string |
The description of the skill. |
Data analytics skill |
| Visibility |
string |
The visibility level. |
TENANT |
| VisibilityScope |
object |
The visibility scope. |
|
| ProjectIds |
array |
The list of visible project IDs. |
|
|
string |
The project ID. |
123456 |
|
| UserIds |
array |
The list of visible user IDs. |
|
|
string |
The user ID. |
123456 |
|
| Body |
string |
The body of SKILL.md. |
Putting an elephant into a refrigerator involves three steps: open the refrigerator door, put the elephant in, and close the refrigerator door |
Examples
Success response
JSON format
{
"RequestId": "824F80BA-1778-5D8A-BAFF-668A4D9C4CC7",
"Skill": {
"SkillVersion": 2,
"PublishedVersion": 2,
"Status": "PUBLISHED",
"Name": "my-skill",
"SkillId": "skill_mj7a4p2x9k3q",
"GmtCreateTime": "1780555634000",
"GmtModifiedTime": "1780555634000",
"CreatorId": "123456",
"ModifierId": "123456",
"Description": "Data analytics skill",
"Visibility": "TENANT",
"VisibilityScope": {
"ProjectIds": [
"123456"
],
"UserIds": [
"123456"
]
},
"Body": "Putting an elephant into a refrigerator involves three steps: open the refrigerator door, put the elephant in, and close the refrigerator door"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.