Supported Formats

json

GET /api/v1/:team/:note/attachments
List note attachments

Supported Formats

json

Examples

GET /api/v1/test/test_note/attachments
200
[

]
GET /api/v1/test/test_note/attachments
200
[
  {
    "id": 1,
    "note_id": 234,
    "user_id": 3,
    "file": null,
    "forked_id": null,
    "created_at": "2016-01-07T02:05:48.000Z",
    "updated_at": "2016-01-07T02:05:48.000Z",
    "managed": true,
    "html_url": "http://www.example.com/attachments/1",
    "filename": "blank.png",
    "note": {
      "id": 234,
      "is_private": false,
      "slug": "test_note",
      "title": "Test note",
      "created_at": "2016-01-07T02:05:43.000Z",
      "updated_at": "2016-01-07T02:05:48.000Z",
      "format": "html",
      "share": "none",
      "is_time_track": true,
      "name": "test_note",
      "team": {
        "id": 203,
        "name": "test",
        "is_default": true,
        "created_at": "2016-01-07T02:05:38.000Z",
        "updated_at": "2016-01-07T02:05:48.000Z",
        "html_url": "http://www.example.com/test",
        "avatar_url": "http://www.example.com/test/avatar",
        "role": "manager",
        "managers": [
          {
            "id": 3,
            "username": "test",
            "receive_email": true,
            "created_at": "2016-01-07T02:05:38.000Z",
            "updated_at": "2016-01-07T02:05:47.000Z",
            "keyboard_shortcuts": false,
            "options": {
              "advanced_menu": true
            },
            "html_url": "http://www.example.com/test",
            "avatar_url": "http://www.example.com/test/avatar",
            "lang": {
              "code": "en",
              "model": "lang"
            },
            "name": "test",
            "model": "user"
          }
        ],
        "members": [],
        "plan": "micro",
        "model": "team"
      },
      "html_url": "http://www.example.com/test/test_note",
      "avatar_url": "http://www.example.com/test/test_note/avatar",
      "can_pull": false,
      "can_request": false,
      "can_manage": true,
      "description_html": "<p></p>",
      "model": "note"
    },
    "extname": ".png"
  }
]

DELETE /api/v1/:team/:note/attachments/:id
Destroy

Supported Formats

json

Examples

DELETE /api/v1/test/test_note/attachments/2
204

POST /api/v1/:team/:note/attachments
Create

Supported Formats

json

Examples

POST /api/v1/test/test_note/attachments
Content-Type: multipart/form-data; boundary=APIPIE_RECORDER_EXAMPLE_BOUNDARY

--APIPIE_RECORDER_EXAMPLE_BOUNDARY
Content-Disposition: form-data; name="file"; filename="blank.png"
Content-Length: 2707
Content-Type: image/png
Content-Transfer-Encoding: binary

... contents of "file" ...
--APIPIE_RECORDER_EXAMPLE_BOUNDARY--
200
{
  "fileurl": "http://example.org/attachments/4",
  "filelink": "/attachments/4",
  "filename": "blank.png",
  "is_image": true
}

GET /api/v1/attachments/:id
Get a single attachment

Supported Formats

json

Examples

GET /api/v1/attachments/3.json
200
{
  "id": 3,
  "note_id": 256,
  "user_id": 3,
  "created_at": "2016-01-07T02:06:08.000Z",
  "updated_at": "2016-01-07T02:06:08.000Z",
  "managed": true,
  "html_url": "http://www.example.com/attachments/3",
  "filename": "blank.png",
  "note": {
    "id": 256,
    "is_private": false,
    "slug": "test_note",
    "title": "Test note",
    "created_at": "2016-01-07T02:06:04.000Z",
    "updated_at": "2016-01-07T02:06:08.000Z",
    "format": "html",
    "share": "none",
    "is_time_track": true,
    "name": "test_note",
    "team": {
      "id": 223,
      "name": "test",
      "is_default": true,
      "created_at": "2016-01-07T02:05:59.000Z",
      "updated_at": "2016-01-07T02:06:08.000Z",
      "html_url": "http://www.example.com/test",
      "avatar_url": "http://www.example.com/test/avatar",
      "role": "manager",
      "managers": [
        {
          "id": 3,
          "username": "test",
          "receive_email": true,
          "created_at": "2016-01-07T02:05:59.000Z",
          "updated_at": "2016-01-07T02:06:07.000Z",
          "keyboard_shortcuts": false,
          "options": {
            "advanced_menu": true
          },
          "html_url": "http://www.example.com/test",
          "avatar_url": "http://www.example.com/test/avatar",
          "lang": {
            "code": "en",
            "model": "lang"
          },
          "name": "test",
          "model": "user"
        }
      ],
      "members": [],
      "plan": "micro",
      "model": "team"
    },
    "html_url": "http://www.example.com/test/test_note",
    "avatar_url": "http://www.example.com/test/test_note/avatar",
    "can_pull": false,
    "can_request": false,
    "can_manage": true,
    "description_html": "<p></p>",
    "model": "note"
  },
  "extname": ".png",
  "model": "attachment"
}
GET /api/v1/attachments/3
200
�PNG


IHDR�gAMA���a cHRMz&�����u0�`:�p��Q<bKGD�����IDAT�c�����6%tEXtdate:create2016-01-07T11:06:09+09:00��?�%tEXtdate:modify2016-01-07T11:06:09+09:00���3IEND�B`