Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Gold File Api

gojko edited this page Nov 24, 2014 · 18 revisions

MM Gold is a storage API used for server-side exports and sharing. Physically, it consists of two components:

  • Amazon S3 file storage
  • HTTP(S) API to obtain security tokens for the file storage

There are several JavaScript objects available in the MindMup source code that wrap the workflows and APIs presented here.

  • GoldApi class wraps the HTTP(S) api into a convenient JavaScript object
  • GoldLicenseManager is a utility that GoldApi uses to store and retrieve the account license
  • S3Api wraps the Amazon S3 response formats and polling into a utility class
  • The LayoutExport class wraps the file export workflow (polling etc)

Please note that although the HTTP interface is ready to be used as a public API, the JavaScript object might change in the future without notice, so use the JS object just as an example (or write good tests for your code to catch any potential unexpected changes). All the objects are well tested with unit tests so check those out for example usage. For how to link them, see the main config file

Executing Gold API calls

There are two HTTP endpoints you can use for your code

http://gold-staging.mindmup.com

Ordering an export

To order exports from the service, you should:

  1. Call the HTTPS api to get a file upload token and result polling URLs
  2. Send the file to S3 using the upload token (note that some export types require a layout, some require the map file)
  3. Poll the result and error URLs periodically until one of them resolves with a file
  4. Present or send the file from the result URL to the users in case of success, or report an error

Obtaining a license key

Clone this wiki locally