The API is acessible at api.xefili.dev. All routes start with a / and sensitive routes are password protected.
/articles
This endpoint returns the entire article collection as a JSON array. Using the method POST, administrators can add additional articles the the array. When using post, the X-API-Key header should be passed with the correct password.
A possible response should look like this:
/articles/:id
This endpoint displays the article with the specified id as a JSON array element. Articles may also be updated with caution since structure is not validated and the request body is set equal to the article's id. Therefore, the request must be structurally correct and needs to be authorized with the correct header. Administrators can delete articles with the DELETE method, this requires the X-API-Key header to be set. If unset or if it has incorrect values, the api will return with the status 401 Unauthorized.
/config
This endpoint displays current information about the api and configuration or feature flags for the websites.
/search?query="query"
This endpoint uses the built in search function to look up results from the query parameter. The search indexes the titles of the articles. An optional limit parameter can be passed aswell; /search?query="query"&limit=INT . The limit parameter accepts any positive integer. Other values will result in a HTTP 500 because I'm not handling errors which can be avoided.