Attachments

POST /attachments/:uid

Endpoint

PUT /api/v2/attachments/:uid

Parameters

Name Description type
uid required File uid string
attachment[kind] Kind string
attachment[metadata] Metadata string
attachment[publicly_downloadable] Publicly downloadable boolean
attachment[publicly_visible] Publicly visible boolean

Request

Route

PUT /api/v2/attachments/Km9aTqhV

Headers

Accept: application/json
Content-Type: application/json
Access-Token: f39a7d9ccc839c9bac7d4b19b14f24e5f2efb33ebaa08cf64944f363d51ce547$$TPR3gaaV9eqm4xOPy12HMbYYjF2hC5Y1C1LrXvokp4h9lt6PmZZDbNySeg==--fWh3JveA8bILmRyi--9CBE3SjzIQEWaN39WGG/nA==
Api-Key: 123abc

Body

{
  "attachment": {
    "kind": "identifier",
    "metadata": {
      "foo": "bar"
    },
    "publicly_downloadable": true,
    "publicly_visible": true
  }
}

Response

Status

200

Headers

Content-Type: application/json; charset=utf-8

Body

{
  "success": true,
  "attachment": {
    "kind": "identifier",
    "publicly_downloadable": true,
    "publicly_visible": true,
    "metadata": {
      "foo": "bar"
    },
    "created_at": "2019-03-22T22:35:53.897Z",
    "updated_at": "2019-03-22T22:35:54.137Z",
    "uid": "Km9aTqhV",
    "scan_uid": "psP86ogX",
    "file_key": "T3QZg17zDerUeniiYPKbDwkK",
    "file_url": "http://localhost:3002/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBaGdCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--9bc138c9bc4d7bd2c67f0a485edcf8c54490ff89/test.json",
    "thumbnail_key": "XuD8jzjAAjCm5fQ4jLwWvdzj",
    "thumbnail_url": "http://localhost:3002/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBaGNCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--4e06ad01e97a9326ea5b62d424ebdab44e4a1381/test.json",
    "annotation_type_list": [

    ],
    "team_uid": "WBkQyCyy",
    "collection_uid": null
  }
}