CreateSkill
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
Test
RAM authorization
|
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:
|
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 |
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 |
|
|
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.