# Team

This section describes the endpoints for interacting with teams.

## Get teams

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/admin/api/teams`

Get all accounts

#### Query Parameters

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| page<mark style="color:red;">\*</mark>  | String | 1           |
| limit<mark style="color:red;">\*</mark> | String | 10          |

#### Headers

| Name                                      | Type   | Description   |
| ----------------------------------------- | ------ | ------------- |
| Api-Key<mark style="color:red;">\*</mark> | String | Admin api key |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "docs": [
        {
            "_id": "6548a41f38406c14db33b61e",
            "name": "My Team",
            "email": "john.doe@mail.com",
            "members": [
                {
                    "user": {
                        "_id": "6548a41138406c14db33b606",
                        "status": 0,
                        "hubspotContactId": "131751",
                        "name": "John Doe",
                        "email": "john.doe@mail.com",
                        "stripeId": "cus_OxIokju2aarNVm"
                    },
                    "role": 0
                }
            ],
            "createdAt": "2023-11-06T08:30:23.529Z",
            "updatedAt": "2023-11-06T12:56:06.337Z",
            "billingSettings": {
                "_id": "6548e2660919dc0442dc2ec7",
                "user": "6548a41138406c14db33b606",
                "__v": 0,
                "address1": "test1",
                "address2": "Test",
                "city": "Test",
                "company": "Rezet",
                "country": "Afghanistan",
                "createdAt": "2023-11-06T12:56:06.296Z",
                "state": "Test",
                "taxId": null,
                "updatedAt": "2023-11-07T10:18:39.676Z",
                "zip": "34334"
            },
            "id": "6548a41f38406c14db33b61e",
            "status": "customer"
        },
        {
            "_id": "6549ff7ce58641429600ac91",
            "name": "DEV Team1",
            "email": "john.doe@mail.com",
            "members": [
                {
                    "user": {
                        "_id": "6548a41138406c14db33b606",
                        "status": 0,
                        "hubspotContactId": "131751",
                        "name": "John Doe",
                        "email": "john.doe@mail.com",
                        "stripeId": "cus_OxIokju2aarNVm"
                    },
                    "role": 0
                }
            ],
            "createdAt": "2023-11-06T08:30:23.529Z",
            "updatedAt": "2023-11-07T09:55:26.348Z",
            "billingSettings": {
                "_id": "6548e2660919dc0442dc2ec7",
                "user": "6548a41138406c14db33b606",
                "__v": 0,
                "address1": "test1",
                "address2": "Test",
                "city": "Test",
                "company": "Rezet",
                "country": "Afghanistan",
                "createdAt": "2023-11-06T12:56:06.296Z",
                "state": "Test",
                "taxId": null,
                "updatedAt": "2023-11-07T10:18:39.676Z",
                "zip": "34334"
            },
            "id": "6549ff7ce58641429600ac91",
            "status": "customer"
        },
        {
            "_id": "654a094970c99a149c791fc7",
            "name": "My Team",
            "email": "john.doe@mail.com",
            "members": [
                {
                    "user": {
                        "_id": "654a093e70c99a149c791faf",
                        "status": 0,
                        "hubspotContactId": "206501",
                        "name": "John Doe",
                        "email": "john.doe@mail.com",
                        "stripeId": "cus_OxhNYBXJyLjbnU"
                    },
                    "role": 0
                }
            ],
            "createdAt": "2023-11-07T09:54:17.095Z",
            "updatedAt": "2023-11-07T09:54:17.095Z",
            "id": "654a094970c99a149c791fc7",
            "status": "prospect"
        }
    ],
    "totalDocs": 3,
    "limit": 10,
    "totalPages": 1,
    "page": 1,
    "pagingCounter": 1,
    "hasPrevPage": false,
    "hasNextPage": false,
    "prevPage": null,
    "nextPage": null
}
```

{% endtab %}
{% endtabs %}

## Get team

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/admin/api/teams/{id}`

Get a specific team

#### Path Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| id<mark style="color:red;">\*</mark> | String | Team ID     |

#### Headers

| Name                                      | Type   | Description   |
| ----------------------------------------- | ------ | ------------- |
| Api-Key<mark style="color:red;">\*</mark> | String | Admin api key |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "_id": "6548a41f38406c14db33b61e",
    "name": "My Team",
    "email": "john.doe@mail.com",
    "members": [
        {
            "user": {
                "_id": "6548a41138406c14db33b606",
                "status": 0,
                "name": "John Doe",
                "email": "john.doe@mail.com",
                "stripeId": "cus_OxIokju2aarNVm"
            },
            "role": 0
        }
    ],
    "createdAt": "2023-11-06T08:30:23.529Z",
    "updatedAt": "2023-11-06T12:56:06.337Z",
    "billingSettings": {
        "_id": "6548e2660919dc0442dc2ec7",
        "user": "6548a41138406c14db33b606",
        "__v": 0,
        "address1": "test1",
        "address2": "Test",
        "city": "Test",
        "company": "Rezet",
        "country": "Afghanistan",
        "createdAt": "2023-11-06T12:56:06.296Z",
        "state": "Test",
        "taxId": null,
        "updatedAt": "2023-11-07T10:18:39.676Z",
        "zip": "34334"
    }
}
```

{% endtab %}
{% endtabs %}

