Creates a DataWorks workspace.
Debugging
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:
|
IsAllowDownload | Integer | No | 1 | Specifies whether query result download from DataStudio is allowed. Valid values:
|
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:
|
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:
|
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.