These endpoints enables you to maintain your account programatically.
IMPORTANT! Creating addons is currently enabled per invitation only. Please reach out to get an invitation.
Visit our guide to build an addon for more informations.
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 a-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 YS1lMWY5MmM3Ny01YmIwLTRmYjgtOWJkOC05YjYxZDAxNGFiNWY= { "foo": "bar" }
Unauthorized requests will responded with 401 Unauthorized
.
If you have signed up as an addon you can manage some of your settings through this API.
Name | Type | Description |
---|---|---|
|
BSON::ObjectId |
|
|
String |
The company name behind the addon, e.g. |
|
String |
When a project inside of the EU zone subscribes to your addon we can trigger a webhook at your EU based API. Here you can register the URL of your API. If you own e.g. |
|
String |
When a project inside of the US zone subscribes to your addon we can trigger a webhook at your EU based API. Here you can register the URL of your API. If you own e.g. |
|
String |
This is the endpoint our webhook hits when a project subscribes to your addon. It signals for you to create a record for the project in your database, assuming that is a part of your project onboarding process. Following REST conventions we will trigger a POST request, and you are suggested to choose an endpoint ending with { "_id": "5c3f908e3ab42f323432fc59", "name": "Example Project", "db_hosts": [ "5c3f908e3ab42f323432fc59-0.mongodb.goaddon.com", "5c3f908e3ab42f323432fc59-1.mongodb.goaddon.com" ], "db_username": "p_5c3f908e3ab42f323432fc59", "db_password": "7cf3455b813e7192d3782c1bb31af78500e1d8bbb3fc02a1ef6f7b6c7a6f", "encryption_key": "9ba70ff0dae4a78478b93251b3520a23effe667803d7bf985895fb8e652234b2", "encryption_iv": "00b43450c1f190fcd1971eb801e5607b", "subscription_id": "5c3f90a83ab42f323432fc5a" }
|
|
String |
This is the endpoint our webhook hits when a subscribed project updates its informations. It signals for you to update the projects record in your database, assuming you keep such records. Following REST conventions we will trigger a PATCH request, and you are suggested to choose an endpoint ending with When you include { "_id": "5c3f908e3ab42f323432fc59", "name": "Example Project", "db_hosts": [ "5c3f908e3ab42f323432fc59-0.mongodb.goaddon.com", "5c3f908e3ab42f323432fc59-1.mongodb.goaddon.com" ], "db_username": "p_5c3f908e3ab42f323432fc59", "db_password": "7cf3455b813e7192d3782c1bb31af78500e1d8bbb3fc02a1ef6f7b6c7a6f", "encryption_key": "9ba70ff0dae4a78478b93251b3520a23effe667803d7bf985895fb8e652234b2", "encryption_iv": "00b43450c1f190fcd1971eb801e5607b", "subscription_id": "5c3f90a83ab42f323432fc5a" }
|
|
String |
This is the endpoint our webhook hits when a project unsubscribes. It signals for you to destroy or inactivate the projects record in your database, assuming you keep such records. Following REST conventions we will trigger a DELETE request, and you are suggested to choose an endpoint ending with When you include |
|
String |
You will probably need subscribed projects to register certain details specific to your addon, and for that purpose you are able to setup configuration pages with forms for the project to fill out. As per the page docs you can define for each form what HTTP request method and what action should be triggered. To update a project you could e.g. let the form trigger the HTTP method PATCH and the action But if you find yourself duplicating some part of the request action this field can help you out. When you include Given all example values mentioned above, and that your own API is registered at e.g. |
|
String |
The name to be displayed publicly, 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. |
|
String |
The website to be displayed publicly, e.g. |
|
String |
The headline of your public addon listing, e.g. |
|
String |
A secondary headline for your public addon listing, e.g. |
|
String |
A link to a Youtube video promoting your addon, if such a via exists. E.g. |
|
String |
E.g. |
|
String |
E.g. |
|
String |
The primary description of your addon. You are free to style it with markdown. |
|
String |
|
|
String |
|
|
String |
|
|
Array |
If your pages require any external stripts to load, you can provide an array of script URL's. JQuery 3.3.1, Popper 1.14.7 and Bootstrap 4.3.1 is already loaded. E.g. |
|
Array |
If your pages require any external stylesheets to load, you can provide an array of stylesheet URL's. Bootstrap 4.3.1 and FontAwesome 5.4.2 are already loaded. E.g. |
|
Boolean |
By default, projects can subscribe to your addon without having registered a payment card with Goaddon. If your addon does not offer a free tier or a trial period you can require a payment card to be registered before a project can subscribe by setting this to |
|
Boolean |
If your addon is in beta, but accepting subscribers you should set this to |
|
String |
The zone in which your addon was created. This determines in which datacenters you can create database nodes. |
Get your addon. Even though an endpoint like this would usually respond with many results you should only expect one.
Get your addon.
Update the addon.
Invite a user to access the addon. Caution! This will grant the user full and immediate access.
Revoke a users access to the addon.
Unlock a users access to the addon.
Configure the 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 addon. Currently it is possible to reset:
api_token
, which is used for this APIwebhook_token
, which is used to authenticate requests from Goaddon to your APIYou can define API references for projects to use.
Name | Type | Description |
---|---|---|
|
BSON::ObjectId |
|
|
String |
Give the API reference a unique title, e.g. |
|
String |
An introduction explaining the purpose of your API. |
|
String |
A description of how to authenticate yourself to get access to the API functionality. |
|
Array |
We will use your resources specification to render an API reference similar to the one you are looking at right now. [ { "name": "projects", "description": "If you've signed up as a project you can manage some of settings through this API.", "endpoints": [ { "method": "patch", "path": "/project_api/v1/projects/{{ project_id }}", "description": "Updates your `project`.", "request_examples": [ { "title": "JSON body", "body": "Include any of the following keys:\n\n```json\n{\"foo\": \"bar\"}\n```" } ], "responses": [ { "code": "200", "keys": [ { "name": "success", "description": "A confirmation text." } ] } ] } ], "properties": [ { "name": "foo", "type": "String", "description": "Some description" } ] } ]
|
Get all api_references.
Get specific API reference.
Create an API reference.
Update an API reference.
Destroy an API reference.
Replace all existing API reference with the ones you submit.
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.
When a project subscribes to an addon it can manage its subscription through custom pages set up by the addon.
Name | Type | Description |
---|---|---|
|
BSON::ObjectId |
|
|
String |
Page names are used for navigation purpose, and needs to be unique. If you want to link to a page named You are required to have a page named Additionally you are required to have a page named All other pages should have names that captures their purpose. If the page should not be listed in the menu, but is instead a sub page of another, you should name it like this: |
|
String |
|
|
String |
You may want to provide project specific variables before the page is displayed. Therefore you can specify an API path for us to request, as well as the preferred request method (GET or POST). Respond to our API request with a JSON hash and your page will have access to it through the variable You can reference variables like e.g. If you specify an API path and request method for your |
|
String |
Write instructions for a project to follow and forms to fill out. |
|
Hash |
You can keep your HTML code clean by putting all text content into the locale hash. You are not obligated to do so, and currently only English is supported, but if you use locales from the beginning you will be prepared to support multiple languages if it becomes relevant later on. You can insert text from your locales by referencing it like e.g. { "en": { "headline": "My Page", "greeting": "Welcome to my page." } }
|
|
Hash |
Your pages will be accessible to projects through the left hand menu. You can specify the menu title for a page, localized in different languages. Currently the only supported language is English. { "en": "My page" }
|
Get all pages.
Get specific page.
Create a page.
Update a page.
Destroy a page.
Replace all existing pages with the ones you submit.
You can get an overview of subscribed projects. This is usefull if you want to regularly verify the data provided through our webhooks.
Name | Type | Description |
---|---|---|
|
BSON::ObjectId |
|
|
String |
The name of the project or company, e.g. |
|
Hash |
The projects chosen database configuration, e.g. |
|
|
The host URL's of the database. This is neccesary knowledge when connecting to the projects Goaddon database, e.g. |
|
String |
The name of the projects Goaddon database. |
|
String |
The key that is used to encrypt and decrypt data from the database, e.g. |
|
String |
The IV that is used to encrypt and decrypt data from the database, e.g. |
|
String |
Username that should be used to access the projects Goaddon database, e.g. |
|
String |
Password that should be used to access the projects Goaddon database, e.g. |
|
BSON::ObjectId |
The |
|
String |
The zone in which the project was created. This determines in which datacenter the database of the project is. |
Get projects.
Get specific project.
Forward data to another addon that the project is subscribed to.
A shortcut is a single page that lets a project subscribe to your addon with a pre-defined configuration. You can invite other addons to participate in the shortcut, though not through the API.
Name | Type | Description |
---|---|---|
|
BSON::ObjectId |
|
|
String |
Give the shortcut a unique internal name. |
|
String |
A secondary headline for the public shortcut listing, e.g. |
|
String |
The primary description of the shortcut. You are free to style it with markdown. |
|
String |
A link to a Youtube video explaining the shortcut, if such a via exists. E.g. |
|
String |
Write instructions for a project to follow and forms to fill out. <h1>{{ l.headline }}</h1>\n<p>{{ l.greeting }}</p>
|
|
Hash |
You can keep your HTML code clean by putting all text content into the locale hash. You are not obligated to do so, and currently only English is supported, but if you use locales from the beginning you will be prepared to support multiple languages if it becomes relevant later on. You can insert text from your locales by referencing it like e.g. { "en": { "headline": "My Shortcut", "greeting": "Welcome to my shortcut." } }
|
|
Array |
An array of webhooks that you need triggered before loading the shortcut. [ { "addon_id": "5f7958473ab42f4c16fc41bb", "http_method": "post", "path": "/{{ locale }}/goa_api/shortcuts/{{ shortcut }}", "form_webhook_path": "/{{ locale }}" } ]
|
|
Array |
If your shortcut require any external stripts to load, you can provide an array of script URL's for us to load. JQuery 3.3.1, Popper 1.14.7 and Bootstrap 4.3.1 is already loaded. E.g. |
|
Array |
If your shortcut require any external stylesheets to load, you can provide an array of stylesheet URL's for us to load. Bootstrap 4.3.1 and FontAwesome 5.4.2 are already loaded. E.g. |
Get all shortcuts.
Get specific shortcut.
Create a shortcut.
Update a shortcut.
Destroy a shortcut.
Invite an addon to the shortcut.
Remove an addon from the shortcut.
Accept an invitation to participate in the shortcut.
Snippets can be included in pages. Insert a snippet by using the tag {% include 'snippet_name' %}
.
Name | Type | Description |
---|---|---|
|
BSON::ObjectId |
|
|
String |
Give the snippet a unique name that can be referenced by pages or other snippets, e.g. |
|
String |
Write instructions for a project to follow and forms to fill out. <h1>{{ l.headline }}</h1>\n<p>{{ l.greeting }}</p>
|
|
Hash |
You can keep your HTML code clean by putting all text content into the locale hash. You are not obligated to do so, and currently only English is supported, but if you use locales from the beginning you will be prepared to support multiple languages if it becomes relevant later on. You can insert text from your locales by referencing it like e.g. { "en": { "headline": "My Snippet", "greeting": "Welcome to my snippet." } }
|
Get all snippets.
Get specific snippet.
Create a snippet.
Update a snippet.
Destroy a snippet.
Replace all existing snippets with the ones you submit.
Submit tallies of your subscribers.
Name | Type | Description |
---|---|---|
|
BSON::ObjectId |
|
|
BSON::ObjectId |
The identifier of the project you want to submit a tally for. E.g. |
|
String |
A unique identifier for the tally, chosen by you. E.g. |
|
Time |
The time where you opened the tally. E.g. |
|
Time |
The time where you closed the tally. This is defined by you, and not necessarily the same time as you create the tally. E.g. |
|
String |
A headline that explains the nature of the expenses in the tally. E.g. |
|
String |
A description that further explains the nature of the expenses in the tally. E.g. |
|
Array |
An array of hashes that specifies details of the tally. These will be transformed into a table. Your table can have op to 8 columns. [ { "col1": "**Disk usage:**", "col2": "10.0 EUR" } ]
|
|
Float |
The total amount to be added on the next invoice issues for the subscriber. E.g. |
Get all tallies.
Get specific tally.
Create a tally.