## Get team costs

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/admin/api/teams/{id}/costs`

Get a cost estimate for a specific team.

#### Path Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| id<mark style="color:red;">\*</mark> | String | Team ID     |

#### Headers

| Name                                      | Type   | Description   |
| ----------------------------------------- | ------ | ------------- |
| Api-Key<mark style="color:red;">\*</mark> | String | Admin api key |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "total": 1,
    "dbs": [
        {
            "_id": "6549e7710a5652081f72e3ee",
            "status": 3,
            "name": "kraud-cloud-mongodb-1vcpu-1gb-berlin-01",
            "price": "6548a383e2442d14b6bf96dc",
            "cost": 0
        }
    ],
    "apps": [
        {
            "_id": "6549e7690a5652081f72e3ae",
            "status": 3,
            "name": "kraud-cloud-nextcloud-berlin-01",
            "price": "6548a383e2442d14b6bf96fc",
            "cost": 0
        }
    ],
    "vms": [
        {
            "_id": "6549ebb3fb723c0a85a5244a",
            "status": 7,
            "name": "kraud-cloud-ubuntu-1vcpu-4gb-berlin-01",
            "price": "6548a383e2442d14b6bf970b",
            "cost": 0
        },
        {
            "_id": "6549fc7a70c99a149c7918e8",
            "status": 7,
            "name": "azure-ubuntu-2vcpu-8gb-northeurope-01",
            "price": "6548a383e2442d14b6bf9750",
            "cost": 1
        },
        {
            "_id": "6549fc8570c99a149c79193f",
            "status": 7,
            "name": "aws-ubuntu-2vcpu-8gb-eu-west-1-02",
            "price": "6548a384e2442d14b6bf9763",
            "cost": 0
        },
        {
            "_id": "654a002170c99a149c791cb6",
            "status": 7,
            "name": "kraud-cloud-ubuntu-1vcpu-4gb-berlin-01",
            "price": "6548a383e2442d14b6bf970b",
            "cost": 0
        },
        {
            "_id": "654a10fd619e4f1a657135bd",
            "status": 7,
            "name": "kraud-cloud-ubuntu-1vcpu-4gb-berlin-01",
            "price": "6548a383e2442d14b6bf970b",
            "cost": 0
        },
        {
            "_id": "654a11e60b23ef1b0f36d44e",
            "status": 7,
            "name": "kraud-cloud-ubuntu-1vcpu-4gb-berlin-01",
            "price": "6548a383e2442d14b6bf970b",
            "cost": 0
        }
    ],
    "k8s": [
        {
            "name": "k8s-development-1",
            "cluster": "6549ec825205cf0c45f24e54",
            "status": 6,
            "resources": [
                {
                    "resource": "6549ec825205cf0c45f24e56",
                    "priceId": "6548a383e2442d14b6bf9712",
                    "cluster": "6549ec825205cf0c45f24e54",
                    "cost": 0
                },
                {
                    "resource": "6549ec825205cf0c45f24e5a",
                    "priceId": "6548a383e2442d14b6bf970e",
                    "cluster": "6549ec825205cf0c45f24e54",
                    "cost": 0
                }
            ],
            "cost": 0
        },
        {
            "name": "k8s-development-1",
            "cluster": "6549f05e5205cf0c45f24feb",
            "status": 6,
            "resources": [
                {
                    "resource": "6549f05e5205cf0c45f24fed",
                    "priceId": "6548a383e2442d14b6bf9712",
                    "cluster": "6549f05e5205cf0c45f24feb",
                    "cost": 0
                },
                {
                    "resource": "6549f05e5205cf0c45f24ff1",
                    "priceId": "6548a383e2442d14b6bf970e",
                    "cluster": "6549f05e5205cf0c45f24feb",
                    "cost": 0
                },
                {
                    "resource": "6549f1bb5205cf0c45f25073",
                    "priceId": "6548a383e2442d14b6bf970e",
                    "cluster": "6549f05e5205cf0c45f24feb",
                    "cost": 0
                }
            ],
            "cost": 0
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Get team billing history

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/admin/api/teams/{id}/`

Get all invoices for a specific team.

#### Path Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| id<mark style="color:red;">\*</mark> | String | Team ID     |

#### Query Parameters

| Name                                   | Type   | Description |
| -------------------------------------- | ------ | ----------- |
| page<mark style="color:red;">\*</mark> | String | 1           |

#### Headers

| Name                                      | Type   | Description   |
| ----------------------------------------- | ------ | ------------- |
| Api-Key<mark style="color:red;">\*</mark> | String | Admin api key |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "docs": [
        {
            "_id": "65490130ff600e06af2a9694",
            "status": "paid",
            "amount": 3300,
            "invoicePdf": "https://pay.stripe.com/invoice/acct_1NOaelA0ZUrt0vQJ/test_YWNjdF8xTk9hZWxBMFpVcnQwdlFKLF9PeFBENUF5elR4cDU3bU5ycVVreUVuVVd3dm5hTmhnLDg5ODI0MDY202009yaqn40z/pdf?s=ap"
        }
    ],
    "totalDocs": 1,
    "limit": 10,
    "totalPages": 1,
    "page": 1,
    "pagingCounter": 1,
    "hasPrevPage": false,
    "hasNextPage": false,
    "prevPage": null,
    "nextPage": null
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.enclaive.cloud/enclaive-multi-cloud-platform/developers/api/admin-admin-api/accounts/team.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
