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

Headers

Accept: application/json
Content-Type: application/json
Access-Token: 3ed97f2cf3004c1bf290ba1e63054272ab3df9a6c272d8a9696156ff1abae126$$11qqOIDYqVKToWY16vSYIy/zoCf0PXg/9gyDCDtZn854OqsCxIWt+b3i/Q==--OSoL/twryaGGrYFA--HgxKbpBZAIs+sywRWU+LUw==
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-06-18T22:04:28.760Z",
    "updated_at": "2019-06-18T22:04:28.965Z",
    "uid": "B2eNKXhR",
    "scan_uid": "CFWFJCSg",
    "file_key": "PFa8NE2EtiZiF8XCeR3Yz1Bi",
    "file_url": "http://localhost:3002/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBhQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--537144089f366b94309505620add388886b55cd2/test.json",
    "thumbnail_key": "NymReZLjrxMZW9gYpvsF5Rsj",
    "thumbnail_url": "http://localhost:3002/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBadz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--a6cc724bfff71d11458b7c000ce6b4ca9fac872f/test.json",
    "annotation_type_list": [

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