Skip to main content

Get Started

Launch an API with Sparky in less than 5 minutes.

What you'll need

  • Access to a data source that Sparky supports

1. Create an account

Create an account with Sparky.

2. Add a resource

Add a resource to your account. Resources can be databases, auth providers, and other APIs. Once you connect a resource, you will be able to use it within your API.

3. Create an API

Create an API within your account. APIs are collections of endpoints that are logically similar to each other.

Create API demo

4. Create an endpoint

Endpoints execute the business logic for your API - they make sure the user accessing the resource is allowed to, and they define the queries that are run behind the scenes.

Choose a name

The name and description help enrich the documentation that is generated for your API, so it's important to accurately describe what the endpoint does.

Example Name: Retreive a customer

Example Description: Returns the Customer object for a valid identifier.

Choose a method and path

Method options

MethodWhen to use
GETWhen your endpoint is retreiving data
POSTWhen your endpoint is creating data
PUTWhen your endpoint is updating and replacing data
PATCHWhen your endpoint is updating and modifying data
DELETEWhen your endpoint is deleting data

Path naming best practices

Here is a great guide to the best practices for naming API endpoints: Endpoint naming guide

Examples of clear path naming

PathDescription
/customersRetrieves all customers
/customers/{id}Retrieves the customer with this id
/customers/{id}/purchasesRetrieves all purchases by the customer with this id

Choose your authentication source and roles

We support a number of authentication methods.

Auth sourceWhen to use
API KeyFor APIs that give your customers access to manage their data directly
Auth0For APIs used in apps where your users log in with Auth0
danger

If you select "None", your API will not be protecting the data sources you connect. This should only be used when the data you're connecting to is meant to be publicly accessible.

Write your database query

Select the name of the resource you created in step 2. Depending on the resource and the query you'd like to make, there will be specific details you need to provide. For more details on each resource, visit the resources section.

5. Create a deployment

Create a deployment. A deployment is a version of your API. This will publish the changes you made, so your updated API is available to the world!

Create deployment demo