Difference between revisions of "API"

From SoFurry
Jump to: navigation, search
(API Routes)
(API Routes)
Line 18: Line 18:
  
 
{| class="wikitable"
 
{| class="wikitable"
|+API Routes
+
|+Unauthenticated API Routes
 
|-
 
|-
 
|Route
 
|Route
 +
|Parameters
 
|Description
 
|Description
|Requires Auth?
 
 
|-
 
|-
 
|GET /
 
|GET /
 +
|
 
|Returns the version of the API
 
|Returns the version of the API
|No
+
|-
 +
|POST /login
 +
|email, password
 +
|Validates the supplied credentials and returns an authentication token that should be used for all future requests
 +
|-
 +
|POST /activate
 +
|activate_token
 +
|Activates a newly-registered user, enabling you to log in
 +
|-
 +
|POST /user
 +
|name, email, password
 +
|Register a new user account and trigger a validation email to the supplied email address
 
|}
 
|}
  
 
Last updated at datetime
 
Last updated at datetime

Revision as of 11:13, 25 April 2016

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.

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

Last updated at datetime