Skip to content

Datalab Metadata

Bart Middag edited this page May 19, 2016 · 3 revisions

Datalab Metadata

A running datalab deployment stores it's data in the JSON format and is accessible by a GET request on certain links. While google has added some new metadata such as health, the original metadata uses jupyter's API

Status

We retrieve the status of a deployment by querying <deployment_url> + '/_ah/health' which returns ok if it's running, any other response we classify as the deployment being down. The underlying code that provides this can be found in datalab/sources/web/datalab/health.ts

Contents

The datalab content tree gets returned if you query <deployment_url> + '/api/contents'.
Originally, this content tree was bound to a specific user, but we have merged the user workspaces so that the content tree is shared between all users as described on the deployment page.

Below is an example of the root of the contents tree, to further explore it, one can call the same url and append the path of a directory, file or notebook.

{  
"mimetype": null,  
"writable": true,  
"name": "",  
"format": "json",  
"created": "2016-05-17T01:37:10.782208+00:00",  
"content":  
    [{  
    "mimetype": null,  
    "writable": true,  
    "name": "datalab",  
    "format": null,  
"created": "2016-05-17T01:37:10.810208+00:00", "content": null, "last_modified": "2016-05-17T01:37:10.810208+00:00", "path": "datalab", "type": "directory"}, {"mimetype": null, "writable": true, "name": "Hello World.ipynb", "format": null, "created": "2016-05-17T01:37:10.782208+00:00", "content": null, "last_modified": "2016-05-17T01:37:10.782208+00:00", "path": "Hello World.ipynb", "type": "notebook"}], "last_modified": "2016-05-17T01:37:10.782208+00:00", "path": "", "type": "directory"
}
Clone this wiki locally