You need to enable JavaScript to run this app.
Torch Log Service

Torch Log Service

Copy page
Download PDF
Project management API
CreateProject
Copy page
Download PDF
CreateProject
Call the CreateProject interface to create a project.​
Usage notes​
  • The project is the basic unit of resource management in Torch Log Service, used for log resource isolation and access control among multiple users or projects.​
  • The call frequency limit for this interface is 20 times/s, and exceeding the frequency limit will result in an ExceedQPSLimit error.​
Request syntax​
  • Request Method:POST​
  • Request URL:https://{tls-endpoint}/CreateProject​
Request parameters​
The table below only lists the request parameters specific to this interface and some common parameters. For more information, please see Common parameters.​
Body​
​
Name​
Type​
Required​
Example​
Description​
ProjectName​
String​
True​
test-project​
The name of the project. Please refer to the Resource Naming limit for naming rules. The project name needs to be unique in the same region under the same account.​
Region​
String​
True​
cn-beijing​
the region ID . For a list of supported regions, please refer to the Service Address.​
Description​
String​
False​
This is a test project​
The description information of the project.​
  • Does not support <, ', \, \\ and all emoji symbols.​
  • The length is 0 to 64 characters.​
IamProjectName​
String​
False​
default​
The IAM project to which the currently created project belongs. When this parameter is not specified, Torch Log Service will add the project to an IAM project named default.​
Tags​
Array of Tag​
False​
​
[{"Key": "key1",​
"Value": "value1"}]​
​
The tags of the project.​
Tags are used for the identification and classification of cloud resources. You can classify projects and topics through tags, which facilitates resource search and resource aggregation.​
​
Tag​
​
Name​
Type​
Required​
Example​
Description​
Key​
String​
False​
owner​
The key of the tag. For setting rules, please refer to Tag Setting Rules.​
Value​
String​
False​
zhangsan​
The value of the tag. For setting rules, please refer to Tag Setting Rules.​
​
Responses​
The table below only lists the return parameters specific to this interface. For more information, please refer to the Response message.​
​
Name​
Type​
Example​
Description​
ProjectId​
String​
fc69****​
The unique ID of the project.​
​
Sample Request​
​
POST https://{tls-endpoint}/CreateProject HTTP/1.1​
Content-Type: application/json​
{​
"ProjectName": "test1",​
"Description": "test1",​
"Region": "cn-beijing",​
"IamProjectName": "default",​
"Tags": [​
{​
"Key": "key1",​
"Value": "value1"​
}​
]​
}​
​
Sample Response​
​
HTTP/1.1 200 OK​
Content-Type:application/json; charset=utf-8​
{​
"ProjectId": "f***********"​
}​
​
Error code​
The following table lists the error codes related to the interface and business logic. For common error codes, please refer to the Common error codes.​
​
HTTP status code​
Error code​
Error message​
Description​
400​
InvalidArgument​
Invalid argument key %s, value %s, please check argument.​
The request contains illegal parameters.​
409​
ProjectAlreadyExists​
Project already exist​
The project already exists.​
400​
ProjectQuotaExceed​
Exceeded project quota​
Exceeding project number limits.​
500​
ErrInternalServerError​
We encountered an unexpected server error, please try again later.​
Internal server error.​
​
​
​
Last updated: 2025.10.28 18:41:13