-
Notifications
You must be signed in to change notification settings - Fork 0
Restful API for Apps or any other external access
selfoss offers an restful JSON API for applications. If you are a programmer of a mobile app, plugin or any other system which wants to access selfoss then this is your place.
You can access selfoss by using the same backend as selfoss user interface: The restful HTTP JSON API. There are a few urls where you can get information from selfoss and some for updating data. Assume you want all tags for rendering this in your own app. You have to make an HTTP GET call on the url /tags:
GET http://yourselfossurl.com/tags
The result is following JSON formatted response (in this example two tags "blog" and "deviantart" are available:
[{"tag":"blog","color":"#251f10","unread":"1"},
{"tag":"deviantart","color":"#e78e5c","unread":"0"}]
Following docs shows you which calls are possible and which response you can expect.
When you are using a login protected page, you have to add the parameter username and password in every request (as GET or POST parameter). The logical consequence is that you have to use https.
For an initial login functionality in your app you can validate a username password combination:
GET http://yourselfossurl.com/login
-
usernamethe username which should be validated -
passwordthe password which should be validated
{"success":true}
-
successtrue = correct login, false = wrong login data