> For the complete documentation index, see [llms.txt](https://eton-1.gitbook.io/eton/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eton-1.gitbook.io/eton/untitled.md).

# Board

모든 프로젝트를 볼 수 있는 페이지

## \[Board]Get all projects involved

<mark style="color:blue;">`GET`</mark> `https://eton.io/boards`

board\_user table -> user\_id print

#### Headers

| Name          | Type   | Description  |
| ------------- | ------ | ------------ |
| authorization | string | access token |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{ 
    "data": {
        "boardList": [
            {
                id : 1,
                title : 'project',
                admin_userId : 1,
                prg_priority : '2,1',
            },  {
                id : 2,
                title : 'project2',
                admin_userId : 1,
                prg_priority : '1,2',
            }
        ]
    },
    "message": "ok"
}
```

{% endtab %}

{% tab title="403 Could not find a cake matching this query." %}

```
{ "message": "Invalid access token." }
```

{% endtab %}

{% tab title="404 " %}

```
{ "message": "Not Found." }
```

{% endtab %}
{% endtabs %}

## \[Board]Create new project

<mark style="color:green;">`POST`</mark> `/boards`

#### Headers

| Name          | Type   | Description  |
| ------------- | ------ | ------------ |
| authorization | string | Access Token |

#### Request Body

| Name  | Type   | Description          |
| ----- | ------ | -------------------- |
| title | string | The project's title. |

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

```
{
    "id": {board_id}, 
    "message": "Created."
}
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}

{% tab title="404 " %}

```
{ "message": "Not Found." }
```

{% endtab %}
{% endtabs %}

* prg\_priority default: '' (빈 문자열)

## \[Board]Modify the project title.

<mark style="color:purple;">`PATCH`</mark> `/boards/:board_id`

#### Path Parameters

| Name      | Type   | Description       |
| --------- | ------ | ----------------- |
| board\_id | string | The project's ID. |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| authorization | string | Access token. |

#### Request Body

| Name  | Type   | Description          |
| ----- | ------ | -------------------- |
| title | string | The project's title. |

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

```
{ "message": "Ok." }
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}

{% tab title="404 " %}

```
{ "message": "Not Found." }
```

{% endtab %}
{% endtabs %}

## \[Board]Delete a project

<mark style="color:red;">`DELETE`</mark> `/boards/:board_id`

&#x20;You can delete an entire project including tasks in there.

#### Path Parameters

| Name      | Type    | Description       |
| --------- | ------- | ----------------- |
| board\_id | integer | The project's ID. |

#### Headers

| Name          | Type   | Description  |
| ------------- | ------ | ------------ |
| authorization | string | Access token |

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

```
{ 
    "message": "Deleted."
}
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}

{% tab title="404 " %}

```
{ "message": "Not Found." }
```

{% endtab %}
{% endtabs %}

## \[Member]Get all members of the project

<mark style="color:blue;">`GET`</mark> `/boards/:board_id/member`

#### Path Parameters

| Name      | Type   | Description       |
| --------- | ------ | ----------------- |
| board\_id | string | The project's ID. |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| authorization | string | Access token. |

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

```
{
    "data": { "userList" : [ 
        { "id": "1", "name": "사람1" },
        { "id": "2", "name": "사람2"}
      ] 
  },
    "message: "Ok"
}
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}

{% tab title="404 " %}

```
{ "message": "Not Found." }
```

{% endtab %}
{% endtabs %}

* Send all participants of the project data in an array.

## \[Member]Add new member to the project

<mark style="color:green;">`POST`</mark> `/boards/:board_id/member`

#### Path Parameters

| Name      | Type    | Description       |
| --------- | ------- | ----------------- |
| board\_id | integer | The project's ID. |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| authorization | string | Access token. |

#### Request Body

| Name   | Type  | Description                     |
| ------ | ----- | ------------------------------- |
| member | array | New participant of the project. |

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

```
{
    "message": "Members are updated."
}
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}

{% tab title="404 " %}

```
{ "message": "Not Found." }
```

{% endtab %}
{% endtabs %}

## \[Member]Delete a member of the project

<mark style="color:red;">`DELETE`</mark> `/boards/:board_id/member`

#### Path Parameters

| Name      | Type    | Description       |
| --------- | ------- | ----------------- |
| board\_id | integer | The project's ID. |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| authorization | string | Access token. |

#### Request Body

