Download OpenAPI specification:Download
FeatureBase Cloud allows you to launch FeatureBase clusters as a managed service in the cloud.
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:
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 |
JWT or ApiKeyAuth
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'
bearer
JWT
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.
X-API-Key
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 |
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 a FeatureBase Cloud DataBase.
Created
Bad Request
Unauthorized
Forbidden
Conflict
Internal Server Error
{- "name": "example-database",
- "database_options": {
- "shape": "8GB",
}
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "example-database",
- "database_status": "RUNNING",
- "database_options": {
- "shape": "8GB"
}, - "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"
}
Lists all the databases in the org.
Success
Unauthorized
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/v2/databases' \ --header 'Authorization: Bearer <token>'
{- "next": "",
- "resources": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "example-database",
- "database_status": "RUNNING",
- "database_options": {
- "shape": "8GB"
}, - "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"
}
]
}
Return information about the specified database.
Success
Unauthorized
Not Found
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/v2/databases/{database_id}' \ --header 'Authorization: Bearer <token>'
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "example-database",
- "database_status": "RUNNING",
- "database_options": {
- "shape": "8GB"
}, - "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 information about the specified database.
Success
Bad Request
Unauthorized
Not Found
Conflict
Internal Server Error
{- "name": "example-database",
- "owned_by": "b54c13ac-3977-4e54-bbfa-b33713ac1540"
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "example-database",
- "database_status": "RUNNING",
- "database_options": {
- "shape": "8GB"
}, - "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"
}
Deletes the specified database.
Accepted
Unauthorized
Not Found
Conflict
Unprocessable Entity
Internal Server Error
curl --location --request DELETE 'https://api.featurebase.com/v2/databases/{database_id}' \ --header 'Authorization: Bearer <token>'
{- "response_code": 401,
- "message": "unauthorized."
}
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
Success
Unauthorized
Not Found
curl --location --request GET 'https://api.featurebase.com/v2/databases/{database_id}/backups' \ --header 'Authorization: Bearer <token>'
{- "continuation": "",
- "backups": [
- {
- "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
- "deployment_id": "6ef0ac85-9892-4664-a2a5-58bf2af5a8a6",
- "url": "s3://database-backups-20230117171601968300000001/backups/12345678-1234-1234-1234-1234567890ab/abcdefgh-abcd-abcd-abcd-1234567890ab/2024-02-16T04:00:30.436276.tar.gz",
- "timestamp": "2019-08-24T14:15:22Z",
- "size": 500,
- "storage_class": "STANDARD"
}
]
}
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.
Success
Unauthorized
Not Found
Conflict
Internal Server Error
Not Implemented
curl --location --request PUT 'https://api.featurebase.com/v2/databases/{database_id}/action/stop' \ --header 'Authorization: Bearer <token>'
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "example-database",
- "database_status": "RUNNING",
- "database_options": {
- "shape": "8GB"
}, - "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"
}
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.
Success
Unauthorized
Not Found
Conflict
Internal Server Error
Not Implemented
curl --location --request PUT 'https://api.featurebase.com/v2/databases/{database_id}/action/start' \ --header 'Authorization: Bearer <token>'
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "example-database",
- "database_status": "RUNNING",
- "database_options": {
- "shape": "8GB"
}, - "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"
}
Execute a query against an existing database. Note that you must use the server https://query.featurebase.com/v2
for all query requests.
Success
Bad Request
Unauthorized
Not Found
Conflict
Internal Server Error
select count(*) from test-table
{- "schema": {
- "fields": [
- {
- "name": "id",
- "type": "int",
- "base-type": "int",
- "type-info": null
}
]
}, - "data": [
- [
- 1,
- "2"
]
], - "query-plan": { },
- "error": "0:0 value 'stringvalue' cannot be converted to type 'int'",
- "exec_time": 71
}
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/
Success
Bad Request
Unauthorized
Not Found
Internal Server Error
[cseg]Count(Intersect(Row(hobbies="Teaching"),Distinct(Row(bools='available_for_hire'), field= id, index=skills)))
{- "results": [
- 89
]
}
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.
Success
Unauthorized
Not Found
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/databases/{database_id}/metrics' \ --header 'Authorization: Bearer <token>'
# 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 ...
Invite an user to the organization. Only Org Owner can use this API.
Created
Bad Request
Unauthorized
Forbidden
{- "email": "example-email@abc.com"
}
{- "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"
}
Lists all invites in the org. Only Org Owner can use this API.
Success
Unauthorized
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/v2/invites' \ --header 'Authorization: Bearer <token>'
{- "next": "",
- "resources": [
- {
- "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"
}
]
}
Return information about the specified invite. Only Org Owner can use this API.
Success
Unauthorized
Not Found
Unprocessable Entity
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/v2/invites/{inviteId}' \ --header 'Authorization: Bearer <token>'
{- "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 information about the specified invite. Only Org Owner can use this API.
Success
Bad Request
Unauthorized
Not Found
Conflict
Internal Server Error
{- "accepted": true
}
{- "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"
}
Create an user in the organization.
Created
Bad Request
Unauthorized
Not Found
Internal Server Error
{- "firstname": "example-firstname",
- "lastname": "example-lastname"
}
{- "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": [
- "MANAGE_ORG:*"
], - "roles": [
- "Org Owner"
], - "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"
}
Lists all users in the org.
Success
Unauthorized
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/v2/users' \ --header 'Authorization: Bearer <token>'
{- "next": "",
- "resources": [
- {
- "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": [
- "MANAGE_ORG:*"
], - "roles": [
- "Org Owner"
], - "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 information about current user in the org.
Success
Unauthorized
Not Found
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/v2/users/current' \ --header 'Authorization: Bearer <token>'
{- "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": [
- "MANAGE_ORG:*"
], - "roles": [
- "Org Owner"
], - "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 an user in the organization.
Accepted
Bad Request
Unauthorized
Forbidden
Not Found
Unprocessable Entity
Internal Server Error
{- "firstname": "example-firstname",
- "lastname": "example-lastname",
- "acl": [
- "MANAGE_ORG:*"
], - "status": "Active"
}
{- "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": [
- "MANAGE_ORG:*"
], - "roles": [
- "Org Owner"
], - "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 the information about user with id.
Success
Unauthorized
Not Found
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/v2/users/{id}' \ --header 'Authorization: Bearer <token>'
{- "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": [
- "MANAGE_ORG:*"
], - "roles": [
- "Org Owner"
], - "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"
}
Add roles to the user with id. Only user with Org_Owner role can update other users roles in the org.
Created
Bad Request
Unauthorized
Not Found
Internal Server Error
{- "rolenames": [
- "Org Owner"
]
}
{- "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
- "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
- "rolenames": [
- "Org Owner"
]
}
Create an API key for a user.
Created
Bad Request
Unauthorized
Internal Server Error
{- "description": "My super secret key"
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "secret": "9600ee5d-1c66-4d31-b2c3-97ef4a25d053"
}
Lists all keys bound to this user.
Success
Unauthorized
Unprocessable Entity
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/v2/users/{id}/keys' \ --header 'Authorization: Bearer <token>'
{- "resources": [
- {
- "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"
}
]
}
Update an API key for a user in the organization.
Accepted
Bad Request
Unauthorized
Not Found
Conflict
Internal Server Error
{- "description": "My super secret key",
- "status": "ACTIVE"
}
{- "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 info about a given API key.
Success
Unauthorized
Unprocessable Entity
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/v2/users/{userId}/keys/{keyId}' \ --header 'Authorization: Bearer <token>'
{- "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"
}
This endpoint is used to move user from one org to the other.
Accepted
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
{- "invite_id": "2818c738-8b76-408a-9294-ea9d0ab5d105"
}
{- "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": [
- "MANAGE_ORG:*"
], - "roles": [
- "Org Owner"
], - "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 an API key for a user.
Created
Bad Request
Unauthorized
Internal Server Error
{- "description": "My super secret key"
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "secret": "9600ee5d-1c66-4d31-b2c3-97ef4a25d053"
}
Lists all keys bound to this user.
Success
Unauthorized
Unprocessable Entity
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/v2/users/{id}/keys' \ --header 'Authorization: Bearer <token>'
{- "resources": [
- {
- "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"
}
]
}
Update an API key for a user in the organization.
Accepted
Bad Request
Unauthorized
Not Found
Conflict
Internal Server Error
{- "description": "My super secret key",
- "status": "ACTIVE"
}
{- "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 info about a given API key.
Success
Unauthorized
Unprocessable Entity
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/v2/users/{userId}/keys/{keyId}' \ --header 'Authorization: Bearer <token>'
{- "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"
}
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.
Success
Unauthorized
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/v2/orgs/{orgId}/keys' \ --header 'Authorization: Bearer <token>'
{- "next": "",
- "resources": [
- {
- "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"
}
]
}
Return information about the specified org. Users can only check information about the org to which they belong.
Success
Unauthorized
Forbidden
Unprocessable Entity
curl --location --request GET 'https://api.featurebase.com/v2/orgs/{id}' \ --header 'Authorization: Bearer <token>'
{- "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 information about the specified org. Only org admins can call this endpoint.
Success
Bad Request
Unauthorized
Forbidden
Unprocessable Entity
Internal Server Error
{- "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"
}
{- "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"
}
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.
Success
Unauthorized
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/v2/orgs/{orgId}/keys' \ --header 'Authorization: Bearer <token>'
{- "next": "",
- "resources": [
- {
- "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 list of deployment shapes available for the org.
Success
Unauthorized
Forbidden
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/v2/shapes' \ --header 'Authorization: Bearer <token>'
{- "shapes": [
- {
- "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
- "name": "32gb-aws:us-east-2",
- "vendor": "AWS",
- "region": "us-east-2",
- "type": "featurebase-cluster",
- "metadata": {
- "doc_url": null,
- "friendly_name": null,
- "hourly_rate_info": "0.65",
- "long_description": null,
- "short_description": null
}, - "properties": {
- "uses_internal_etcd": false,
- "node_count": 3,
- "replica_factor": 2,
- "compute": {
- "arch": "arm64",
- "instance_type": "r7g.large"
}, - "storage": {
- "volume_size": 100,
- "volume_iops": 4000,
- "volume_throughput": 1000,
- "volume_type": "gp3"
}
}, - "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"
}
]
}
Get information about a deployment shape with given name.
Success
Unauthorized
Not Found
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/v2/shapes/{shapename}' \ --header 'Authorization: Bearer <token>'
{- "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
- "name": "32gb-aws:us-east-2",
- "vendor": "AWS",
- "region": "us-east-2",
- "type": "featurebase-cluster",
- "metadata": {
- "doc_url": null,
- "friendly_name": null,
- "hourly_rate_info": "0.65",
- "long_description": null,
- "short_description": null
}, - "properties": {
- "uses_internal_etcd": false,
- "node_count": 3,
- "replica_factor": 2,
- "compute": {
- "arch": "arm64",
- "instance_type": "r7g.large"
}, - "storage": {
- "volume_size": 100,
- "volume_iops": 4000,
- "volume_throughput": 1000,
- "volume_type": "gp3"
}
}, - "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"
}
Create a role in the org. Only user with ORG OWNER permission can use this endpoint.
Created
Bad Request
Unauthorized
Forbidden
Conflict
Internal Server Error
{- "rolename": "example-rolename",
- "acl": [
- "test-permission1",
- "test-permission2"
]
}
{- "rolename": "example-rolename",
- "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
- "acl": [
- "test-permission1",
- "test-permission2"
]
}
Lists all roles in the org. Only user with ORG OWNER permission can use this endpoint.
Success
Unauthorized
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/v2/roles' \ --header 'Authorization: Bearer <token>'
{- "next": "",
- "resources": [
- {
- "rolename": "example-rolename",
- "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
- "acl": [
- "test-permission1",
- "test-permission2"
]
}
]
}
Return information about the specified role.
Success
Unauthorized
Not Found
Internal Server Error
curl --location --request GET 'https://api.featurebase.com/v2/roles/{roleName}' \ --header 'Authorization: Bearer <token>'
{- "rolename": "example-rolename",
- "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
- "acl": [
- "test-permission1",
- "test-permission2"
]
}
Update information about the specified role. Only user with ORG OWNER permission can use this endpoint.
Accepted
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
{- "acl": [
- "test-permission1",
- "test-permission2"
]
}
{- "rolename": "example-rolename",
- "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
- "acl": [
- "test-permission1",
- "test-permission2"
]
}
Deletes the specified role. Only user with ORG OWNER permission can use this endpoint.
Accepted
Unauthorized
Not Found
Internal Server Error
curl --location --request DELETE 'https://api.featurebase.com/v2/roles/{roleName}' \ --header 'Authorization: Bearer <token>'
{- "response_code": 401,
- "message": "unauthorized."
}