Skip to content


Browse files Browse the repository at this point in the history
docs(api-v2): Document what happens when a resource has a link to a d…
…eleted resource (#1685)

Co-authored-by: Sepideh Alassi <>
  • Loading branch information
Benjamin Geer and SepidehAlassi committed Aug 10, 2020
1 parent 55f29f6 commit 1c88651
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions docs/03-apis/api-v2/
Expand Up @@ -187,7 +187,7 @@ In addition to the creation date, in the body of the request, it is possible to
the `@id` attribute which will then be assigned to the resource; otherwise the resource will get a unique random IRI.
Similarly, it is possible to assign a custom IRI to the values using their `@id` attributes; if not given, random IRIs
will be assigned to the values. An optional custom UUID of a value can also be given by adding `knora-api:valueHasUUID`.
Each custom UUID must be [base64url-encoded](rfc:4648#section-5), without padding. Each value of the new resource
Each custom UUID must be [base64url-encoded](, without padding. Each value of the new resource
can also have a custom creation date specified by adding `knora-api:creationDate`
(an [xsd:dateTimeStamp](
For example:
Expand Down Expand Up @@ -224,7 +224,7 @@ For example:

The response is a JSON-LD document containing a
of the resource.

## Modifying a Resource's Values
Expand Down Expand Up @@ -333,6 +333,21 @@ resource, explaining why it has been marked as deleted.
The response is a JSON-LD document containing the predicate `knora-api:result`
with a confirmation message.

### Links to Deleted Resources

If resource `A` has a link to resource `B`, and resource
`B` is later marked as deleted, `A`'s link will still exist. Knora API
v2 will still return the link when `A` is queried, but without any information
about `B` (except for `B`'s IRI). If `A`'s link is necessary to
meet the requirements of a cardinality, marking `B` as deleted will
not violate the cardinality.

The reason for this design is that `A` and `B` might be in
different projects, and each project must retain control of its resources
and be able to mark them as deleted, even if they are used by another
project. In future, Knora may be able to notify the owner of `A` in this

## Erasing a Resource from the Triplestore

Normally, resources are not actually removed from the triplestore; they are
Expand Down

0 comments on commit 1c88651

Please sign in to comment.