Delete Activity
Opened this issue · 0 comments
The Delete
activity is used to delete an already existing object
. The side effect of this is that the server MAY replace the object with a Tombstone
of the object
that will be displayed in activities which reference the deleted object
. If the deleted object is requested the server SHOULD respond with either the HTTP 410 Gone status code if a Tombstone
object is presented as the response body, otherwise respond with a HTTP 404 Not Found.
Delete Activity - Reference
Indicates that the actor
has deleted the object
. If specified, the origin
indicates the context from which the object
was deleted.
Example Delete Activity 1
{
"@context": "https://www.w3.org/ns/activitystreams",
"summary": "Sally deleted a note",
"type": "Delete",
"actor": {
"type": "Person",
"name": "Sally"
},
"object": "http://example.org/notes/1",
"origin": {
"type": "Collection",
"name": "Sally's Notes"
}
}
Tombstone Object - Reference
A Tombstone
represents a content object that has been deleted. It can be used in Collections
to signify that there used to be an object at this position, but it has been deleted.
Example Tombstone 1
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://example.com/~alice/note/72",
"type": "Tombstone",
"published": "2015-02-10T15:04:55Z",
"updated": "2015-02-10T15:04:55Z",
"deleted": "2015-02-10T15:04:55Z"
}
Example Tombstone 2
{
"type": "OrderedCollection",
"totalItems": 3,
"name": "Vacation photos 2016",
"orderedItems": [
{
"type": "Image",
"id": "http://image.example/1"
},
{
"type": "Tombstone",
"formerType": "Image",
"id": "http://image.example/2",
"deleted": "2016-03-17T00:00:00Z"
},
{
"type": "Image",
"id": "http://image.example/3"
}
]
}