docs
CLI
Overview

Get started with the Frabit CLI

This page will help you get started with the Frabit CLI

Introduction

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

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

Frabit CLI base URL

The base URL for a Frabit CLI request is:

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

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.