
eu.fbk.knowledgestore.server.http.jaxrs.package-info Maven / Gradle / Ivy
Show all versions of ks-server-http Show documentation
/**
* KnowledgeStore Web API.
*
* The KnowledgeStore Web API provides access to the operation of the KnowledgeStore using a
* (almost-) REST interface. Below, general information about the API (supported MIME types,
* common HTTP status codes and response headers) are reported, followed by the list of REST
* resources exposed by the API which link to supported operations.
*
*
* TODO: WORK IN PROGRESS, PROVIDE BETTER OVERVIEW AND LINK TO ADDITIONAL DOCUMENTATION
*
* Supported MIME types
*
* RDF is used for the description of resources, mentions, entities and axioms. The RDF MIME types
* in the following table are supported:
*
*
*
* MIME type
* Format
* Comments
*
*
* application/ld+json
* JSONLD
* preferred MIME type
*
*
* application/rdf+xml
* RDF/XML
*
*
*
* text/turtle
* Turtle
*
*
*
* text/n3
* N3
* the Turtle subset is actually used
*
*
* application/n-triples
* N-Triples
*
*
*
* text/x-nquads
* N-Quads
*
*
*
* application/x-trig
* TriG
*
*
*
* application/trix
* TriX
* non standard, discouraged
*
*
* application/x-binary-rdf
* Sesame binary RDF
* format
* non standard, discouraged
*
*
* application/rdf+json
* RDF+JSON
* discouraged by W3C in favour of JSONLD
*
*
*
* DESCRIBE and CONSTRUCT operations submitted to the KnowledgeStore SPARQL endpoint returns RDF
* data (see above), while SELECT and ASK queries return tabular data using one of the following
* MIME types:
*
*
*
* MIME type
* Format
* Comments
*
*
* application/sparql-results+json
* SPARQL JSON query
* results Format
* preferred MIME type
*
*
* application/sparql-results+xml
* SPARQL XML query results
*
*
*
* text/csv
* SPARQL CSV
* query results
*
*
*
* text/tab-separated-values
* SPARQL TSV
* query results
*
*
*
*
* The MIME types of resource files is not fixed. It is the responsibility of the client to
* specify the correct MIME type when uploading a file, which is then returned when downloading
* it.
*
* Common status codes
*
* The following HTTP status codes are common to all the API operation. Therefore, they are
* documented here rather than being reported for each specific operation:
*
*
*
* HTTP Status Code
* Description
*
*
* 302 Found
* returned when accessing a secured URL via HTTP, redirecting to the corresponding HTTPS URL
* (see Location header); note that request to the HTTPS URL should include valid user credentials
* using the Authorization header (HTTP basic authentication is used)
*
*
* 304 Not Modified
* returned in case of read requests (HTTP GET) when headers If-Modified-Since or
* If-None-Match are specified and requested data has not been modified since the supplied
* timestamp / ETag, meaning that previously cached copies of the data can be used
*
*
* 400 Bad Request
* returned if the request is not valid, e.g., because a supplied query parameter, request
* header or the request body are not valid (specific constraints are listed for each API
* resource)
*
*
* 401 Unauthorized
* returned if the client didn't authenticated itself and the requested operation has been
* configured to require client authentication and authorization; this error can be avoided by
* submitting the request over HTTPS including an appropriate Authorization header (HTTP basic
* authentication is used)
*
*
* 403 Forbidden
* returned if the client authenticated itself but has not enough privileges to perform the
* requested operation; to avoid this error, either use privileged credentials or ask the server
* administration the grant of required privileges
*
*
* 406 Not Acceptable
* returned if the server cannot return a response body (e.g., query response) in any of the
* formats specified by the client in the request Accept header
*
*
* 412 Precondition Failed
* returned for conditioanl read requests (GET method) using the If-Match and
* If-Unmodified-Since headers and conditional write requests (PUT, POST, DELETE methods) using
* headers If-Match, If-None-Match, If-Modified-Since, If-Unmodified-Since, in case client
* preconditions are not met
*
*
* 500 Server Error
* returned in case of unexpected server error
*
*
* Common response headers
*
* The following HTTP response headers are common to all the API operation and are thus documented
* here:
*
*
*
* Name
* Description
*
*
* Content-Type
* always included in case an HTTP entity is returned in the response; it specifies the MIME
* type of the returned entity
*
*
* Content-Length
* included only when the response length can be determined in advance (i.e., the length is
* lower than the configured buffer size); this header may be omitted in case the response is
* streamed to the client meanwhile the corresponding retrieval / modification operation is being
* performed on the server
*
*
* Cache-control
* HTTP cache control directive either allowing or preventing caching of a response by
* intermediate caches. The value depends on the type of operation (retrievals are cached,
* modifications no), on whether the requested URL is secured (caching is private to the
* authenticated user) and on whether caching was allowed by the client in the request
* Cache-Control header. In general, whenever caching is authorized, cache revalidation is always
* required
*
*
* ETag
* always included if an HTTP entity is returned in the response; it allows cache revalidation
* and conditional GET requests from clients / intermediate (caching) proxies
*
*
* Last-Modified
* always included if an HTTP entity is returned in the response; it also allows cache
* revalidation and conditional GET requests from clients / intermediate (caching) proxies
*
*
*/
@javax.annotation.ParametersAreNonnullByDefault
package eu.fbk.knowledgestore.server.http.jaxrs;