Disclaimer: All calls are using the HTTP method GET, even if the requests are not idempotent (like adding a new favorite group).
All calls use the API - key as get parameter in the form:
?api_key=j90inhuf1qx4myb8tqo5otrlpdzEXAMPLE
If missing, a 403 Response is sent
HOST/api/export
- Returns the non-user specific data as a sqlite DB file
HOST/api/get_timezone
- Call only once per sync
HOST/api/get_strings
HOST/api/get_module_types
HOST/api/is_module_active
-
GET-Parameters:
- param=module_type_name
HOST/api/get_terms?api_key=xyz
-
Returns
- on success: HTML formatted content of the page, e.g. {"response":{"pagecontent":"
Foo
"}} - on error: 404 (Not Found)
- on success: HTML formatted content of the page, e.g. {"response":{"pagecontent":"
-
GET-Parameter
-
email - the email address of the user
-
password - cleartext password, encrypted via https
-
Example request:
HOST/api/login?api_key=KEY&email=abc@example.org&password=test1234
-
-
Returns
- on success: JS property "token" and "userid" in JSON (application/json), e.g. {"response":{"token":"abc123", "userid":123}}
- on error "Missing parameters": 400 (Bad Request)
- on error "wrong credentials or missing API key": 403 (Forbidden)
- on error "user token could not be generated": 500 (Internal Server Error)
-
GET-Parameter
- token - the user token as received through the login call
- article_id - the article to be added to the user's favorites
HOST/api/add_favorite?api_key=KEY&token=abc&article_id=1
-
Returns
{ "response": { "success": true } } * on error "Missing article ID": **400 (Bad Request)** * on error "Missing API token"/"Invalid API token": **403 (Forbidden)**
-
GET-Parameter
- token - the user token as received through the login call
- article_id - the article to be removed from the user's favorites
HOST/api/remove_favorite?api_key=KEY&token=abc&article_id=1
-
Returns
{ "response": { "success": true } } * on error "Missing article ID": **400 (Bad Request)** * on error "Missing API token"/"Invalid API token": **403 (Forbidden)**
-
GET-Parameter
- token - the user token as received through the login call
- title - the title of the new group
-
Returns
{ "response": { "success": true, "group_id": 1, } }
HOST/api/add_favorite_group?api_key=KEY&token=abc&title=Hallo%20Welt
-
GET-Parameter
- token - the user token as received through the login call
- group_id - the id of the group to be deleted
HOST/api/remove_favorite_group?api_key=xyz&token=abc&group_id=1
-
GET-Parameter
- token - the user token as received through the login call
- group_id - the id of the group
- article_id - the id of the article
HOST/api/add_article_to_favorite_group?api_key=KEY&token=abc&group_id=1&article_id=1
-
GET-Parameter
- token - the user token as received through the login call
- group_id - the id of the group
- article_id - the id of the article
HOST/api/remove_article_from_favorite_group?api_key=KEY&token=abc&group_id=1&article_id=1
-
GET-Parameter
- token - the user token as received through the login call
-
Returns
-
on success: JS property "favoriteInfo" in JSON, e.g.
{ "response": { "favoriteInfo": { "allFavorites": [ 274, 381, 221, 220 ], "favoriteGroups": { "Name der Gruppe": { "id": 1, "articles": [ 521, 274 ], "sharelink": "favorites/showgroup/5/91922800eb16af310683b5173f465b25" } } } } }
-
Minimal-Response:
{ "response": { "favoriteInfo": { "allFavorites": [], "favoriteGroups": {} } } }
-
on error "Missing API token"/"Invalid API token": 403 (Forbidden)
-
-
GET-Parameter
- token - the user token as received through the login call
HOST/api/add_article?api_key=KEY&token=abc
-
POST-Body - containing JSON representation of article
{ "article": { [...] } }
-
Returns
-
Positive Response:
{ "response": { "success": true, "article_id": 1, "images": [1,2,3] } }
-
Negative Response:
{ "response": { "success": false, "article_id": null, "images": [] } }