| Name     | Type  | Description |
| -------- | ----- | ----------- |
| user\_id | array | The user ID |

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

```
{
    "id": {user_id},
    "message": "Ok."
}
```

{% endtab %}
{% endtabs %}

* 'board*user' 테이블에서 board*id와 user\_id가 일치하는 항목 삭

## \[Progress]Get a progress list

<mark style="color:blue;">`GET`</mark> `/boards/:board_id/progress`

#### Path Parameters

| Name      | Type    | Description       |
| --------- | ------- | ----------------- |
| board\_id | integer | The project's ID. |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| authorization | string | Access token. |

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

```
{
    data: { progressList : {
        {
          1 : { // key = progress_id
            id : 1, // <ProgressList /> name 세팅을 위해서 
            title : '안녕',
            task_priority : '1,2'
          },
          2 : {
            id : 2,
            title : 'progress 2',
            task_priority : '3', //'3,4'
          },
        }
    },
    message: "ok"
}
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}

{% tab title="404 " %}

```
{ "message": "Not Found." }
```

{% endtab %}
{% endtabs %}

* task\_id를 key로 따로 가지는 value를 객체 형태로 task 모두 담아줄 것.

(progress GET 도 똑같이)

## \[Progress]Create new progress

<mark style="color:green;">`POST`</mark> `/boards/:board_id/progress`

#### Path Parameters

| Name      | Type    | Description       |
| --------- | ------- | ----------------- |
| board\_id | integer | The project's ID. |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| authorization | string | Access token. |

#### Request Body

| Name  | Type   | Description           |
| ----- | ------ | --------------------- |
| title | string | The progress's title. |

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

```
{
    "id": {progress_id},
    "message": "ok"
}
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}
{% endtabs %}

* title: 'progresses' 테이블에 추가
* pr&#x67;*\_*&#x70;riority -> 'boards' 테이블에서 id가 board\_id인 항목에서 string으로 된 리스트 끝에 새 progress\_id 추가.
  * 해당 progress\_id 리턴해주기.
* task\_priority 디폴트: '' (빈 문자열)

## \[Progress]Modify the progress title.

<mark style="color:purple;">`PATCH`</mark> `/boards/:board_id/progress/:progress_id`

#### Path Parameters

| Name         | Type    | Description        |
| ------------ | ------- | ------------------ |
| progress\_id | integer | The progress's ID. |
| board\_id    | integer | The project's ID.  |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| authorization | string | Access token. |

#### Request Body

| Name  | Type   | Description           |
| ----- | ------ | --------------------- |
| title | string | The progress's title. |

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

```
{ "message": "Ok." }
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}
{% endtabs %}

## \[Progress]Modify the progress order

<mark style="color:purple;">`PATCH`</mark> `/boards/:board_id/progress`

#### Path Parameters

| Name      | Type    | Description       |
| --------- | ------- | ----------------- |
| board\_id | integer | The project's ID. |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| authorization | string | Access token. |

#### Request Body

| Name          | Type   | Description    |
| ------------- | ------ | -------------- |
| prg\_priority | string | Progress order |

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

```
{ "message": "Ok." }
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}
{% endtabs %}

* 'boards' table에서 prg\_priority 수정.

## \[Progress]Delete the progress

<mark style="color:red;">`DELETE`</mark> `/boards/:board_id/progress/progress_id`

#### Path Parameters

| Name         | Type    | Description        |
| ------------ | ------- | ------------------ |
| progress\_id | integer | The progress's ID. |
| board\_id    | integer | The project's ID.  |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| authorization | string | Access token. |

#### Request Body

| Name          | Type   | Description    |
| ------------- | ------ | -------------- |
| prg\_priority | string | Progress order |

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

```
{
    "id": {progress_id},
    "message": "ok"
}
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}
{% endtabs %}

* 'board' 테이블 prg\_priority 수정
* 'task' 테이블에서 해당 progress\_id인 항목 모두 삭제.
* 'progresses' 테이블에서 해당 id 삭제.

## \[Task]Get a task list

<mark style="color:blue;">`GET`</mark> `/boards/:board_id/tasks`

#### Path Parameters

| Name      | Type    | Description       |
| --------- | ------- | ----------------- |
| board\_id | integer | The project's ID. |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| authorization | string | Access token. |

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

```
{
    data: {
        taskList : {
            1: {
                id : 1,
                title : 'task card 1',
                description: '내용입니다'
            },
            2: {
              id : 2,
              title : 'task card 2',
              description: '내용입니다'
            },
            3: {
              id : 3,
              title : 'task card 3',
              description: '내용입니다'
            },
            4: {
              id : 4,
              title : 'task card 4',
              description: '내용입니다'
              }
          }
    },
    message: "Ok"
}
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}
{% endtabs %}

