FeatureBase Cloud REST API (2.0.0)

Download OpenAPI specification:Download

Introduction

FeatureBase Cloud allows you to launch FeatureBase clusters as a managed service in the cloud.

Data Model

Customers can use REST APIs to perform CRUDL (Create/Read/Update/Delete/List) operations on their cloud resources. Every resource belongs to an organization. Each API resource type can be managed via a dedicated API endpoint. Resource types include:

  • Databases
  • Query
  • Invites
  • Users
  • Orgs
  • Shapes
  • Roles

API Errors

All API errors include a JSON body with a human-readable message and a machine-readable error code designed for programmatic parsing. For example:

HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 469
{
  "code": "InvalidParameter",
  "message": "The value for 'count' has to be greater than 0."
}

The following table describes the most common error types and their usage:

HTTP Response Status Code Example Message Client Retry Behavior
400 Message includes the SQL3 error response. No
401 Authorization failed No
403 User does not have the access to perform this action. No
404 Resource not found. No
408 The client cancelled the request or failed to send a full request. Yes
409 Requested resource already exists. No
409 The referenced resource is not ready to process requests. Retry with backoff
413 The size of the request payload exceeds the maximum size permitted. No
422 Unprocessable entity Retry with correct resource information
429 API rate limit exceeded. Retry with backoff
500 Unexpected error Retry with backoff
501 Did not implement this method No
503 The service is unavailable at the moment. Retry with backoff

Security

JWT or ApiKeyAuth

HTTP: JWT

To authenticate to FeatureBase Cloud, you will need the user name and password that you configured during signup. You can obtain a JWT token by making a POST request against https://id.featurebase.com. For example:

curl --location --request POST 'https://id.featurebase.com' \
     --header 'Content-Type: application/json' \
     --data-raw '{"USERNAME":"john.doe@example.com","PASSWORD":"secretpassword"}' 

If successful, you will receive a JWT access token in the response. For example:

{
  "AuthenticationResult": {
    "AccessToken": "ey..g",
    "ExpiresIn": 3600,
    "IdToken": "ey..w",
    "RefreshToken": "ey..A",
    "TokenType": "Bearer"
  }
}

In order to authenticate against FeatureBase Cloud API endpoints, you should pass in the IdToken above as the value of the Authorization header with the Bearer scheme when making HTTP requests. For example, to list databases in your organization:

curl --location --request POST 'https://api.featurebase.com/v1/deployments/' \
     --header 'Authorization: Bearer ey..w' \
     --header 'Content-Type: application/json'

HTTP Authorization Scheme: bearer

Bearer format: JWT

API Key: ApiKeyAuth

Customers can generate API keys and use them to perform API actions in lieu of JWT tokens. Keys can only be created by their owners, they can be revoked by org administrators and by their owners, however they cannot be deleted. Once a key is revoked, it cannot be unrevoked. Keys will never expire, they need to be explicitly revoked when no longer needed.

To authenticate with an API key simply pass it using the X-API-Key header. e.g.:

curl --location --request GET 'https://api.featurebase.com/v2/databases' --header 'X-API-Key: <key secret>'

Once keys are generated their secret cannot be recovered, even by FeatureBase staff.

Header parameter name: X-API-Key

Database States

The following table describes each database state:

Database Status Definition Can query data
CREATING FeatureBase Cloud has received the signal to start provisioning a database. No
PROVISIONING A database is being created. No
RUNNING Database is running normally. Users may run queries. Yes
RESTORING Restoring data from a backup. No
BACKUP Creating a backup of the database. Yes
DELETING FeatureBase Cloud has received the signal to start deprovisioning a database. No
DEPROVISIONING Database is being deprovisioned (deleted). No
DELETED Deprovision completed successfully. No
FAILED Unrecoverable. Data is lost or Database failed to be provisioned. No
FROZEN There was a problem with backup and no new operations can be done on the database. No
UPDATING The database is being updated, some performance degradation might occur but all data is available Yes

Feedback

Were these docs helpful?




Databases

Databases embody FeatureBase clusters launched as a managed service in the FeatureBase Cloud. For table creation in a database please refer to https://docs.featurebase.com/docs/sql-guide/statements/statement-table-create/

Create database

Create a FeatureBase Cloud DataBase.

