CreateSkill

Updated at:

Creates a new skill in DataWorks.

Operation description

Request description

  • You must specify either the SkillMdOverride or BundleUrl parameter.

  • The Visibility parameter can be set to TENANT, PROJECT, or USER. These values indicate that the skill is visible to the tenant, specific projects, or specific users, respectively.

  • When Visibility is set to PROJECT, you must use VisibilityScope.ProjectIds to specify the list of visible project IDs. When Visibility is set to USER, you must use VisibilityScope.UserIds to specify the list of visible user IDs.

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:CreateSkill

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Name

string

Yes

The skill name, which must be unique within the current account.

my-skill

Description

string

No

The skill description.

Data analytics skill

Visibility

string

No

The visibility level. TENANT: visible to the tenant. PROJECT: visible to specified projects. USER: visible to specified users.

Valid values:

  • PROJECT :

    Project.

  • USER :

    User.

  • TENANT :

    Tenant.

TENANT

VersionNote

string

No

The version note.

Initial version

SkillMdOverride

string

No

The body of SKILL.md. This parameter and BundleUrl are mutually exclusive. If you do not provide a bundle, use this field to create a lightweight skill that contains only SKILL.md.

--- name: example-skill description: Sample skill. --- # Sample skill Summarize the text provided by the user

BundleUrl

string

No

The download URL of bundle.zip (HTTP or HTTPS). This parameter and SkillMdOverride are mutually exclusive.

https://example.com/skill.zip

Extra

object

No

The extended metadata in key-value pairs.

{"appId":"APP_CWJMV36CT9SAFW1QEHX7"}

VisibilityScope

object

No

The visibility scope. The corresponding field is used based on the value of Visibility.

ProjectIds

array

No

The list of visible project IDs. This parameter takes effect when Visibility is set to PROJECT.

string

No

The project ID.

12345

UserIds

array

No

The list of visible user IDs. This parameter takes effect when Visibility is set to USER.

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 the publication fails, the saved draft is retained and the original error is returned. Call GetSkill to read the data back before retrying.

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. This value can be used as ExpectedVersion for concurrency control in subsequent updates.

1

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.

1

Status

string

The current status of the skill. Saving a new draft does not automatically clear the existing publish pointer. Check this status together with SkillVersion and PublishedVersion.

PUBLISHED

Name

string

The skill name.

my-skill

SkillId

string

The stable resource identifier of the skill.

skill_mj7a4p2x9k3q

GmtCreateTime

string

The creation time (UNIX timestamp in milliseconds).

1780555634000

CreatorId

string

The creator ID.

123456

ModifierId

string

The ID of the last modifier.

123456

Description

string

The skill description.

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. This field applies when Visibility is set to USER.

string

The user ID.

123456

Body

string

The body of SKILL.md.

--- name: example-skill description: Sample skill. --- # Sample skill Summarize the text provided by the user

GmtModifiedTime

string

The update time in milliseconds.

12345678901

Examples

Success response

JSON format

{
  "RequestId": "824F80BA-1778-5D8A-BAFF-668A4D9C4CC7",
  "Skill": {
    "SkillVersion": 1,
    "PublishedVersion": 1,
    "Status": "PUBLISHED",
    "Name": "my-skill",
    "SkillId": "skill_mj7a4p2x9k3q",
    "GmtCreateTime": "1780555634000",
    "CreatorId": "123456",
    "ModifierId": "123456",
    "Description": "Data analytics skill",
    "Visibility": "TENANT",
    "VisibilityScope": {
      "ProjectIds": [
        "123456"
      ],
      "UserIds": [
        "123456"
      ]
    },
    "Body": "---\nname: example-skill\ndescription: Sample skill.\n---\n\n# Sample skill\n\nSummarize the text provided by the user",
    "GmtModifiedTime": "12345678901"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.