API

From SoFurry
Revision as of 11:28, 25 April 2016 by Tetsudra (talk | contribs) (Authenticated Routes)
Jump to: navigation, search

This page deals with the new-format REST API being developed as part of SoFurry NEXT. For documentation on the current "v3" API, please see SoFurry_REST_APIs.

About the API

The api runs on lumen, is classic json/rest, at the domain name api.sofurrybeta.com. It should always be accessed over HTTPS.

Making a simple API request

GET request sample

Authentication

POST for login to create a session, get a token

API Routes

This table contains all the methods and URLs that the API currently supports. For more information on using a particular route, simply go through to that route's page.

Some routes have no parameters at all, and can be accessed simply by doing the HTTP request. Some routes require parameters as part of the URL - they will be denoted by curly braces, and are always mandatory. Some requests expect parameters to be sent in the body of a JSON request.

Users and Profiles

These routes can all be accessed without providing an API token in the request header

Route Parameters Description Status
GET / Returns the version of the API Live
POST /login email, password Validates the supplied credentials and returns an authentication token that should be used for all future requests Live
POST /activate activate_token Activates a newly-registered user, enabling you to log in Live
POST /user name, email, password Register a new user account and trigger a validation email to the supplied email address Live

Authenticated Routes

These routes all require authentication. Send in the authentication token using the `X-SoFurry-Token` header.

Users and Profiles
Route Parameters Description Status

Last updated at datetime