SecurityJWT or ApiKeyAuth
Request
Request Body schema: application/json
required
name
required
string

The user-friendly name for the database.

required
object

Options associated with this database.

Responses
201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

409

Conflict

500

Internal Server Error

post/databases
Request samples
application/json
{}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "example-database",
  • "database_status": "RUNNING",
  • "database_options": {
    },
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
  • "created_at": "2019-08-24T14:15:22Z",
  • "owned_by": "b54c13ac-3977-4e54-bbfa-b33713ac1540",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

List databases

Lists all the databases in the org.

SecurityJWT or ApiKeyAuth
Responses
200

Success

401

Unauthorized

500

Internal Server Error

get/databases
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/databases' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "next": "",
  • "resources": [
    ]
}

Get database

Return information about the specified database.

SecurityJWT or ApiKeyAuth
Request
path Parameters
database_id
required
string <uuid>

The id of the database to read.

Responses
200

Success

401

Unauthorized

404

Not Found

500

Internal Server Error

get/databases/{database_id}
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/databases/{database_id}' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "example-database",
  • "database_status": "RUNNING",
  • "database_options": {
    },
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
  • "created_at": "2019-08-24T14:15:22Z",
  • "owned_by": "b54c13ac-3977-4e54-bbfa-b33713ac1540",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

Update database

Update information about the specified database.

SecurityJWT or ApiKeyAuth
Request
path Parameters
database_id
required
string <uuid>

The id of the database to update.

Request Body schema: application/json
required
name
string

The new name for the database.

owned_by
string <uuid>

The new owner for the database.

Responses
202

Success

400

Bad Request

401

Unauthorized

404

Not Found

409

Conflict

500

Internal Server Error

put/databases/{database_id}
Request samples
application/json
{
  • "name": "example-database",
  • "owned_by": "b54c13ac-3977-4e54-bbfa-b33713ac1540"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "example-database",
  • "database_status": "RUNNING",
  • "database_options": {
    },
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
  • "created_at": "2019-08-24T14:15:22Z",
  • "owned_by": "b54c13ac-3977-4e54-bbfa-b33713ac1540",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

Delete database

Deletes the specified database.

SecurityJWT or ApiKeyAuth
Request
path Parameters
database_id
required
string <uuid>

The id of the database to delete.

Responses
202

Accepted

401

Unauthorized

404

Not Found

409

Conflict

422

Unprocessable Entity

500

Internal Server Error

delete/databases/{database_id}
Request samples
curl --location --request DELETE 'https://api.featurebase.com/v2/databases/{database_id}' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "response_code": 401,
  • "message": "unauthorized."
}

List database backups

Lists all backups of a database. This operation is available for only databases created on AWS. This feature is only available for AWS databases at this point

SecurityJWT or ApiKeyAuth
Request
path Parameters
database_id
required
string <uuid>

The id of the database to read.

Responses
200

Success

401

Unauthorized

404

Not Found

get/databases/{database_id}/backups
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/databases/{database_id}/backups' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "continuation": "",
  • "backups": [
    ]
}

Stop database

Stops all compute resources of a database. This helps to reduce cost when it is in idle state. Only user with ORG OWNER permission can perform this action. This feature is only available for AWS resources at this point.

SecurityJWT or ApiKeyAuth
Request
path Parameters
database_id
required
string <uuid>

The id of the database to stop.

Responses
202

Success

401

Unauthorized

404

Not Found

409

Conflict

500

Internal Server Error

501

Not Implemented

put/databases/{database_id}/action/stop
Request samples
curl --location --request PUT 'https://api.featurebase.com/v2/databases/{database_id}/action/stop' \
--header 'Authorization: Bearer <token>' 
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "example-database",
  • "database_status": "RUNNING",
  • "database_options": {
    },
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
  • "created_at": "2019-08-24T14:15:22Z",
  • "owned_by": "b54c13ac-3977-4e54-bbfa-b33713ac1540",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

Start database

Starts all compute resources of a database. Only user with ORG OWNER permission can perform this action. This feature is only available for AWS databases at this point.

SecurityJWT or ApiKeyAuth
Request
path Parameters
database_id
required
string <uuid>

The id of the database to stop.

Responses
202

Success

401

Unauthorized

404

Not Found

409

Conflict

