---
description: Project api reference
---

# Projects

## Create project

<mark style="color:green;">`POST`</mark> `https://localhost:44362/projects/`

This endpoint allows you to create project.

#### Headers

| Name         | Type   | Description                                                                               |
| ------------ | ------ | ----------------------------------------------------------------------------------------- |
| Content-Type | string | The Content-Type entity header is used to indicate the media type. Use _application/json_ |

#### Request Body

| Name        | Type   | Description               |
| ----------- | ------ | ------------------------- |
| id          | string | Unique identifier project |
| name        | string |  Name of project          |
| description | string | Description of project    |

{% tabs %}
{% tab title="201 Project successfully created" %}
```
{
    "id": "bc6c5436-ffff-439e-ae27-9b3b967daa11",
    "name": "Sample Project",
    "description": "Sample project to demonstrate cosmos toggles"
}
```
{% endtab %}

{% tab title="409 Return array of notification message error" %}
```
[
  {
    "code": 409,
    "description": "Data already exists",
    "content": null,
    "friendlyMessages": null
  }
]
```
{% endtab %}

{% tab title="500 Unexpected application error" %}
```
{
  "code": 500,
  "description": "Error message"
}
```
{% endtab %}
{% endtabs %}

## Get projects

<mark style="color:blue;">`GET`</mark> `https://localhost:44362/projects/`

Get all projects

#### Headers

| Name         | Type   | Description                                                                               |
| ------------ | ------ | ----------------------------------------------------------------------------------------- |
| Content-Type | string | The Content-Type entity header is used to indicate the media type. Use _application/json_ |

{% tabs %}
{% tab title="200 Return array of projects" %}
```
[
    {
        "id": "bc6c5436-ffff-439e-ae27-9b3b967daa11",
        "name": "Sample Project",
        "description": "Sample project to demonstrate cosmos toggles"
    }
]
```
{% endtab %}

{% tab title="404 Return array of notification message error" %}
```
[
  {
    "code": 404,
    "description": "Data nout found",
    "content": null,
    "friendlyMessages": null
  }
]
```
{% endtab %}
{% endtabs %}

## Get project

<mark style="color:blue;">`GET`</mark> `https://localhost:44362/projects/:projectId`

Get project by identifier

#### Query Parameters

| Name      | Type   | Description        |
| --------- | ------ | ------------------ |
| projectId | string | Project identifier |

#### Headers

| Name         | Type   | Description                                                                               |
| ------------ | ------ | ----------------------------------------------------------------------------------------- |
| Content-Type | string | The Content-Type entity header is used to indicate the media tye. User _application/json_ |

{% tabs %}
{% tab title="200 Return a project" %}
```
{
	  "id": "bc6c5436-ffff-439e-ae27-9b3b967daa11",
    "name": "Sample Project",
    "description": "Sample project to demonstrate cosmos toggles"
}
```
{% endtab %}

{% tab title="404 " %}
```
[
  {
    "code": 404,
    "description": "Data nout found",
    "content": null,
    "friendlyMessages": null
  }
]
```
{% endtab %}

{% tab title="500 Unexpected application error" %}
```
{
  "code": 500,
  "description": "Error message"
}
```
{% endtab %}
{% endtabs %}

