docs
API
Overview

Get started with the Frabit API

This page will help you get started with the Frabit API

Introduction

The Frabit API allows you to manage Frabit programmatically. With the Frabit API, you can create and manage all objects in your Frabit account, including:

  • Clusters
  • Instances
  • Projects
  • Teams
  • Users
  • Workspace
  • Database

Frabit API base URL

The base URL for a Frabit API request is:

export YOUR_HOST="yourdomain.com:9180"
https://{YOUR_HOST}/api/v2

Append a Frabit API endpoint path to the base URL to construct the full URL for a request. For example:

https://{YOUR_HOST}/api/v2/projects/{project_id}/branches/{branch_id}

Authentication

Learn how to authenticate Frabit API requests

The Frabit API requires that you include an API key token in an Authorization header in your API request.

The Frabit API uses Bearer Token Authentication, which means that you must format your Authorization header like this:

-H 'Authorization: Bearer $FRABIT_API_KEY'

example like below:

export FRABIT_API_KEY="fb_eyJrIjoiTFRSN1RBOVc3SGhjblc0bWZodXZ3MnNDcU92Um5VZUIiLKJuIjoibXktYXBpLWtleSIsImlkIjoxfQ"
curl 'https://console.frabit.tech/api/v2/projects' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer $FRABIT_API_KEY' \
  -H 'Content-Type: application/json' \

Create API key

A Frabit API key is a randomly-generated token that remains valid until it is revoked.

To create an API key:

Use cases

How you can use the Frabit API

The Frabit API can be used in a number of ways. Here are some examples:

  • Programmatically create, update, or delete any Frabit object including API keys, projects, compute endpoints, databases, and roles.
  • Automatically create database branches via integrate into workflow
  • Retrieve details about any object in Frabit including projects, branches, compute endpoints, databases, and roles.
  • Check the status of any request using Operation endpoints.

You can can access the Frabit API from any application capable of issuing an HTTP API request.