500

Internal Server Error

501

Not Implemented

put/databases/{database_id}/action/start
Request samples
curl --location --request PUT 'https://api.featurebase.com/v2/databases/{database_id}/action/start' \
--header 'Authorization: Bearer <token>' 
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "example-database",
  • "database_status": "RUNNING",
  • "database_options": {
    },
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
  • "created_at": "2019-08-24T14:15:22Z",
  • "owned_by": "b54c13ac-3977-4e54-bbfa-b33713ac1540",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

Query

Execute SQL query

Execute a query against an existing database. Note that you must use the server https://query.featurebase.com/v2 for all query requests.

SecurityJWT or ApiKeyAuth
Request
path Parameters
database_id
required
string

The id of the database where the query should be executed.

query Parameters
plan
boolean

An optional route parameter that adds a "query-plan" to the response body

Request Body schema: text/plain
required
text
required
string

The sql query text.

Responses
200

Success

400

Bad Request

401

Unauthorized

404

Not Found

409

Conflict

500

Internal Server Error

post/databases/{database_id}/query/sql
Request samples
text/plain
select count(*) from test-table
Response samples
application/json
{
  • "schema": {
    },
  • "data": [
    ],
  • "query-plan": { },
  • "error": "0:0 value 'stringvalue' cannot be converted to type 'int'",
  • "exec_time": 71
}

Execute PQL query

Execute a query against an existing database. Note that you must use the server https://query.featurebase.com/v2 for all query requests. For more information about pql queries and HTTP response structures refer to https://docs.featurebase.com/docs/pql-guide/pql-read-home/

SecurityJWT or ApiKeyAuth
Request
path Parameters
database_id
required
string

The id of the database where the query should be executed.

Request Body schema: text/plain
required
text
required
string

The pql query text.

Responses
200

Success

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

post/databases/{database_id}/query/pql
Request samples
text/plain
[cseg]Count(Intersect(Row(hobbies="Teaching"),Distinct(Row(bools='available_for_hire'), field= id, index=skills)))
Response samples
application/json
{
  • "results": [
    ]
}

Metrics

Read database metrics

Read metrics from a database, metrics are exposed in OpenMetrics(Prometheus) format. Note that you must use the server https://query.featurebase.com/v2 for all query requests.

SecurityJWT or ApiKeyAuth
Request
path Parameters
database_id
required
string <uuid>

The id of the database we are reading metrics from.

Responses
200

Success

401

Unauthorized

404

Not Found

500

Internal Server Error

get/databases/{database_id}/metrics
Request samples
curl --location --request GET 'https://api.featurebase.com/databases/{database_id}/metrics' \
     --header 'Authorization: Bearer <token>'
Response samples
plain/text
# HELP pilosa_key_translation_total_writes total writes (add/delete) to key translation stores
# TYPE pilosa_key_translation_total_writes unknown
pilosa_key_translation_total_writes{fb_node_id="b4083209-eeed-46b0-b319-3282b36bc383"} 2.881812e+06
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.
# TYPE go_memstats_gc_sys_bytes gauge
go_memstats_gc_sys_bytes{fb_node_id="b4083209-eeed-46b0-b319-3282b36bc383"} 1.594612e+07
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
go_memstats_last_gc_time_seconds{fb_node_id="b4083209-eeed-46b0-b319-3282b36bc383"} 1.7
...

Invites

Invite user

Invite an user to the organization. Only Org Owner can use this API.

SecurityJWT or ApiKeyAuth
Request
Request Body schema: application/json
required
email
required
string

email of the user.

Responses
201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

post/invites
Request samples
application/json
{
  • "email": "example-email@abc.com"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "org_name": "Organization for example-org@abc.com",
  • "email": "example-email@abc.com",
  • "accepted": false,
  • "move_org": false,
  • "created_at": "2019-08-24T14:15:22Z",
  • "date_expiry": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

List invites

Lists all invites in the org. Only Org Owner can use this API.

SecurityJWT or ApiKeyAuth
Responses
200

Success

401

Unauthorized

500

Internal Server Error

get/invites
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/invites' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "next": "",
  • "resources": [
    ]
}

Get invite

Return information about the specified invite. Only Org Owner can use this API.

SecurityJWT or ApiKeyAuth
Request
path Parameters
inviteId
required
string <uuid>

