API v2

This describes the resources that make up the first public OpenMensa API v2. On problems contact us.


All API access happens over HTTPS. The only exception to this rule applies to unauthenticated readonly-requests - these are allowed via HTTP.

Endpoint: http://openmensa.org/api/v2

All pathes referenced throughout this document are meant to be relative to the API endpoint above.


Currently only JSON is supported.

All data is sent and received as JSON by default. Additionally the format for sending and recieving data can explicitly be stated during request via HTTP Accept-headers or URL suffix. The list of available formats includes JSON (resource.json), XML (resource.xml) and MessagePack (resource.msgpack) for mobile client speedup.


Encoding for all requests and responses should be UTF-8.

Date and Time

All timestamps are returned in ISO 8601 format (UTC).


Dates will be returned without time information.



Postal address formats vary by country but at least the following information should be included in given order.

street address, postal code + city/town, country


Geographic coordinates are returned as an array of latitude and longitude.



All examples are given in JSON notion (request as well as response bodies), for general rules how the XML will look see here.

Unless otherwise stated a response will contain all shown fields.


Authentication happens via OAuth 2 - an access token included in every request to our API allows the client application to interact on behalf of the user with the OpenMensa server (only via SSL connections).

For details on howto use OAuth 2 with your OpenMensa client see here.


Requests returning multiple items will be paginated to 10 items by default. You can specify the number of items per page using the limit parameter. Allowed values are between 1 and 100. The upper limit may be different for specific resources.

Further pages can be requested by specifying the page parameter. First page (the one you usually retrieve without explicitly specifying the page number) is page number 1.

Rate Limiting


Client Errors

See here.