Projects

In the "Projects" section, endpoints for flexible project management involving all team members are described.

The user can create several projects. The user can create any resources in these projects. It is important to note that all projects belong to a team and that all team members have access to the project.

Create project

POST {{BASE_URL}}/api/projects

Create a new project, facilitating the organization of tasks and collaboration among team members.

Path Parameters

NameTypeDescription

id*

String

Team ID

Headers

NameTypeDescription

Authorization*

String

Bearer Token

Request Body

NameTypeDescription

data*

Object

{
    "name": "dev",
    "description": "test",
    "environment": "Development",
    "purpose": "Just trying out Enclaive",
    "isDefault": false,
    "icon": 11,
    "_id": "6549fb0870c99a149c791852",
    "owner": "6548a41138406c14db33b606",
    "team": "6548a41f38406c14db33b61e",
    "createdAt": "2023-11-07T08:53:28.369Z",
    "updatedAt": "2023-11-07T08:53:28.369Z"
}
Request payload
{
    "name": "dev",
    "description": "test",
    "purpose": "Just trying out Enclaive",
    "environment": "Development",
    "team": "6548a41f38406c14db33b61e",
    "icon": 11
}

Retrieve Team Projects

GET {{BASE_URL}}/api/teams/{id}/projects

Retrieve all projects associated with a specific team, providing an overview of their active projects

Path Parameters

NameTypeDescription

id*

String

Team ID

Headers

NameTypeDescription

Authorization*

String

Bearer Token

[
    {
        "_id": "6548a41f38406c14db33b62c",
        "name": "first-project",
        "description": "Update your project information under Settings",
        "environment": "Development",
        "purpose": "Just trying out Enclaive",
        "isDefault": false,
        "icon": 1,
        "owner": "6548a41138406c14db33b606",
        "team": "6548a41f38406c14db33b61e",
        "createdAt": "2023-11-06T08:30:23.552Z",
        "updatedAt": "2023-11-06T08:30:23.552Z"
    },
    {
        "_id": "6549f6165bc89e139c2db632",
        "name": "dev-project",
        "description": "",
        "environment": "Development",
        "purpose": "Just trying out Enclaive",
        "isDefault": false,
        "icon": 9,
        "owner": "6548a41138406c14db33b606",
        "team": "6548a41f38406c14db33b61e",
        "createdAt": "2023-11-07T08:32:22.798Z",
        "updatedAt": "2023-11-07T08:32:22.798Z"
    }
]

Retrieve Project Resources

GET {{BASE_URL}}/api/teams/{id}/projects/{projectId}/resources

Retrieve all active resources within a specific project.

Path Parameters

NameTypeDescription

id*

String

Team ID

projectId

String

Project ID

Headers

NameTypeDescription

Authorization*

String

Bearer Token

[
    {
        "_id": "6549ebb3fb723c0a85a5244a",
        "name": "kraud-cloud-ubuntu-1vcpu-4gb-berlin-01"
    }
]

Update project

PUT {{BASE_URL}}/api/projects/{id}

Update project details, ensuring that project information remains accurate and up to date.

Path Parameters

NameTypeDescription

id*

String

Project ID

Headers

NameTypeDescription

Authorization*

String

Bearer Token

{
    "name": "first-project",
    "description": "Update your project information under Settings",
    "environment": "Development",
    "purpose": "Just trying out Enclaive",
    "isDefault": false,
    "icon": 1,
    "_id": "6548a41f38406c14db33b62c",
    "owner": {
        "status": 0,
        "balance": 0,
        "hubspotContactId": "131751",
        "emailVerified": true,
        "referrer": null,
        "_id": "6548a41138406c14db33b606",
        "name": "John Doe",
        "email": "john.doe@mail.com",
        "password": "$2b$08$4bDMa0IhkDutP207Xe3cC.Rmm/NcLiUhelx/g9xI2JvjWu/khp4By",
        "emailVerificationToken": "",
        "stripeId": "cus_OxIokju2aarNVm",
        "createdAt": "2023-11-06T08:30:09.166Z",
        "updatedAt": "2023-11-06T08:30:24.438Z"
    },
    "team": {
        "name": "My Team",
        "_id": "6548a41f38406c14db33b61e",
        "email": "john.doe@mail.com",
        "members": [
            {
                "user": "6548a41138406c14db33b606",
                "role": 0
            }
        ],
        "createdAt": "2023-11-06T08:30:23.529Z",
        "updatedAt": "2023-11-06T12:56:06.337Z",
        "billingSettings": "6548e2660919dc0442dc2ec7"
    },
    "createdAt": "2023-11-06T08:30:23.552Z",
    "updatedAt": "2023-11-07T08:52:28.154Z"
}

Delete project

DELETE {{BASE_URL}}/api/teams/{id}/projects/{projectId}

Delete a project, provided there are no active resources within it.

Path Parameters

NameTypeDescription

id*

String

Team ID

projectId

String

Project ID

Headers

NameTypeDescription

Authorization*

String

Bearer Token

{"message":"ok"}

Last updated