The id of the invite to read.

Responses
200

Success

401

Unauthorized

404

Not Found

422

Unprocessable Entity

500

Internal Server Error

get/invites/{inviteId}
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/invites/{inviteId}' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "org_name": "Organization for example-org@abc.com",
  • "email": "example-email@abc.com",
  • "accepted": false,
  • "move_org": false,
  • "created_at": "2019-08-24T14:15:22Z",
  • "date_expiry": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

Update invite

Update information about the specified invite. Only Org Owner can use this API.

SecurityJWT or ApiKeyAuth
Request
path Parameters
inviteId
required
string <uuid>

The id of the invite to update.

Request Body schema: application/json
required
accepted
boolean

Update user invite acceptance status.

Responses
202

Success

400

Bad Request

401

Unauthorized

404

Not Found

409

Conflict

500

Internal Server Error

put/invites/{inviteId}
Request samples
application/json
{
  • "accepted": true
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "org_name": "Organization for example-org@abc.com",
  • "email": "example-email@abc.com",
  • "accepted": false,
  • "move_org": false,
  • "created_at": "2019-08-24T14:15:22Z",
  • "date_expiry": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

Users

Create user

Create an user in the organization.

SecurityJWT or ApiKeyAuth
Request
Request Body schema: application/json
required
firstname
required
string

Firstname of the user.

lastname
required
string

Lastname of the user.

Responses
201

Created

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

post/users
Request samples
application/json
{
  • "firstname": "example-firstname",
  • "lastname": "example-lastname"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "org_name": "Organization for example-org@abc.com",
  • "idp_id": "03d5d6f7-e2a3-4a79-8306-b71262b7b42e",
  • "username": "example-email@abc.com",
  • "firstname": "example-firstname",
  • "lastname": "example-lastname",
  • "status": "Active",
  • "acl": [
    ],
  • "roles": [
    ],
  • "primary_email": "example-email@abc.com",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

List users

Lists all users in the org.

SecurityJWT or ApiKeyAuth
Responses
200

Success

401

Unauthorized

500

Internal Server Error

get/users
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/users' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "next": "",
  • "resources": [
    ]
}

Get current user

Get information about current user in the org.

SecurityJWT or ApiKeyAuth
Responses
200

Success

401

Unauthorized

404

Not Found

500

Internal Server Error

get/users/current
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/users/current' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "org_name": "Organization for example-org@abc.com",
  • "idp_id": "03d5d6f7-e2a3-4a79-8306-b71262b7b42e",
  • "username": "example-email@abc.com",
  • "firstname": "example-firstname",
  • "lastname": "example-lastname",
  • "status": "Active",
  • "acl": [
    ],
  • "roles": [
    ],
  • "primary_email": "example-email@abc.com",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

Update user

Update an user in the organization.

SecurityJWT or ApiKeyAuth
Request
path Parameters
id
required
string <uuid>

The unique id of the user.

Request Body schema: application/json
required
firstname
string

Firstname of the user.

lastname
string

Lastname of the user.

acl
Array of strings

List of permissions user has. Users can not update their own permissions. Only Org_Owner can update permissions of other users in the org.

status
string

The status of the user. Users can not update their own status. Only Org_Owner can update the status of other users in the org.

Enum: "Active" "Deactivated"
Responses
202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

422

Unprocessable Entity

500

Internal Server Error

put/users/{id}
Request samples
application/json
{
  • "firstname": "example-firstname",
  • "lastname": "example-lastname",
  • "acl": [
    ],
  • "status": "Active"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "org_name": "Organization for example-org@abc.com",
  • "idp_id": "03d5d6f7-e2a3-4a79-8306-b71262b7b42e",
  • "username": "example-email@abc.com",
  • "firstname": "example-firstname",
  • "lastname": "example-lastname",
  • "status": "Active",
  • "acl": [
    ],
  • "roles": [
    ],
  • "primary_email": "example-email@abc.com",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

Get user

Get the information about user with id.

SecurityJWT or ApiKeyAuth
Request
path Parameters
id
required
string <uuid>

The unique id of the user.

Responses
200

Success

401

Unauthorized

404

Not Found

500

Internal Server Error

get/users/{id}
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/users/{id}' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "org_name": "Organization for example-org@abc.com",
  • "idp_id": "03d5d6f7-e2a3-4a79-8306-b71262b7b42e",
  • "username": "example-email@abc.com",
  • "firstname": "example-firstname",
  • "lastname": "example-lastname",
  • "status": "Active",
  • "acl": [
    ],
  • "roles": [
    ],
  • "primary_email": "example-email@abc.com",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

Create user roles

Add roles to the user with id. Only user with Org_Owner role can update other users roles in the org.

SecurityJWT or ApiKeyAuth
Request
path Parameters
id
required
string <uuid>

The unique id of the user.

Request Body schema: application/json
rolenames
Array of strings

List of roles associated with user.

Responses
201

Created

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

post/users/{id}/roles
Request samples
application/json
{
  • "rolenames": [
    ]
}
Response samples
application/json
{
  • "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "rolenames": [
    ]
}

Create API key

Create an API key for a user.

SecurityJWT or ApiKeyAuth
Request
path Parameters
user_id
required
string <uuid>

The unique id of the user.

Request Body schema: application/json
required
description
string

The user-friendly description for this key.

Responses
201

Created

400

Bad Request

401

Unauthorized

500

Internal Server Error

post/users/{user_id}/keys
Request samples
application/json
{
  • "description": "My super secret key"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "secret": "9600ee5d-1c66-4d31-b2c3-97ef4a25d053"
}

List API keys

Lists all keys bound to this user.

SecurityJWT or ApiKeyAuth
Request
path Parameters
user_id
required
string <uuid>

The unique id of the user.

Responses
200

Success

401

Unauthorized

422

Unprocessable Entity

500

Internal Server Error

get/users/{user_id}/keys
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/users/{id}/keys' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "resources": [
    ]
}

