Department

Departments correlate to the sections of our homepage and to those of the printed issues. There are top level departments and sub-departments. Both are accessible via this endpoint. Sub-departments have a link to their parent attached to them. The query expects an astisk for wildcards and whitespaces.

Endpoint

http://api.zeit.de/department

Parameter

q* the main search query
fieldsuri,value,parent,href partially select output fields
limit10 limit the amount of matches to return
offset0 offset for the list of matches

Example

Request

GET /department?q=*lorem*&limit=1 HTTP/1.1
Host: http://api.zeit.de
X-Authorization: abcdefg1234xyz56789

Response

{
    "matches": [
        {
            "href": "http://www.zeit.de/dolorem/index",
            "uri": "http://127.0.0.1:5000/api/department/dolorem",
            "value": "Dolorem"
        }
    ],
    "found": 3,
    "limit": 1,
    "offset": 0
}

Get department by ID

This endpoint provides a pre-filtered search for all articles belonging to a specific department. Deeper queries, pagination and partial field selection can be used to narrow down the match list.

Endpoint

http://api.zeit.de/department/{id}

Parameter

q*:* the main search query
fields* partially select output fields
limit10 limit the amount of matches to return
offset0 offset for the list of matches

Example

Request

GET /department/lorem-ipsum?limit=1 HTTP/1.1
Host: http://api.zeit.de
X-Authorization: abcdefg1234xyz56789

Response

{
  "matches": [
    {
      "subtitle": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
        diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam.", 
      "title": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr.", 
      "href": "http://www.zeit.de/dolorem/lorem-ipsum/2012-12/Sit-amet",
      "release_date": "2011-12-01T14:40:00.000Z", 
      "uri": "http://api.zeit.de/content/1111122299xxcc99aa", 
      "supertitle": "Lorem Ipsum", 
      "teaser_title": "Lorem ipsum dolor sit amet, consetetur sadipscing."
      "teaser_text": "Sicilia que es una magnifica maestrae."
    }
  ],
  "uri": "http://api.zeit.de/department/lorem-ipsum",
  "parent": "http://api.zeit.de/department/dolorem",
  "href": "http://www.zeit.de/dolorem/lorem-ipsum/index",
  "value": "Lorem Ipsum",
  "limit": 1,
  "offset": 0,
  "found": 312
}