In addition to the console interface, the CURIO™ platform also provides a set of APIs that can be used to access the system programmatically.
All of the APIs require an "API Key" to be provided when you try to perform an operation, and your account can have multiple API keys associated with it. Any request that you make to the API with one of your keys then inherits the same access permissions that your account has within the system. You therefore want to treat your API keys sensitively, and ensure they are only stored in secure locations.
To manage the API keys associated with your account, you'll need to click on the menu next to your name on the top-left side of the screen and then choose the "Account Settings" option.
Managing API Keys
On the account settings dialog you can see a list of the API keys that are currently associated with your account, as well as an option to rename or delete the keys.
The name you assign to your key is for your organizational purposes only, and has no other effect on the system. We therefore recommend that you create a unique key for the different primary purposes you use them for, and name them in a fashion that will help you remember (e.g. "My Laptop API Key", "Sequence Lab Data Upload Key", etc.)
If at some point you no longer want the key to be used, you can simply delete the key from your account settings screen and it will then no longer function.
Creating an API Key
Your account can have multiple API keys associated with it, and to generate a new key simply click the "Create API Key" button. After the new key is generated a dialog message will appear that shows a string of characters in bold which represents the key.
You'll then want to copy that key to a safe location, as after you close the dialog you'll no longer be able to access the key's value via the console. If you you lose the key, you can always simply return to this same screen and generate a new one.
Obtaining Your Project Id
Most of the APIs require the unique identifier of a project (i.e. the "Project Id") to be included as one of the arguments when performing various operations.
To access the id of any of your projects, first navigate to the project within the console, and then choose the "Options -> Edit Project Info" or "Options -> View Project Info" menu option in the upper-right hand corner.
Uploading Project Files
To upload a file via the API you simply need to make an HTTP "PUT" request with the file to a URL in the following form:
Note that the trailing slash "/" character is required, and the "<CURIO PROJECT ID>" portion should be replaced with the unique id of the CURIO project that you would like the file uploaded into.
To authenticate the request, you also need to pass your Curio API Key on an HTTP header with the name of:
x-goog-meta-curio-api-key
There are many ways to do this, but here is an example of using the 'curl' command to upload a file with name "sample.fastq" into the project with id "ABC-PROJECT-789" using an API key of "XYZ-API-KEY-123":