Update an API key

Update an API key for a user in the organization.

SecurityJWT or ApiKeyAuth
Request
path Parameters
user_id
required
string <uuid>

The unique id of the user.

id
required
string <uuid>

The unique id of the API key.

Request Body schema: application/json
required
description
string

The user-friendly description for this key.

status
string

The status of the key. Only keys in an ACTIVE state will be authenticated

Enum: "ACTIVE" "REVOKED"
Responses
202

Accepted

400

Bad Request

401

Unauthorized

404

Not Found

409

Conflict

500

Internal Server Error

put/users/{user_id}/keys/{id}
Request samples
application/json
{
  • "description": "My super secret key",
  • "status": "ACTIVE"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "description": "My super secret key",
  • "status": "ACTIVE",
  • "used_at": "2019-08-24T14:15:22Z",
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
  • "created_at": "2019-08-24T14:15:22Z",
  • "owned_by": "b54c13ac-3977-4e54-bbfa-b33713ac1540",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

Get API key

Get info about a given API key.

SecurityJWT or ApiKeyAuth
Request
path Parameters
user_id
required
string <uuid>

The unique id of the user.

id
required
string <uuid>

The unique id of the API key.

Responses
200

Success

401

Unauthorized

422

Unprocessable Entity

500

Internal Server Error

get/users/{user_id}/keys/{id}
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/users/{userId}/keys/{keyId}' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "description": "My super secret key",
  • "status": "ACTIVE",
  • "used_at": "2019-08-24T14:15:22Z",
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
  • "created_at": "2019-08-24T14:15:22Z",
  • "owned_by": "b54c13ac-3977-4e54-bbfa-b33713ac1540",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

Move user org

This endpoint is used to move user from one org to the other.

SecurityJWT or ApiKeyAuth
Request
path Parameters
id
required
string <uuid>

The unique id of the user.

Request Body schema: application/json
invite_id
required
string

Invite id from the org into which the user is moving.

Responses
202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

post/users/{id}/action/invite
Request samples
application/json
{
  • "invite_id": "2818c738-8b76-408a-9294-ea9d0ab5d105"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "org_name": "Organization for example-org@abc.com",
  • "idp_id": "03d5d6f7-e2a3-4a79-8306-b71262b7b42e",
  • "username": "example-email@abc.com",
  • "firstname": "example-firstname",
  • "lastname": "example-lastname",
  • "status": "Active",
  • "acl": [
    ],
  • "roles": [
    ],
  • "primary_email": "example-email@abc.com",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

Keys

Create API key

Create an API key for a user.

SecurityJWT or ApiKeyAuth
Request
path Parameters
user_id
required
string <uuid>

The unique id of the user.

Request Body schema: application/json
required
description
string

The user-friendly description for this key.

Responses
201

Created

400

Bad Request

401

Unauthorized

500

Internal Server Error

post/users/{user_id}/keys
Request samples
application/json
{
  • "description": "My super secret key"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "secret": "9600ee5d-1c66-4d31-b2c3-97ef4a25d053"
}

List API keys

Lists all keys bound to this user.

SecurityJWT or ApiKeyAuth
Request
path Parameters
user_id
required
string <uuid>

The unique id of the user.

Responses
200

Success

401

Unauthorized

422

Unprocessable Entity

500

Internal Server Error

get/users/{user_id}/keys
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/users/{id}/keys' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "resources": [
    ]
}

