UpdateSkill

Updated at:

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

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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 PublishImmediately is true and publishing succeeds, this field contains the version saved by this request.

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.