Moxie

An online REST API for prototyping.

Getting Started

Make a GET, POST, PUT, PATCH, or DELETE request to a moxie API endpoint.

GET https://usemoxie.xyz/api/@itsjonq/hello

Example

Below is an example JS request made with window.fetch. Check out the sample response.

fetch('https://usemoxie.xyz/api/@itsjonq/samples/1')
  .then(response => response.json())
  .then(data => console.log(data));

URL Format

The format of the API endpoint:

https://usemoxie.xyz/api/:username/:collection/:id
ValueRequiredDescription
:usernameYesYour "username". Must start with a @.
:collectionYesThe name of your collection of data.
:idThe id of an single item.

React Hooks

Check out the official React hooks library to get started with Moxie + React.

About Moxie

To keep things simple, Moxie does not require authentication.

Since we don't require logins, a "username" is just a convention to establish your personal playground.

We don't monitor or curate data. Please don't store anything sensitive or important. There's no guarantees that your data will be preserved.

After all, Moxie just for prototyping!

P.S. Please be nice and don't override other people's stuff 🙏

Endpoints

Here are some endpoints you can hit:

Collections

Collections are a list (Array) of data (entries). When making a POST request, if a collection doesn't exist, Moxie will make one for you!

Example: https://usemoxie.xyz/api/@itsjonq/hello
MethodBodyDescription
GETGets a collection of data.
POST{ message: 'haiii' }Adds a new entry to the collection.
Multiple entries can be added with an array.
PUT[{ id: 'one', message: 'haiii' }]Updates multiple entries.
PATCH[{ id: 'one', message: 'haiii' }]Updates multiple entries.
DELETE[{ id: 'one' }]Deletes entries from the collection.
If no arguments are passed, this deletes the entire collection.

id and createdAt fields are automatically generated for you on GET requests.

Entries

Entries are individual items within a Collection.

Example: https://usemoxie.xyz/api/@itsjonq/hello/123
MethodBodyDescription
GETGets an entry.
POST{ message: 'haiii' }Adds a new entry.
PUT{ message: 'haiii' }Updates an existing entry.
PATCH{ message: 'haiii' }Updates an existing entry.
DELETEDeletes an entry.

updatedAt fields are automatically generated for you on PATCH/PUT requests.

Have Fun!

And that's Moxie! Have fun building cool things.

© 2020. Made with 🦄 by Q.