Update an API key

Update an API key for a user in the organization.

SecurityJWT or ApiKeyAuth
Request
path Parameters
user_id
required
string <uuid>

The unique id of the user.

id
required
string <uuid>

The unique id of the API key.

Request Body schema: application/json
required
description
string

The user-friendly description for this key.

status
string

The status of the key. Only keys in an ACTIVE state will be authenticated

Enum: "ACTIVE" "REVOKED"
Responses
202

Accepted

400

Bad Request

401

Unauthorized

404

Not Found

409

Conflict

500

Internal Server Error

put/users/{user_id}/keys/{id}
Request samples
application/json
{
  • "description": "My super secret key",
  • "status": "ACTIVE"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "description": "My super secret key",
  • "status": "ACTIVE",
  • "used_at": "2019-08-24T14:15:22Z",
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
  • "created_at": "2019-08-24T14:15:22Z",
  • "owned_by": "b54c13ac-3977-4e54-bbfa-b33713ac1540",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

Get API key

Get info about a given API key.

SecurityJWT or ApiKeyAuth
Request
path Parameters
user_id
required
string <uuid>

The unique id of the user.

id
required
string <uuid>

The unique id of the API key.

Responses
200

Success

401

Unauthorized

422

Unprocessable Entity

500

Internal Server Error

get/users/{user_id}/keys/{id}
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/users/{userId}/keys/{keyId}' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "description": "My super secret key",
  • "status": "ACTIVE",
  • "used_at": "2019-08-24T14:15:22Z",
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
  • "created_at": "2019-08-24T14:15:22Z",
  • "owned_by": "b54c13ac-3977-4e54-bbfa-b33713ac1540",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

Get org keys

Return a list of all the keys created for this org. Only org admins can call this endpoint. The return does not contain the key secrets.

SecurityJWT or ApiKeyAuth
Request
path Parameters
id
required
string <uuid>

The id of the org to read.

Responses
200

Success

401

Unauthorized

500

Internal Server Error

get/orgs/{id}/keys
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/orgs/{orgId}/keys' \
     --header 'Authorization: Bearer <token>'
     
Response samples
application/json
{
  • "next": "",
  • "resources": [
    ]
}

Orgs

Get org

Return information about the specified org. Users can only check information about the org to which they belong.

SecurityJWT or ApiKeyAuth
Request
path Parameters
id
required
string <uuid>

The id of the org to read.

Responses
200

Success

401

Unauthorized

403

Forbidden

422

Unprocessable Entity

get/orgs/{id}
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/orgs/{id}' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "Organization for example-user@abc.com",
  • "company_name": "FeatureBase",
  • "address": "test-address",
  • "tech_contact_emali": "example-user@abc.com",
  • "billing_contact_emali": "example-user@abc.com",
  • "org_type": "trial",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

Update org

Update information about the specified org. Only org admins can call this endpoint.

SecurityJWT or ApiKeyAuth
Request
path Parameters
id
required
string <uuid>

The id of the org to update.

Request Body schema: application/json
required
name
string

The name of the org.

company_name
string

The name of the comapny.

address
string

The address of the user who creates the org.

tech_contact_emali
string

Email of the user creating the org.

billing_contact_emali
string

Email of the user for billing related to org resources.

Responses
202

Success

400

Bad Request

401

Unauthorized

403

Forbidden

422

Unprocessable Entity

500

Internal Server Error

put/orgs/{id}
Request samples
application/json
{
  • "name": "Organization for example-user@abc.com",
  • "company_name": "FeatureBase",
  • "address": "test-address",
  • "tech_contact_emali": "example-user@abc.com",
  • "billing_contact_emali": "example-user@abc.com"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "Organization for example-user@abc.com",
  • "company_name": "FeatureBase",
  • "address": "test-address",
  • "tech_contact_emali": "example-user@abc.com",
  • "billing_contact_emali": "example-user@abc.com",
  • "org_type": "trial",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

Get org keys

Return a list of all the keys created for this org. Only org admins can call this endpoint. The return does not contain the key secrets.

SecurityJWT or ApiKeyAuth
Request
path Parameters
id
required
string <uuid>

The id of the org to read.

Responses
200

Success

401

Unauthorized

500

Internal Server Error

get/orgs/{id}/keys
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/orgs/{orgId}/keys' \
     --header 'Authorization: Bearer <token>'
     
Response samples
application/json
{
  • "next": "",
  • "resources": [
    ]
}

Shapes

Get list of shapes

Get list of deployment shapes available for the org.

SecurityJWT or ApiKeyAuth
Responses
200

Success

401

Unauthorized

403

Forbidden

500

Internal Server Error

get/shapes
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/shapes' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "shapes": [
    ]
}

