Skip to main content

 

Documentation & User Guides | FotoWare

Annotations API

Introduction

Use the Annotations API to create integrations that create, update or delete annotations.

Methods

GET annotations

href: /fotoweb/archives/5001-News-archive/30/car.jpg.info.annotations/
method: GET
accept: [application/vnd.fotoware.annotation-list+json, application/json]

GET number of annotations

href: /fotoweb/archives/5001-News-archive/30/car.jpg.info.annotations/
method: GET
accept: application/vnd.fotoware.count+json

POST new annotation

href: /fotoweb/archives/5001-News-archive/30/car.jpg.info.annotations/
method: POST
content-type: application/vnd.fotoware.annotation+json

GET single annotation

href: /fotoweb/archives/5001-News-archive/30/car.jpg.info.annotations/<annotation-id>
method: GET
accept: [application/vnd.fotoware.annotation+json, application/json]

Update annotation

href: /fotoweb/archives/5001-News-archive/30/car.jpg.info.annotations/<annotation-id>
method: PATCH
content-type: application/vnd.fotoware.annotation+json

Delete annotation

href: /fotoweb/archives/5001-News-archive/30/car.jpg.info.annotations/<annotation-id>
method: DELETE

 

Representations

Rectangle and ellipse annotation GET representation

{
  href: "/fotoweb/archives/5001-News-archive/30/haha2_1.jpg.annotations/d099724333979f0600051f99c3a8c63814dbfc327182daed0c5c6aa0e2f5654b",
  fragmentHref: "#asset=/fotoweb/archives/5001-News-archive/30/haha2_1.jpg.info&annotation=/fotoweb/archives/5001-News-archive/30/haha2_1.jpg.annotations/d099724333979f0600051f99c3a8c63814dbfc327182daed0c5c6aa0e2f5654b",
  type: "rectangle" || "ellipse",
  text: "this is an annotation",
  color: "#ff00aa",
  allowUpdate: true,
  allowDelete: true,
  owner: {
    name: "Martin Gunnerud",
    avatarHref: "https://www.gravatar.com/ba2b64e29fdcbc449cbaffdd539b704c?d=mm"
  },
  props: {
    comments: {
      enabled: true,
      count: 0,
      href: "/fotoweb/archives/5001-News-archive/30/haha2_1.jpg.annotations/d099724333979f0600051f99c3a8c63814dbfc327182daed0c5c6aa0e2f5654b/.comments/"
    }
  },
  created: "2018-02-26T09:01:34.508000Z"
  modified: "2018-02-28T09:01:34.508000Z",
  left: 16.552643784786643,
  top: 13.358070500927644,
  width: 45.605287569573285,
  height: 38.775510204081634
}

 

Pin annotation GET representation

{
  href: "/fotoweb/archives/5001-News-archive/30/haha2_1.jpg.annotations/d099724333979f0600051f99c3a8c63814dbfc327182daed0c5c6aa0e2f5654b",
  fragmentHref: "#asset=/fotoweb/archives/5001-News-archive/30/haha2_1.jpg.info&annotation=/fotoweb/archives/5001-News-archive/30/haha2_1.jpg.annotations/d099724333979f0600051f99c3a8c63814dbfc327182daed0c5c6aa0e2f5654b",
  type: "pin",
  text: "this is an annotation",
  color: "#ff00aa",
  allowUpdate: true,
  allowDelete: true,
  owner: {
    name: "Martin Gunnerud",
    avatarHref: "https://www.gravatar.com/ba2b64e29fdcbc449cbaffdd539b704c?d=mm"
  },
  props: {
    comments: {
      enabled: true,
      count: 0,
      href: "/fotoweb/archives/5001-News-archive/30/haha2_1.jpg.annotations/d099724333979f0600051f99c3a8c63814dbfc327182daed0c5c6aa0e2f5654b/.comments/"
    }
  },
  created: "2018-02-26T09:01:34.508000Z"
  modified: "2018-02-28T09:01:34.508000Z",
  left: 16.552643784786643,
  top: 13.358070500927644
}

Polygon annotation GET representation

