This plugin adds API endpoints to the website.
Endpoints
Each of the endpoints represents a table you can interact with in the database. Although internally it will fetch related data from other tables.
- Container (get,set,query,remove)
- Object (get,set,query,remove)
- Taxonomy (get,set,query)
- Term (get,set,query)
- User (get,set,query, authenticate)
- Log (get,set,query)
All of these will return JSON objects with the specified information in an appropriate format.Either directly or encased in the following format:
$message = array(
"result"=>true/false,
"text"=>__("text string"),
"data"=>$object
);
$routing->xhr_return(200, "text/html", json_encode($message));
Authentication
There are two ways to authenticate to the API. One for servers with full access and one for users/applications to access their own information.
- Servers ( https://triekster.nl/en_US/api/user/authenticate )
- Users ( https://triekster.nl/en_US/app/user/authenticate )
Two-factor does not apply to this authentication method. There are plans for whitelisting access in the future.