> For the complete documentation index, see [llms.txt](https://alecmei-gubin.gitbook.io/citron-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alecmei-gubin.gitbook.io/citron-system/untitled/proekty/taski/osnovnye-metody.md).

# Основные методы

## index

<mark style="color:blue;">`GET`</mark> `https://api.url/api/project_tasks`

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

```
{
    "data": [
        {
            "id": 1,
            "name": "Тестовая задача",
            "description": "Описание тестовой задачи",
            "implementer_id": 9,
            "creator_id": 9,
            "prospective_date": "2020-04-24 00:00:00",
            "status_id": 1,
            "project_id": 5,
            "stage_id": 2,
            "created_at": "2020-04-18T20:20:06.000000Z",
            "updated_at": "2020-04-18T20:20:06.000000Z"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## create

<mark style="color:green;">`POST`</mark> `https://api.url/api/project_tasks`

#### Request Body

| Name              | Type    | Description                    |
| ----------------- | ------- | ------------------------------ |
| stage\_id         | integer | id доски                       |
| project\_id       | integer | id проекта таска               |
| status\_id        | integer | id статуса таска               |
| prospective\_date | string  | ожидаемая дата завешения таска |
| creator\_id       | integer | id создателя таска             |
| implementer\_id   | integer | кто работает над таском        |
| description       | string  | описание таска                 |
| name              | string  | название таска                 |

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

```
{
    "data": {
        "id": 1,
        "name": "Тестовая задача",
        "description": "Описание тестовой задачи",
        "implementer_id": "9",
        "creator_id": "9",
        "prospective_date": "2020-04-24",
        "status_id": "1",
        "project_id": "5",
        "stage_id": "2",
        "created_at": "2020-04-18T20:20:06.000000Z",
        "updated_at": "2020-04-18T20:20:06.000000Z"
    }
}
```

{% endtab %}
{% endtabs %}

## update

<mark style="color:orange;">`PUT`</mark> `https://api.url/api/project_tasks/{project_task_id}`

#### Path Parameters

| Name              | Type    | Description |
| ----------------- | ------- | ----------- |
| project\_task\_id | integer | id таска    |

#### Request Body

| Name              | Type    | Description |
| ----------------- | ------- | ----------- |
| stage\_id         | integer |             |
| project\_id       | integer |             |
| status\_id        | integer |             |
| prospective\_date | string  |             |
| creator\_id       | integer |             |
| implementer\_id   | integer |             |
| description       | string  |             |
| name              | string  |             |

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

```
{
    "data": {
        "id": 1,
        "name": "Тестовая задача changed",
        "description": "Описание тестовой задачи",
        "implementer_id": "9",
        "creator_id": "9",
        "prospective_date": "2020-04-24",
        "status_id": "1",
        "project_id": "5",
        "stage_id": "2",
        "created_at": "2020-04-18T20:20:06.000000Z",
        "updated_at": "2020-04-18T20:26:44.000000Z"
    }
}
```

{% endtab %}
{% endtabs %}

## delete

<mark style="color:red;">`DELETE`</mark> `https://api.url/api/project_tasks/{project_task_id}`

#### Path Parameters

| Name              | Type   | Description |
| ----------------- | ------ | ----------- |
| project\_task\_id | string |             |

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

```
[
    'success'
]
```

{% endtab %}
{% endtabs %}