Get shape

Get information about a deployment shape with given name.

SecurityJWT or ApiKeyAuth
Request
path Parameters
shapename
required
string

The name of the shape.

Responses
200

Success

401

Unauthorized

404

Not Found

500

Internal Server Error

get/shapes/{shapename}
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/shapes/{shapename}' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "name": "32gb-aws:us-east-2",
  • "vendor": "AWS",
  • "region": "us-east-2",
  • "type": "featurebase-cluster",
  • "metadata": {
    },
  • "properties": {
    },
  • "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}

Roles

Create role

Create a role in the org. Only user with ORG OWNER permission can use this endpoint.

SecurityJWT or ApiKeyAuth
Request
Request Body schema: application/json
required
rolename
required
string

The name of the role that need to added to the org.

acl
Array of strings

List of permissions user has.

Responses
201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

409

Conflict

500

Internal Server Error

post/roles
Request samples
application/json
{
  • "rolename": "example-rolename",
  • "acl": [
    ]
}
Response samples
application/json
{
  • "rolename": "example-rolename",
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "acl": [
    ]
}

List roles

Lists all roles in the org. Only user with ORG OWNER permission can use this endpoint.

SecurityJWT or ApiKeyAuth
Responses
200

Success

401

Unauthorized

500

Internal Server Error

get/roles
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/roles' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "next": "",
  • "resources": [
    ]
}

Get role

Return information about the specified role.

SecurityJWT or ApiKeyAuth
Request
path Parameters
roleName
required
string

The name of the role.

Responses
200

Success

401

Unauthorized

404

Not Found

500

Internal Server Error

get/roles/{roleName}
Request samples
curl --location --request GET 'https://api.featurebase.com/v2/roles/{roleName}' \
--header 'Authorization: Bearer <token>' 
Response samples
application/json
{
  • "rolename": "example-rolename",
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "acl": [
    ]
}

Update role

Update information about the specified role. Only user with ORG OWNER permission can use this endpoint.

SecurityJWT or ApiKeyAuth
Request
path Parameters
roleName
required
string

The name of the role.

Request Body schema: application/json
acl
Array of strings

List of permissions user has.

Responses
202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

put/roles/{roleName}
Request samples
application/json
{
  • "acl": [
    ]
}
Response samples
application/json
{
  • "rolename": "example-rolename",
  • "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  • "acl": [
    ]
}

Delete role

Deletes the specified role. Only user with ORG OWNER permission can use this endpoint.

SecurityJWT or ApiKeyAuth
Request
path Parameters
roleName
required
string

The name of the role.

Responses
202

Accepted

401

Unauthorized

404

Not Found

500

Internal Server Error

delete/roles/{roleName}
Request samples
curl --location --request DELETE 'https://api.featurebase.com/v2/roles/{roleName}' \
     --header 'Authorization: Bearer <token>'
Response samples
application/json
{
  • "response_code": 401,
  • "message": "unauthorized."
}