{
  href: "/fotoweb/archives/5001-News-archive/30/haha2_1.jpg.annotations/d099724333979f0600051f99c3a8c63814dbfc327182daed0c5c6aa0e2f5654b",
  fragmentHref: "#asset=/fotoweb/archives/5001-News-archive/30/haha2_1.jpg.info&annotation=/fotoweb/archives/5001-News-archive/30/haha2_1.jpg.annotations/d099724333979f0600051f99c3a8c63814dbfc327182daed0c5c6aa0e2f5654b",
  type: "polygon",
  text: "this is an annotation",
  color: "#ff00aa",
  allowUpdate: true,
  allowDelete: true,
  owner: {
    name: "Martin Gunnerud",
    avatarHref: "https://www.gravatar.com/ba2b64e29fdcbc449cbaffdd539b704c?d=mm"
  },
  props: {
    comments: {
      enabled: true,
      count: 0,
      href: "/fotoweb/archives/5001-News-archive/30/haha2_1.jpg.annotations/d099724333979f0600051f99c3a8c63814dbfc327182daed0c5c6aa0e2f5654b/.comments/"
    }
  },
  created: "2018-02-26T09:01:34.508000Z"
  modified: "2018-02-28T09:01:34.508000Z",
  coordinates:[
    {left: 18.1180426716141, top: 25.04638218923933},
    {left: 54.85273654916512, top: 11.50278293135436},
    {left: 73.32444341372913, top: 16.883116883116884},
    {left: 77.29012059369202, top: 47.49536178107606},
    {left: 56.000695732838594, top: 73.8404452690167},
    {left: 33.2502319109462, top: 62.894248608534326},
    {left: 39.19874768089054, top: 41.1873840445269},
    {left: 26.466836734693878, top: 45.82560296846011}
  ]
}

Arrow annotation GET representation

{
  href: "/fotoweb/archives/5001-News-archive/30/haha2_1.jpg.annotations/d099724333979f0600051f99c3a8c63814dbfc327182daed0c5c6aa0e2f5654b",
  fragmentHref: "#asset=/fotoweb/archives/5001-News-archive/30/haha2_1.jpg.info&annotation=/fotoweb/archives/5001-News-archive/30/haha2_1.jpg.annotations/d099724333979f0600051f99c3a8c63814dbfc327182daed0c5c6aa0e2f5654b",
  type: "arrow",
  text: "this is an arrow annotation",
  color: "#ff00aa",
  allowUpdate: true,
  allowDelete: true,
  owner: {
    name: "Martin Gunnerud",
    avatarHref: "https://www.gravatar.com/ba2b64e29fdcbc449cbaffdd539b704c?d=mm"
  },
  props: {
    comments: {
      enabled: true,
      count: 0,
      href: "/fotoweb/archives/5001-News-archive/30/haha2_1.jpg.annotations/d099724333979f0600051f99c3a8c63814dbfc327182daed0c5c6aa0e2f5654b/.comments/"
    }
  },
  created: "2018-02-26T09:01:34.508000Z"
  modified: "2018-02-28T09:01:34.508000Z",
  tailLeft: 16.552643784786643,
  tailTop: 13.358070500927644,
  headLeft: 56.000695732838594,
  headTop: 73.8404452690167,
}

POST/PATCH Data Payload

Rectangle and ellipse POST/PATCH data

{
  type: "rectangle" || "ellipse",  // (type is not included in PATCH request)
  text: "this is an annotation",
  color: "#ff00aa",
  left: 16.552643784786643,
  top: 13.358070500927644,
  width: 45.605287569573285,
  height: 38.775510204081634
}

Pin POST/PATCH Data

{
  type: "pin", // (type is not included in PATCH request)
  text: "this is an annotation",
  color: "#ff00aa",
  left: 16.552643784786643,
  top: 13.358070500927644
}

Polygon POST/PATCH Data

{
  type: "polygon", // (type is not included in PATCH request)
  text: "this is an annotation",
  color: "#ff00aa",
  coordinates:[
    {left: 18.1180426716141, top: 25.04638218923933},
    {left: 54.85273654916512, top: 11.50278293135436},
    {left: 73.32444341372913, top: 16.883116883116884},
    {left: 77.29012059369202, top: 47.49536178107606},
    {left: 56.000695732838594, top: 73.8404452690167},
    {left: 33.2502319109462, top: 62.894248608534326},
    {left: 39.19874768089054, top: 41.1873840445269},
    {left: 26.466836734693878, top: 45.82560296846011}
  ]
}

Arrow POST/PATCH Data

{
  type: "arrow",  // (type is not included in PATCH request)
  text: "this is an arrow annotation",
  color: "#ff00aa",
  tailLeft: 16.552643784786643,
  tailTop: 13.358070500927644,
  headLeft: 45.605287569573285,
  headTop: 38.775510204081634
}
  • Was this article helpful?