- getResults(taskId, baseUrl, apiKey, incIncompleteInstances=False, incIterations=True)
Make an API call to get a list of results from completed instances or iterations. Task ID is available from Studio after clicking on the relevant task. The baseUrl string is usually:
	'https://studio.lambda.hvmd.io/' ('https://' is required).
The authHeader is a dictionary specifying an HTTP Authorisation header; it can be created with makeAuthHeader. Setting the expandSummary option to False will collapse the summary block in each result to null. Each entry in the list is a dictionary containing the results of one instance, in the structure shown below.
 
- getInstances(taskId, baseUrl, apiKey, expandSummary=True)
Make an API call to get a list of instances submitted to the task. Note that this may return less data than an individual call to getInstance(). Task ID is available from Studio after clicking on the relevant task. The baseUrl string is usually:
	'https://studio.lambda.hvmd.io/'
The authHeader is a dictionary specifying an HTTP Authorisation header; it can be created with makeAuthHeader. Each entry in the list is a dictionary containing the input data for one instance, in the structure shown below.
 
- getInstance(taskId, baseUrl, apiKey, instanceId, expandSummary=True)
Get a single instance. Note that this may return more data than the corresponding element of the array returned by getInstances().

- getInstanceIds(taskId, baseUrl, apiKey)
Returns a list of all instance IDs on a specific task

- transferEntry(source, target, entryField=["data", "annotations"], sourceIdField="id", targetIdField="instanceId")
Transfer an entry from one list of dictionaries to another list of dictionaries. Used for copying input data from instance dictionaries to results dictionaries, matching on instanceId.

- getInstancesAndResults(taskId, baseUrl, apiKey, expandSummary=True, incIncompleteInstances=False, incIterations=True)
Call both getResults and getInstances, and stitch them together with transferEntry

- listFilesUploaded(taskId, baseUrl, apiKey)
Make an API call to get a list of all uploaded files

- uploadFiles(taskId, baseUrl, apiKey, lstFilenames, localRepo, overwrite=False)
Make an API call to upload local files from localRepo with filenames in lstFilenames to the specified task

- downloadFile(filepath, localRepo, prefix='', overwrite=False)
Download a file generated by a task from the long s3 link provided as output. Provide a prefix (iteration ID etc). Returns local file name.

- getIterations(taskId, baseUrl, apiKey, instanceId)
Get a list of dictionaries, one per iteration result.

- getIterationIds(taskId, baseUrl, apiKey, instanceId)
Get a list of iteration IDs for the given instance.

- deleteIteration(taskId, baseUrl, apiKey, instanceId, iterationId)
Delete one specific iteration of a given instance

- deleteInstance(taskId, baseUrl, apiKey, instanceId)
Delete one specific instance and all its iterations

- createInstance(taskId, baseUrl, apiKey, name, instructions='', data={}, overrideSchema=None, tags=[], priority = 0, annotations = {})
Make an API call to create an instance. 
	name: A compulsory string. 
	instructions: The markdown shown to the contributor for the instance. 
	data: A dictionary. 
	priority: An integer; a higher integer is higher priority, default 0.
	annotations: A dictionary of annotations to set on the new instance

- reiterateInstance(taskId, baseUrl, apiKey,instanceId
Generate one more iteration on the selected instance

- setAnnotation(taskId, baseUrl, apiKey, instanceId, key, value)
Add a key-value pair to the annotations of an instance. Will overwrite the existing annotation if the key already exists.

- deleteAnnotation(taskId, baseUrl, apiKey, instanceId, key)
Remove the specified key and its associated value from the annotations of an instance.

- wipe(taskId, baseUrl, apiKey)
Delete **ALL** instances and iterations on a task. Caution - cannot be undone. Also may take several minutes.

-----

- Instance Structure
Each entry in the list returned by getInstances() is a dictionary with the following entries:
	id [instance id]
	name
	data [a dictionary]
	status
	tags [a list of strings]
	summary
	created
	priority
	annotations

- Results Structure
Each entry in the list returned by getResults() is a dictionary with the following entries:
	instanceId
	status
	lastUpdated
	agreement
	tags [a list of strings]
	result [a dictionary with entries 'data' and 'isError']
	iterationResults [a list of entries in the structure below]
Note that 'result' is the output of error checking and will be empty if that is off, even with only one iteration.

- Iteration Structure
Each entry in the list of iterationResults above is a dictionary with the following entries:
	worker
	start
	end
	iterationId
	data [a dictionary of the collected data keyed by input box names]
	isError

-----

- makeAuthHeader(apiKey)
Returns an HTTP Authorization header entry (in dictionary format) created from the provided API key. The API key can be accessed from the settings page in Studio.

- removeMetadata(data)
Removes the '_metadata' entry from a dictionary - necessary for transferring data dictionaries form one task to another.

- cleanBaseUrl(url)
Adds 'https://' if it doesn't exist, and removes trailing slashes.

- checkHttpResponse(r)
Prints any HTTP error responses
