Skip to main content

Items

CRUD Operations

CRUD operations for items.

Create a single item

PUT /api/item?collection=…
  • collection, URI of the collection
  • and a body with RDF data as JSON

Creates a single item and returns its URI.

Read a single item

GET /api/item?collection=…&item=…
  • collection, URI of the collection
  • item, URI of the item

Returns item URI RDF data in JSON format.

Update a single item

POST /api/item?collection=…&item=…
  • collection, URI of the collection
  • item, URI of the item
  • and a body with RDF data as JSON

Updates a single item. Nothing is returned.

Delete a single item

DELETE /api/item?collection=…&item=…
  • collection, URI of the collection
  • item, URI of the item

Download files

Download operations for items.

Download an item as a turtle file

GET /api/item.ttl?collection=…&item=…

Download an item as an RDF XML file

GET /api/item.rdf?collection=…&item=…

Download an item as an N-Triples file

GET /api/item.nt?collection=…&item=…

Download an item as a Notation3 file

GET /api/item.n3?collection=…&item=…

Download an item as a JSON-LD file

GET /api/item.jsonld?collection=…&item=…

Initialise RDF triples with some extra data

POST /api/item/initialize?collection=…&uri=…
  • collection, URI of the collection
  • uri, a list of URIs to initialize; the URIs are in the RDF data in the body
  • and a body with RDF data as JSON

Returns RDF data in JSON format with extra data. The defaults are usually set for the current collection. SPARQL queries are used to add the actual data.

Calculate hashcode of RDF data

GET /api/item/hash?collection=…
  • collection, URI of the collection
  • and a body with RDF data as JSON

Returns a predictable hashcode for the RDF data. This is achieved by sorting the triples first.