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

Headers

Accept: application/json
Content-Type: application/json
Access-Token: 033dbf44796f75342283bb2922a6df12b457cec1e43f50f17edec1d4e2233e36$$NDGtc6s+ayH48rrN7MbRrA58gjJTic9OR7141bnbOrQurgtH0u40D4eehg==--MNPfENCmnGs6PVbn--HinM4WgGgogdrSbAx3vUTA==
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": "2020-06-01T21:44:42.629Z",
    "updated_at": "2020-06-01T21:44:42.748Z",
    "uid": "bLwpMZhw",
    "scan_uid": "vS8YRdfY",
    "file_key": "ZvzhJKi8MrzsJsW7wmTTFDDP",
    "file_url": "http://localhost:3002/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBcUVCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--16163fa6ad1507905587b0e269c764baad4ca231/test.json",
    "thumbnail_key": "unS3gXRZMxrNZU6v1YTvGwBZ",
    "thumbnail_url": "http://localhost:3002/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBcUFCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--a5092f88f36e9b7701b94ca10fbd6ca97f558f03/test.json",
    "annotation_type_list": [

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