There is a need for an API to get a heritage item's annotations. The details are explained in REST API wiki page.
However, we should omit the votes field for now because it will be implemented later.
{
"heritageId": 1,
"votes": {
"http://example.org/anno11": {
"up": 9,
"down": 4,
"you": -1
},
"http://example.org/anno12": {
"up": 5,
"down": 7,
"you": 0
},
"http://example.org/anno13": {
"up": 9,
"down": 5,
"you": 1
}
},
"annotations": [
{
"@context": "http://www.w3.org/ns/anno.jsonld",
"id": "http://example.org/anno11",
"type": "Annotation",
"creator": "http://574heritago.com/users/25/",
"created": "2017-01-02T17:00:00Z",
"body": {
"type": "Text",
"value": "The gate was built in 1829.",
"format": "text/plain"
},
"target": {
"id": "http://574heritago.com/heritages/3#description",
"type": "Text",
"format": "text/plain",
"selector": {
"type": "substring",
"value": {
"starts": 10,
"length": 30
}
}
}
},
{
"@context": "http://www.w3.org/ns/anno.jsonld",
"id": "http://example.org/anno11",
"type": "Annotation",
"creator": "http://574heritago.com/users/25/",
"created": "2017-01-02T17:00:00Z",
"body": {
"type": "Image",
"format": "image/png",
"source": "http://574heritago.com/resources/images/2/"
},
"target": {
"id": "http://574heritago.com/heritages/3#description",
"type": "Text",
"format": "text/plain",
"selector": {
"type": "substring",
"value": {
"starts": 10,
"length": 30
}
}
}
},
{
"@context": "http://www.w3.org/ns/anno.jsonld",
"id": "http://example.org/anno11",
"type": "Annotation",
"creator": "http://574heritago.com/users/25/",
"created": "2017-01-02T17:00:00Z",
"body": {
"type": "Video",
"format": "audio/mpeg",
"source": "http://574heritago.com/resources/videos/2/"
},
"target": {
"id": "http://574heritago.com/heritages/3#description",
"type": "Text",
"format": "text/plain",
"selector": {
"type": "substring",
"value": {
"starts": 10,
"length": 30
}
}
}
},
{
"@context": "http://www.w3.org/ns/anno.jsonld",
"id": "http://example.org/anno11",
"type": "Annotation",
"creator": "http://574heritago.com/users/25/",
"created": "2017-01-02T17:00:00Z",
"body": {
"type": "Location",
"format": "text/plain",
"source": "http://map.com/?someselection"
},
"target": {
"id": "http://574heritago.com/heritages/3#description",
"type": "Text",
"format": "text/plain",
"selector": {
"type": "substring",
"value": {
"starts": 10,
"length": 30
}
}
}
},
{
"@context": "http://www.w3.org/ns/anno.jsonld",
"id": "http://example.org/anno11",
"type": "Annotation",
"creator": "http://574heritago.com/users/25/",
"created": "2017-01-02T17:00:00Z",
"body": {
"type": "Audio",
"format": "audio/mp3",
"source": "http://574heritago.com/resources/90/"
},
"target": {
"id": "http://574heritago.com/heritages/3#description",
"type": "Text",
"format": "text/plain",
"selector": {
"type": "substring",
"value": {
"starts": 10,
"length": 30
}
}
}
}
]
}