SKOS Repository REST http API
This page will contain a proposed specification for a REST API to access a SKOS repository.
This is work in progress for discussion!
The goal is to propose a simplified access to SKOS/RDF (or JSON) resources:
- HTTP methods (GET, POST, PUT, DELETE) would indicate the action desired;
- URL would identify the resources desired by their identification or a path to reach them (search and/or navigation within relations);
- Results would simply be SKOS/RDF (or JSON) triples.
- Identification would be the suffix part in the URL specific to the Concept or ConceptScheme when removing the application namespace URL.
- Don't understand: isn't identification the whole URI? RDF namespaces don't really exist.
Additional Proposal:
- Results are normally the exact objects corresponding to the request with all their RDF triples (not the objects they contain or the objects related).
- A "follow" parameter could be added to list also (but only once in a given result) the RDF triples linked with specified attributes.
- A "depth" parameter could indicate how recursive this process goes.
- A "lang" parameter could indicate "all" (default), "nego" for http header negociation, "x,y,z" to specify a preference order
Examples:
Method | URL | Usage |
---|---|---|
GET | http://domain.org/application/skosrest/ConceptScheme | List SKOS ConceptSchemes available |
GET | http://domain.org/application/skosrest/ConceptScheme/ISO639 | List ConceptScheme ISO639 |
GET | http://domain.org/application/skosrest/ConceptScheme/ISO639/hasTopConcept | List Top Concepts of ConceptScheme ISO639 |
GET | http://domain.org/application/skosrest/ConceptScheme/ISO639/hasTopConcept?follow=narrower&depth=24 | List Concepts of ConceptScheme ISO639 in a hierarchy with a maximal depth of 24. |
GET | http://domain.org/application/skosrest/ConceptScheme/ISO639/hasConcept | List Concepts of ConceptScheme ISO639 |
GET | http://domain.org/application/skosrest/ConceptScheme/ISO639/hasConcept?label=*ish | List Concepts of ConceptScheme ISO639 with a label (prefLabel, altLabel or hiddenLabel) ending with "ish" |
GET | http://domain.org/application/skosrest/ConceptScheme/ISO639/hasConcept?label=Flemish&follow=narrower&depth=5 | List Concepts of ConceptScheme ISO639 with a label (prefLabel, altLabel or hiddenLabel) "Flemish" and narrower Concepts with a maximum depth of 5. (or perhaps this should be a two-step - get the URI first, then get the narrower concepts) |
GET | http://domain.org/application/skosrest/Concept/ISO639_en?lang=fr | List SKOS Concept for language "en" keeping only labels in French. |
GET | http://domain.org/application/skosrest/Concept/ISO639_en?follow=narrower&depth=5 | List SKOS Concept for language "en" and narrower Concepts with a maximum depth of 5. |
GET | http://domain.org/application/skosrest/Concept/ISO639_en/relatedMatch | List SKOS Concept, from "matched" ConceptSchemes, related to language "en" |
DELETE | http://domain.org/application/skosrest/Concept/ISO639_en | Delete SKOS Concept for language "en" |
POST | http://domain.org/application/skosrest/ConceptScheme/ISO639 | Replace ConceptScheme by SKOS/RDF or SKOS/JSON posted |