Back to top

group

Resource Group

Issue

一覧
GET/issues

Example URI

GET /issues
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
    {
        id: 1,
        title: "Create Awesome Service",
        status: "open",
        comment_count: 1,
        assignee: {
            id: 1,
            name: "Akiko"
        },
        created_at: "2016-06-08T23:26:54.316+09:00",
        created: "約12時間前",
        updated_at: "2016-06-08T23:26:54.316+09:00",
        updated: "約12時間前",
        content: "Let's Rock!",
        comments: []
    }
]

作成
POST/issues

Example URI

POST /issues
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "title": "Create Awesome Service",
  "status": "open",
  "content": "Let's Rock!",
  "assignee_id": 1,
  "label_ids": [
    "[1",
    "2",
    "3]"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "title": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "content": {
      "type": "string"
    },
    "assignee_id": {
      "type": "number"
    },
    "label_ids": {
      "type": "array"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    id: 1,
    title: "Create Awesome Service",
    status: "open",
    comment_count: 1,
    content: "Let's Rock!",
    comments: [],
    labels: [
        { id: 1, name: "Good", color: #fff },
        { id: 2, name: "Nice", color: #ddd }
    ],
    assignee: {
        id: 1,
        name: "Akiko"
    },
    created_at: "2016-06-08T23:26:54.316+09:00",
    created: "約12時間前",
    updated_at: "2016-06-08T23:26:54.316+09:00",
    updated: "約12時間前"
}

Issue

更新
PUT/issues/{id}

Example URI

PUT /issues/id
URI Parameters
HideShow
id
integer (required) 
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "title": "Create Awesome Service",
  "status": "open",
  "content": "Let's Rock!",
  "assignee_id": 1,
  "label_ids": [
    "[1",
    "2]"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "title": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "content": {
      "type": "string"
    },
    "assignee_id": {
      "type": "number"
    },
    "label_ids": {
      "type": "array"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    id: 1,
    title: "Create Awesome Service",
    status: "open",
    comment_count: 1,
    content: "Let's Rock!",
    comments: [],
    labels: [
        { id: 1, name: "Good", color: #fff },
        { id: 2, name: "Nice", color: #ddd }
    ],
    assignee: {
        id: 1,
        name: "Akiko"
    },
    created_at: "2016-06-08T23:26:54.316+09:00",
    created: "約12時間前",
    updated_at: "2016-06-08T23:26:54.316+09:00",
    updated: "約12時間前"
}

削除
DELETE/issues/{id}

Example URI

DELETE /issues/id
URI Parameters
HideShow
id
integer (required) 
Response  200
HideShow
Headers
Content-Type: application/json

Comment

作成
POST/issues/{issue_id}/comments

Example URI

POST /issues/issue_id/comments
URI Parameters
HideShow
issue_id
integer (required) 
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "user_name": "Kawai",
  "content": "Good Issue"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "user_name": {
      "type": "string"
    },
    "content": {
      "type": "string"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    id: 1,
    user_name: "Kawai",
    content: "Good Issue",
    issue_id: 1,
    created_at: "2016-06-08T23:26:54.316+09:00",
    created: "約12時間前",
    updated_at: "2016-06-08T23:26:54.316+09:00",
    updated: "約12時間前"
}

Comment

作成
POST/issues/{issue_id}/comments/{comment_id}

Example URI

POST /issues/issue_id/comments/comment_id
URI Parameters
HideShow
issue_id
integer (required) 
comment_id
integer (required) 
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "user_name": "Kawai",
  "content": "Good Issue"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "user_name": {
      "type": "string"
    },
    "content": {
      "type": "string"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    id: 1,
    user_name: "Kawai",
    content: "Good Issue",
    issue_id: 1,
    created_at: "2016-06-08T23:26:54.316+09:00",
    created: "約12時間前",
    updated_at: "2016-06-08T23:26:54.316+09:00",
    updated: "約12時間前"
}

削除
DELETE/issues/{issue_id}/comments/{comment_id}

Example URI

DELETE /issues/issue_id/comments/comment_id
URI Parameters
HideShow
issue_id
integer (required) 
comment_id
integer (required) 
Response  200
HideShow
Headers
Content-Type: application/json

User

一覧
GET/users

Example URI

GET /users
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
    {
        id: 1,
        name: "Akiko"
    }
]

Label

一覧
GET/labels

Example URI

GET /labels
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
    { id: 1, name: "Good", color: #fff },
    { id: 2, name: "Nice", color: #ddd }
]

Generated by aglio on 09 Jun 2016