Excuse API Documentation

This page is API documentation for accessing this site programatically. If you would like an API token to create jokes directly, please contact me at contact@mylifeneeds.management.

Requesting an API token does not guarantee that I will give you one.

Successful API Queries

id: The id of the excuse in the database.

excuse: The content of the excuse. Max length is 1024 characters.

Unsuccesful API Queries

data: Any extra data that the error generated.

error: The type of error that occurred.

message: An explanation of why the error occurred.

Retrieving a excuse

/api/excuse/1

Request method: GET

Retrieves the excuse with the excuse_id specified and returns in to the requestor.

Endpoint limits: 15 requests per minute.

Retrieving a Random excuse

/api/excuse/random/

Request method: GET

Retrieves a random excuse from the database.

Endpoint limits: 15 requests per minute.

Retrieving a Page of excuses

/api/excuses/[page_id]

Request method: GET

Retrieves 20 excuses from the db. The page number passed in will determine which page will be returned. Entries are returned in a JSON list.

Endpoint limits: 5 requests per minute.

Restricted Access Endpoints.

Creating a excuse

/api/excuse/create/

Request method: POST

Creates a excuse with the content provided. The data MUST be passed in a form to the endpoint.

The form MUST have a content field (containing the excuse). Content longer than 1024 characters will be truncated.

Endpoint limits: This endpoint requires a valid XAuthToken header to be passed along with the request.