# /backlogs

## Get list of backlogs

<mark style="color:blue;">`GET`</mark> `http://pm415.com/api/backlogs/:showarchived/:orgid`

Shows the list of backlogs for the current org.

#### Path Parameters

| Name          | Type    | Description       |
| ------------- | ------- | ----------------- |
| :orgid        | number  | The ID of the org |
| :showarchived | boolean | True or false     |

#### Headers

| Name           | Type   | Description                                 |
| -------------- | ------ | ------------------------------------------- |
| Authentication | string | Authorization: Bearer 50ca9ba0f7b1444fa55d5 |

{% tabs %}
{% tab title="200 Backlogs retrieved" %}

```javascript
{
    "success": true,
    "backlogs": [
        {
            "email": "hwyxlisjb@emlpro.com",
            "firstName": "alena",
            "lastName": "prilipko",
            "id": 17,
            "title": "hhhh",
            "description": null,
            "archived": 0,
            "statusId": 1,
            "createdBy": 13
        }
    ],
    "admin": true
}
```

{% endtab %}
{% endtabs %}

## Select full data of backlogs

<mark style="color:green;">`POST`</mark> `http://pm415.com/api/backlogs/:orgid`

Selects the full data of backlogs.

#### Path Parameters

| Name   | Type   | Description       |
| ------ | ------ | ----------------- |
| :orgid | number | The ID of the org |

#### Headers

| Name           | Type   | Description                                 |
| -------------- | ------ | ------------------------------------------- |
| Authentication | string | Authorization: Bearer 50ca9ba0f7b1444fa55d5 |

#### Request Body

| Name | Type   | Description                                     |
| ---- | ------ | ----------------------------------------------- |
|      | object | {"backlogsId": \["17","2"], "fullSelect": true} |

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

```
{
    "success": true,
    "backlogs": [
        {
            "createdAt": "2019-04-24T07:43:40.000Z",
            "points": 0,
            "assignee": null,
            "archived": 0,
            "id": 17,
            "title": "hhhh",
            "description": null,
            "statusId": 1,
            "createdBy": 13,
            "forecastedRelease": null,
            "actualRelease": null,
            "plannedOn": null
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Update current backlog

<mark style="color:orange;">`PUT`</mark> `http://pm415.com/api/backlogs/edit/:orgid/:backlogid`

Updates the current backlog.

#### Path Parameters

| Name       | Type   | Description                              |
| ---------- | ------ | ---------------------------------------- |
| :orgid     | number | The ID of the org                        |
| :backlogid | number | The ID of the backlog you want to update |

#### Headers

| Name           | Type   | Description                                 |
| -------------- | ------ | ------------------------------------------- |
| Authentication | string | Authorization: Bearer 50ca9ba0f7b1444fa55d5 |

#### Request Body

| Name | Type   | Description                        |
| ---- | ------ | ---------------------------------- |
|      | object | {"title": "mmm", "statusId": "2" } |

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

```
{
    "success": true,
    "backlog": {
        "assignee": null,
        "organizationId": 17,
        "id": 18,
        "title": "mmm",
        "description": null,
        "statusId": "2",
        "points": 0,
        "createdAt": "2019-04-24T10:46:34.000Z",
        "createdBy": 13,
        "updatedAt": "2019-04-24T10:49:47.000Z",
        "forecastedRelease": null,
        "actualRelease": null,
        "plannedOn": "2019-04-24T10:49:47.000Z",
        "archived": 0,
        "updated_at": "2019-04-24T14:45:38.899Z"
    }
}
```

{% endtab %}
{% endtabs %}

## Create new backlog

<mark style="color:green;">`POST`</mark> `http://pm415.com/api/backlogs/new/:orgid`

Creates a new backlog for the current organization.

#### Path Parameters

| Name   | Type   | Description       |
| ------ | ------ | ----------------- |
| :orgid | number | The ID of the org |

#### Headers

| Name           | Type   | Description                                 |
| -------------- | ------ | ------------------------------------------- |
| Authentication | string | Authorization: Bearer 50ca9ba0f7b1444fa55d5 |

#### Request Body

| Name | Type   | Description                          |
| ---- | ------ | ------------------------------------ |
|      | object | {"title": "asdasd", "statusId": "2"} |

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

```
{
    "success": true,
    "backlog": {
        "title": "asdasd",
        "statusId": "2",
        "organization_id": 17,
        "created_by": 13,
        "plannedOn": "2019-04-24T15:10:13.229Z",
        "updated_at": "2019-04-24T15:10:13.229Z",
        "created_at": "2019-04-24T15:10:13.229Z",
        "id": 19
    }
}
```

{% endtab %}
{% endtabs %}

## Delete a backlog

<mark style="color:red;">`DELETE`</mark> `http://pm415.com/api/backlogs/:orgid/:backlogid`

Deletes the chosen backlog.

#### Path Parameters

| Name       | Type   | Description                              |
| ---------- | ------ | ---------------------------------------- |
| :backlogid | number | The ID of the backlog you want to delete |
| :orgid     | number | The ID of the org                        |

#### Headers

| Name           | Type   | Description                                 |
| -------------- | ------ | ------------------------------------------- |
| Authentication | string | Authorization: Bearer 50ca9ba0f7b1444fa55d5 |

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

```
{
    "success": true,
    "backlog": 18,
    "message": "Backlog deleted"
}
```

{% endtab %}
{% endtabs %}
