Skip to content

API Document

IdionKim edited this page Jun 10, 2020 · 5 revisions

Issue Tracker API

이슈 목록 화면 API

이슈 목록 화면

  • 오픈 상태의 이슈만 보여주는 게 기본 상태이다.
  • 제목, 마일스톤, 레이블, 이슈 번호, 이슈 작성 시간, 작성자, 담당자를 표시한다. 해당 값이 없으면 보여주지 않아도 된다.
    • 제목, 이슈 번호, 이슈 작성 시간, 작성자는 아마도 기본적으로 값이 들어갈 것 같습니다~

요청시 최초 요청 url: api/issues

요청에 query string으로 옵션을 줄 수 있다. 필터 옵션의 종류

?q=BE&is=open&author=ksundong

q는 아직 검색 안됨

option value
is open/close/NULL
author userId
label label title, label title, label title
milestone milestone title
assignee userId

응답:

{
  "issues": [
  {
    "issueNumber": 0,
    "opened": true,
    "title": "string",
    "author": {
      "id": 0,
      "userId": "ksundong",
      "profileImage": "http://~"
    },
    "labels": [
      {
        "id": 0,
        "title": "string",
        "color": "string",
      },
    ],
    "milestone": {
      "id": 0,
      "title": "string"
    },
    "assignees": [
      {
        "id": 0,
        "userId": "ksundong",
        "profileImage": "http://~"
      },
      {
        "id": 1,
        "userId": "haveagood",
        "profileImage": "http://~"
      }
    ],
    "createdAt": "string",
  },
    
  ]
}

Mock API응답:

Mock API 응답
{
  "issues": [
    {
      "issueNumber": 1,
      "title": "Test Issue",
      "createdAt": "2020-06-10 23:06:18",
      "updatedAt": "2020-06-10 23:06:18",
      "author": {
        "id": 1,
        "userId": "dion",
        "profileImage": "image1"
      },
      "labels": [
        {
          "id": 1,
          "title": "BE",
          "color": "#FFFFFF"
        }
      ],
      "mileStone": {
        "id": 1,
        "title": "Phase1"
      },
      "assignees": [
        {
          "id": 1,
          "userId": "dion",
          "profileImage": "image1"
        },
        {
          "id": 2,
          "userId": "alex",
          "profileImage": "image2"
        }
      ],
      "opened": true
    },
    {
      "issueNumber": 3,
      "title": "Test Issue3",
      "createdAt": "2020-06-10 23:06:18",
      "updatedAt": "2020-06-10 23:06:18",
      "author": {
        "id": 2,
        "userId": "alex",
        "profileImage": "image2"
      },
      "labels": [
        {
          "id": 1,
          "title": "BE",
          "color": "#FFFFFF"
        },
        {
          "id": 2,
          "title": "FE",
          "color": "#000000"
        }
      ],
      "mileStone": {
        "id": 1,
        "title": "Phase1"
      },
      "assignees": [
        {
          "id": 1,
          "userId": "dion",
          "profileImage": "image1"
        },
        {
          "id": 2,
          "userId": "alex",
          "profileImage": "image2"
        }
      ],
      "opened": true
    }
  ]
}
Clone this wiki locally