Skip to content

2.Project

1. Create project

API address: /v1/project

Request method:POST

Request data type:application/json

Response data type:*/*,application/json

Supported version:v1.10.0

API description:

Create project

Request parameters:

Parameters Data type Location Whether required Description
name integer body true Project name, project name
remark integer body false Remark information
standard string body false Whether it is the default project. After setting it as the default project, the previous default project will become a non-default project. Card resources, container resources, image resources, and business networks are all units belonging to a project. When adding or querying these resources, the corresponding project id must be specified. If not passed, the default project among the projects the user has permission for will be obtained by default.  

Request example. Replace parameter values in the actual request:

POST "/openapi/v1/project"
body:
{
    "name": "ttt",
    "remark": "test_create"
}

Response parameters:

Parameters Data type Description
code integer(int32) Return code
message string Return processing message
timestamp integer(int64) Timestamp
traceId string Request processing ID, request ID

Response example:

{

    "message": "操作成功!",
    "code": 200,
    "result": "创建项目成功",
    "timestamp": 1720161166348,
    "traceId": "C20240705143246348042"
}

2. Project list

API address: /v1/project/list

Request method:POST

Request data type:application/json

Response data type:*/*,application/json

Supported version:v1.10.0

API description:

Get project list

Request parameters: none

Request example. Replace parameter values in the actual request:

POST "/openapi/v1/project/list"

Response parameters:

Parameters Data type Description
code integer Return code
message string Return processing message
result list<object> Returned data object
  uuid string Project UUID
  name string Project name
  remark string Remark information
  owner integer Project owner ID
  ownerName string Project owner name
  standard boolean Whether it is the default project; true means default project
  status integer Whether enabled, 1 enabled, 0 disabled
  limitArmcard long Number of boards the project can request
  cardNum integer Number of cards
  createTime string Project creation time
timestamp integer Timestamp
traceId string Request processing ID

Response example:

{

    "message": "操作成功!",
    "code": 200,
    "result": [
        {
            "uuid": "4fef186e57b64e64e57666db378e6135",
            "name": "ttt",
            "remark": "test_create",
            "owner": 2,
            "createTime": "2024-07-05 14:32:46",
            "standard": false,
            "status": 1,
            "ownerName": "public",
            "limitArmcard": 100,
            "cardNum": 10
        }
    ],
    "timestamp": 1720161270363,
    "traceId": "C20240705143430363013"
}