* task\_id를 key로 따로 가지는 value를 객체 형태로 task 모두 담아줄 것.

(progress GET 도 똑같이)

## \[Task]Create new task

<mark style="color:green;">`POST`</mark> `/boards/:board_id/progress/:progress_id/tasks`

#### Path Parameters

| Name         | Type    | Description        |
| ------------ | ------- | ------------------ |
| progress\_id | string  | The progress's ID. |
| board\_id    | integer | The project's ID.  |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| authorization | string | Access token. |

#### Request Body

| Name           | Type   | Description                |
| -------------- | ------ | -------------------------- |
| task\_priority | string | The progress's task order. |
| description    | string | The task description.      |
| title          | string | The task title.            |

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

```
{
    "id": {task_id},
    "message": "ok"
}
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}
{% endtabs %}

* progress\_*id 받아서 task 테이블에 새로 생성한 후, progresses table 의 해당 progress\_*&#x69;d의 task*priority 칼럼에 있는 문자열 끝에 task\_id add.*

## \[Task]Modify the task

<mark style="color:purple;">`PATCH`</mark> `/boards/:board_id/tasks/:task_id`

#### Path Parameters

| Name      | Type    | Description       |
| --------- | ------- | ----------------- |
| task\_id  | integer | The task's ID.    |
| board\_id | integer | The project's ID. |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| authorization | string | Access token. |

#### Request Body

| Name        | Type   | Description           |
| ----------- | ------ | --------------------- |
| description | string | The task description. |
| title       | string | The task title.       |

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

```
{ "message": "Ok." }
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}
{% endtabs %}

## \[Task]Delete the task

<mark style="color:red;">`DELETE`</mark> `/boards/:board_id/progress/:progress_id/tasks/:task_id`

#### Path Parameters

| Name         | Type    | Description        |
| ------------ | ------- | ------------------ |
| progress\_id | string  | The progress's ID. |
| task\_id     | string  | The task's ID.     |
| board\_id    | integer | The project's ID.  |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| authorization | string | Access token. |

#### Request Body

| Name           | Type   | Description |
| -------------- | ------ | ----------- |
| task\_priority | string | Task order. |

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

```
{
    "id": {task_id},
    "message": "ok"
}
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}
{% endtabs %}

* progresses 테이블에서 task\_priority에 들어있는 task\_id 삭제.
* tasks 테이블에서 해당 항목 삭제.

## \[Task]Change the task's order in one progress

<mark style="color:purple;">`PATCH`</mark> `/boards/:board_id/progress/:progress_id/tasks/:task_id/vertical`

#### Path Parameters

| Name         | Type    | Description        |
| ------------ | ------- | ------------------ |
| progress\_id | string  | The progress's ID. |
| task\_id     | string  | The task's ID.     |
| board\_id    | integer | The project's ID.  |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| authorization | string | Access token. |

#### Request Body

| Name           | Type   | Description |
| -------------- | ------ | ----------- |
| task\_priority | string | Task order. |

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

```
{ "message": "Ok." }
```

{% endtab %}

{% tab title="403 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}
{% endtabs %}

## \[Task]Change the task's order in two progresses

<mark style="color:purple;">`PATCH`</mark> `/boards/:board_id/progress/:progress_id/tasks/:task_id/horizontal`

#### Path Parameters

| Name         | Type    | Description                 |
| ------------ | ------- | --------------------------- |
| progress\_id | string  | The previous progress's ID. |
| task\_id     | string  | The task's ID.              |
| board\_id    | integer | The project's ID.           |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| authorization | string | Access token. |

#### Request Body

| Name   | Type   | Description             |
| ------ | ------ | ----------------------- |
| target | object | prg\_id, task\_priority |
| source | object | prg\_id, task\_priority |

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

```
{ "message": "Ok." }
```

{% endtab %}

{% tab title="302 " %}

```
{ "message": "Invalid access token." }
```

{% endtab %}
{% endtabs %}

* Path parameters의 progress\_id는 출발하는 progress의 ID
* source, target은 prg\_id와 *task\_*&#x70;riority 담겨 있다.
