CRUDAnything

CollectionsDocsAPI ReferenceDev Roadmap

Docs

Creating an API Key

You don't need an API key to read data from CRUDAnything. However to write any data, you must be authenticated using an API key.

From the My Account API keys page, click 'New API Key'. A dialog will appear that shows your API key. Copy this key and store it somewhere safe - you won't be able to view it again.

Use your API key to authenticate requests as following:

HeaderValue
AuthorizationBearer {apiKey}
Content-Typeapplication/json

Creating a Collection

When choosing the 'identifier' for your collection, I recommend using the pluralised version of the type of items you'll be storing, e.g. 'users' or 'messages' or 'comments' rather than 'user' or 'message' or 'comment'.

Before you create a collection, you need to have your JSON Schema ready. The JSON schema is how you define how items in your collection will be structured. Once you've decided on a schema, and a name for your collection, you're ready to proceed'.

Creating a collection is super easy! All you need to do is sending a POST request to https://api.crudanything.com/v0/collections using your API key in the Authorization header as a Bearer token. See the full API docs for more information.

Adding items to a collection

Check out the list of collection in the collections page. Find a collection you want to add items to, or use one of your own collections!

After clicking on a collection, you'll find the current JSON Schema for the collection. Items added to the collection must conform to this schema. This page also gives the URL for you to POST to to add items to the collection. Put your object data in the request body as JSON when sending the request, and make sure to include theContent-Type: application/json header. It's as simple as that!