Skip to content

Commit

Permalink
where to find last modif date? (#1623)
Browse files Browse the repository at this point in the history
* where to find last modif date?

* taking an example of an ontology with a last modification date

* prefered way to get the last modification date

Co-authored-by: Benjamin Geer <benjaminlewis.geer@unibas.ch>
  • Loading branch information
loicjaouen and Benjamin Geer committed Mar 10, 2020
1 parent 491d87f commit 933127b
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions docs/src/paradox/03-apis/api-v2/ontology-information.md
Expand Up @@ -91,6 +91,14 @@ The response is in the complex API v2 schema. Sample response:
"@id" : "http://www.knora.org/ontology/knora-base#SystemProject"
},
"rdfs:label" : "The standoff ontology"
}, {
"@id": "http://knora.unil.ch/ontology/0001/anything/v2",
"@type": "owl:Ontology",
"knora-api:attachedToProject": {
"@id": "http://rdfh.ch/projects/0001"
},
"knora-api:lastModificationDate": "2017-12-19T15:23:42.166Z",
"rdfs:label": "The anything ontology"
} ],
"@context" : {
"knora-api" : "http://api.knora.org/ontology/knora-api/v2#",
Expand All @@ -109,17 +117,18 @@ HTTP GET to http://host/v2/ontologies/metadata/PROJECT_IRI[/PROJECT_IRI...]

The project IRIs must be URL-encoded.

Example response for the `images` test project
(project IRI `http://rdfh.ch/projects/00FF`):
Example response for the `anything` test project
(project IRI `http://rdfh.ch/projects/0001`):

```jsonld
{
"@id" : "http://0.0.0.0:3333/ontology/00FF/images/v2",
"@id" : "http://0.0.0.0:3333/ontology/0001/anything/v2",
"@type" : "owl:Ontology",
"knora-api:attachedToProject" : {
"@id" : "http://rdfh.ch/projects/00FF"
"@id" : "http://rdfh.ch/projects/0001"
},
"rdfs:label" : "The images demo ontology",
"knora-api:lastModificationDate": "2017-12-19T15:23:42.166Z",
"rdfs:label" : "The anything ontology",
"@context" : {
"knora-api" : "http://api.knora.org/ontology/knora-api/v2#",
"rdfs" : "http://www.w3.org/2000/01/rdf-schema#",
Expand Down Expand Up @@ -906,7 +915,8 @@ order:

When changing an existing ontology, the client must always supply the
ontology's `knora-api:lastModificationDate`, which is returned in the
response to each update. If user A attempts to update an ontology, but
response to each update or when [querying the ontology](#querying-an-ontology).
If user A attempts to update an ontology, but
user B has already updated it since the last time user A received the
ontology's `knora-api:lastModificationDate`, user A's update will be
rejected with an HTTP 409 Conflict error. This means that it is possible
Expand Down

0 comments on commit 933127b

Please sign in to comment.