Description

The method sortcriteria of search returns the available sort criteria and the default criterion of the search result sets. This method provides response data only as application/json. It is a read-only service and must be accessed with a HTTP-GET-request.
GET /search/sortcriteria HTTP/1.1

Request Header

NameValue(s)RequiredRepeatableDefault valueDescription
Acceptapplication/json
application/xml
*/*
yesnoapplication/jsonSpecifies the format of the accepted data. Every request needs to be sent with a valid Accept Header defining the requested response format. Otherwise the response to the request will be a 406 - Not acceptable status code. If the request accepts every kind of data (Accept: */*) JSON will be returned.
AuthorizationOAuth oauth_consumer_key="<API key>"yesnoAn API key is mandatory for data access. You may enclose it by either sending it as Query Parameter or (as mentioned here) in the Request Header.
Hostapi.deutsche-digitale-bibliothek.deyesnoThe host is mandatory.

Back To Top

Parameters

Query

ParameterValue(s)RequiredRepeatableDefault valueDescription
oauth_consumer_key<API key>yesnoAn API key is mandatory for data access. You may enclose it by either sending it as Query Parameter or (as mentioned here) in the Request Header.

Back To Top

Authorization

This method needs an API key for authentication (Who are you?) and authorization (What you are authorized to do?). For more information please read the Authorization How-To.

This method is offered over HTTP and HTTP Secure.

Back To Top

Errors

CodeTextDescription
404Not FoundEither the item does not exist or has no data.
406Not AcceptableThe Request Header is not acceptable. Please see section Request Header.
500Server ErrorSomething went terribly wrong. An error message will provide a meaningful description.

Back To Top

Samples

Request 1

GET /search/sortcriteria?oauth_consumer_key=abcdefgh12345678 HTTP/1.1
Host: api.deutsche-digitale-bibliothek.de
Accept: application/jason

Response

{
    "default": "RELEVANCE",
    "criteria":
    [
        "RELEVANCE",
        "ALPHA_ASC",
        "ALPHA_DESC",
        "COUNT_ASC",
        "COUNT_DESC"
    ]
}

 

Request 2

GET /search/sortcriteria HTTP/1.1
Host: api.deutsche-digitale-bibliothek.de
Accept: */*
Authorization: OAuth oauth_consumer_key="abcdefgh12345678"

Response

{
    "default": "RELEVANCE",
    "criteria":
    [
        "RELEVANCE",
        "ALPHA_ASC",
        "ALPHA_DESC",
        "COUNT_ASC",
        "COUNT_DESC"
    ]
}

Back To Top