All Products
Search
Document Center

DataWorks:CreateProject

Last Updated:May 06, 2024

Creates a DataWorks workspace.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateProject

The operation that you want to perform. Set the value to CreateProject.

ProjectName String Yes Test

The display name of the workspace.

ProjectDescription String Yes Test

The description of the workspace.

DisableDevelopment Boolean No false

Specifies whether to disable the Development role. Valid values:

  • false: enables the Development role.
  • true: disables the Development role.
  • Default value: false.
IsAllowDownload Integer No 1

Specifies whether query result download from DataStudio is allowed. Valid values:

  • 1: allowed
  • 0: not allowed
  • Default value: 1.
ProjectMode Integer No 3

The mode of the workspace. For more information about the differences between the modes of workspaces, see Differences between workspaces in basic mode and workspaces in standard mode. Valid values:

  • 2: basic mode
  • 3: standard mode
  • Default value: 2.
ProjectIdentifier String Yes test

The name of the workspace. The name can contain letters, digits, and underscores (_) and must start with a letter or digit.

ResourceManagerResourceGroupId String No rg-acfmzbn7pti3***

The resource group ID.

Tags Array No

The tags.

Key String Yes Env

The tag key.

Value String Yes Test

The tag value.

Response parameters

Parameter Type Example Description
HttpStatusCode Integer 200

The HTTP status code returned.

RequestId String 1AFAE64E-D1BE-432B-A9****

The request ID. You can use the ID to locate logs and troubleshoot issues.

Success Boolean true

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
Data Long 25

The workspace ID.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateProject
&ProjectName=Test
&ProjectDescription=Test
&DisableDevelopment=false
&IsAllowDownload=1
&ProjectMode=3
&ProjectIdentifier=test
&ResourceManagerResourceGroupId=rg-acfmzbn7pti3***
&Tags=[{"Key":"Env","Value":"Test"}]
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateProjectResponse>
    <HttpStatusCode>200</HttpStatusCode>
    <RequestId>1AFAE64E-D1BE-432B-A9****</RequestId>
    <Success>true</Success>
    <Data>25</Data>
</CreateProjectResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "HttpStatusCode" : 200,
  "RequestId" : "1AFAE64E-D1BE-432B-A9****",
  "Success" : true,
  "Data" : 25
}

Error codes

HTTP status code Error code Error message Description
400 Invalid.Tenant.ConnectionNotExists The connection does not exist. The specified data source does not exist.
400 Invalid.Tenant.ProjectNotExists The project does not exist. The specified workspace does not exist.
400 Invalid.Tenant.UserNotInProject The user is not in the project. The user is not added to the workspace.
403 Invalid.Tenant.UserIsNotProjectOwnerOrAdmin The user is not a project administrator or owner. The user is not the workspace owner or administrator.
403 Invalid.Tenant.UserNotInTenant The user is not in tenant. The user does not belong to the tenant.

For a list of error codes, see Service error codes.