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/fwAnr44y

Headers

Accept: application/json
Content-Type: application/json
Access-Token: 71bb634a68d91db71d45fccaebc3692a5cccdbe990233a0f3abfe8e0f567f0f0$$WCLGMXtWiAbHwdprGoARK6jFHjK+ETeIyn2wzRVT/1Q3ZSgD2PYJbnHzPQ==--C/Gbx/QoW5toHlCD--pZVSu90nPXBmqOGW4Pv3HQ==
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-08-05T22:48:26.583Z",
    "updated_at": "2019-08-05T22:48:26.797Z",
    "uid": "fwAnr44y",
    "scan_uid": "MobvR58U",
    "file_key": "T9gDU4bKWsXagSyys7hF4RCY",
    "file_url": "http://localhost:3002/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBcmdGIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--a76f481f9edf76cdbcdcd5285f605054a2666729/test.json",
    "thumbnail_key": "mLcLta3mMX6cCGpCjunMQ3E9",
    "thumbnail_url": "http://localhost:3002/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBcmNGIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ad7f437d7a7a4a4228086b14419c41536247ce9f/test.json",
    "annotation_type_list": [

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