These endpoints enables you to maintain your account programatically.
All requests to the API must include a base64 encoded version API token you can copy from your account.
If you e.g. want to update a collection that has _id 5bf935bc3ab42fc4f4280d04
, and your API token is p-e1f92c77-5bb0-4fb8-9bd8-9b61d014ab5f
, then your request should look like this:
PATCH /api/v1/collections/5bf935bc3ab42fc4f4280d04 Host: https://goaddon.com Content-Type: application/json Accept: application/json Authorization: Basic cC1lMWY5MmM3Ny01YmIwLTRmYjgtOWJkOC05YjYxZDAxNGFiNWY= { "foo": "bar" }
Unauthorized requests will responded with 401 Unauthorized
.
As an addon your access to projects databases is limited. You only get access to the collections
you have registered. As a project you have full access.
A collection has indexes
, and when a project registers one we will create it in their MongoDB. Or if an addon registers one, we will create it for all the projects that are subscribed to the addon.
Name | Type | Description |
---|---|---|
|
BSON::ObjectId |
|
|
String |
The class of the collection, pluralized. E.g. |
|
Array |
As an addon the attributes you register will be listed in a database overview that projects can review. If you as a project register the attributes you intend to use we will present you with the collections that overlaps with the addons you subscribe to. [ { "name": "foo", "type": "String", "description": "Contains the `foo` variable." } ]
|
|
Array |
You may define as many indexes as you need. An index consists of one or more keys, each either sorted ascending or descending. Additionally in options you can define if the set of keys should be validated for uniqueness. [ { "key": { "foo": 1 } }, { "key": { "company_id": 1, "foo": 1 }, "options": { "unique": true, "sparse": true, "name": "company_foo" } } ]
|
Get all collections.
Get specific collection.
Create a collection.
DANGER! Changing indexes will immediately trigger reindexing of all affected databases.
Update a collection.
DANGER! Changing indexes will immediately trigger reindexing of all affected databases.
Destroy a collection.
DANGER! Changing indexes will immediately trigger reindexing of all affected databases.
Replace all existing collections with the ones you submit.
DANGER! Changing indexes will immediately trigger reindexing of all affected databases.
In order to access your database you need to create database users.
Name | Type | Description |
---|---|---|
|
BSON::ObjectId |
|
|
String |
The username of the database user. E.g. |
|
String |
The password of the database user. E.g. |
|
Array |
The roles of the database user. E.g. |
Get all database users.
Get specific database user.
Create a database user.
Update a database user.
Destroy a database user.
You can manage some of your project settings through this API.
Name | Type | Description |
---|---|---|
|
BSON::ObjectId |
|
|
String |
The name of your project or company, e.g. |
|
String |
The company who legally has ownership of this account. |
|
String |
The address of your company. |
|
String |
An optional second address line of your company. |
|
String |
The Zip code of the city where your company is legally located. |
|
String |
The city where your company is legally located. |
|
String |
The province, state or region where your company is legally located. |
|
String |
The country where your company is legally located. |
|
String |
The email address where you would like to receive information about billing. |
|
String |
The VAT ID that should be applied to invoices. |
|
Hash |
The chosen database configuration for your project, e.g. |
|
|
The host URL's of your database. This is neccesary knowledge when connecting to your Goaddon database, e.g. |
|
String |
The name of your Goaddon database. |
|
String |
The key that is used, together with the encryption_iv, to encrypt and decrypt data from the database, e.g. |
|
String |
The iv that is used, together with the encryption_key, to encrypt and decrypt data from the database, e.g. |
|
String |
The zone in which your project was created. This determines in which datacenters you can create database nodes, e.g. |
Get projects.
Get specific project.
Update your project.
Invite a user to access the project.
Revoke a users access to the project.
Unlock a users access to the project.
Configure your database, by changing the number of nodes should participate in your MongoDB Replica Set.
Caution!
Before you start using this API endpoint, be sure to have an intimite understanding about how to safely manage nodes on a Replica Set from Goaddon. One wrong request can cause permanent loss of data.
Reboot a node in your dedicated MongoDB Replica Set.
Poll for the raw output from replSetGetStatus.
The first time you request this endpoint the polling will be initiated. Subsequently you should request it every few seconds in order to actually get the status. A healthy cluster will give a status almost immediately, but if one or more Replica Set members are unhealthy it can take up to 90 seconds. The status will be available up to 5 minutes after your first request.
This endpoint is only accessible if you have a dedicated database plan.
Initiate a failover, where the primary node of your MongoDB Replica Set steps down.
This endpoint is only accessible if you have a dedicated database plan.
Reset an access token related to the project. Currently the only token that is eligible for a reset is the api_token
, which is used to access this API.