"Seegrid will be due for a migration to confluence on the 1st of August. Any update on or after the 1st of August will NOT be migrated"

API

The GET requests to the API can return HTML or JSON, as requested. The examples below show the results when requesting application/json.

GET /templates

Return all available templates from the catalogue.
{
    "5444759f7ad588681d58bf21": {
        "@id": "http://jupiter-bt.nexus.csiro.au:5000/templates/5444759f7ad588681d58bf21",
        "_id": "5444759f7ad588681d58bf21",
        "dependencies": [
            {
                "@id": "http://jupiter-bt.nexus.csiro.au:5000/toolboxes/5444759f7ad588681d58bf20",
                "description": "Tropical Cyclone Risk Model",
                "homepage": "https://github.com/GeoscienceAustralia/tcrm",
                "name": "TCRM",
                "type": "toolbox"
            }
        ],
        "description": "Run a TCRM job.",
        "homepage": "https://github.com/GeoscienceAustralia/tcrm",
        "metadata": {
            "author": "S. C. Marketplace",
            "created_at": "Mon, 20 Oct 2014 13:38:23 GMT",
            "version": 1
        },
        "name": "TCRM Port Hedland example"
    },
    "544475a07ad588681d58bf23": {
        "@id": "http://jupiter-bt.nexus.csiro.au:5000/templates/544475a07ad588681d58bf23",
        "_id": "544475a07ad588681d58bf23",
        "dependencies": [
            {
                "@id": "http://jupiter-bt.nexus.csiro.au:5000/toolboxes/5444759f7ad588681d58bf22",
                "description": "ANUGA Hydrodynamic Inundation Modelling",
                "homepage": "https://anuga.anu.edu.au",
                "name": "ANUGA",
                "type": "toolbox"
            }
        ],
        "description": "Run an ANUGA job around Busselton",
        "homepage": "https://github.com/GeoscienceAustralia/tcrm",
        "metadata": {
            "author": "S. C. Marketplace",
            "created_at": "Mon, 20 Oct 2014 13:38:24 GMT",
            "version": 1
        },
        "name": "ANUGA Busselton example"
    }
}

POST /templates

GET /templates/:id

Return a detailed description of the template with id.
<i><b></b></i>{
    // ID for the template should be a resolvable URL
    "@id": "http://example.org/templates/abcdefghijklmnop",

    // Basic information about the template
    //
    // name        -- (string) short name
    // description -- (string) description of the scientific code
    // homepage    -- (optional string url) webpage with more information
    //
    "name": "toolbox1",
    "description": "lorem ipsum...",
    "homepage": "http://...",

    // List of extra dependencies required to run the template. This
    // should only include dependencies that are not already supplied
    // by the toolbox.
    //
    // Currently system packages and python packages from pypi are
    // supported as dependencies specifications.
    //
    // Each dependency is specified by an object, whose "type" entry
    // indicates how to handle the dependency.
    //
    // A package (system or python) is specified by name and
    // version. A toolbox dependency is specified using a link.
    //
    // A set of python dependencies can be specified by supplying a
    // "path" entry for a dependency of type "python". It should be
    // the path to a requirements.txt file in the source
    // codebase. Either "path" or "name" (and "version") should be
    // specified for a python entry.
    //
    // The list of dependencies implies an order, but we don't
    // guarantee that they will be installed in order at
    // present. System packages will be installed before python
    // dependencies, so any requirements for the python packages
    // should be included explicitly as system dependencies.
    //
    // type    -- (string enum) type of dependency (system, python, toolbox)
    // name    -- (string) package name
    // version -- (string) package version
    // uri     -- (string url) id of the toolbox we depend on
    //
    "dependencies": [
        {
            "type": "system",
            "name": "package1",
            "version": "1.2.3"
        },
        {
            "type": "python",
            "name": "package1",
            "version": "1.2.3"
        }
        {
            "type": "toolbox",
            "uri": "http://example.org/toolbox/abcde"
        }
    ],

    // This entry includes metadata about the SCM entry itself.
    //
    // author       -- (string) who submitted the template
    // version      -- (string) generated version number
    // create_at    -- (string datetime) date template was submitted to the SCM
    "metadata": {
        "author": "Joe Bloggs",
        "version": "1.0",
        "created_at": "20140101"
    }
}

GET /toolboxes

Return all the toolboxes in the catalogue.
 {
    "5444759f7ad588681d58bf20": {
        "@id": "http://jupiter-bt.nexus.csiro.au:5000/toolboxes/5444759f7ad588681d58bf20",
        "_id": "5444759f7ad588681d58bf20",
        "description": "Tropical Cyclone Risk Model",
        "homepage": "https://github.com/GeoscienceAustralia/tcrm",
        "license": "https://github.com/GeoscienceAustralia/tcrm/blob/master/LICENSE",
        "metadata": {
            "author": "S. C. Marketplace",
            "created_at": "Mon, 20 Oct 2014 13:38:23 GMT",
            "version": 1
        },
        "name": "TCRM"
    },
    "5444759f7ad588681d58bf22": {
        "@id": "http://jupiter-bt.nexus.csiro.au:5000/toolboxes/5444759f7ad588681d58bf22",
        "_id": "5444759f7ad588681d58bf22",
        "description": "ANUGA Hydrodynamic Inundation Modelling",
        "homepage": "https://anuga.anu.edu.au",
        "license": "https://anuga.anu.edu.au/svn/anuga/trunk/anuga_core/source/anuga/LICENSE.txt",
        "metadata": {
            "author": "S. C. Marketplace",
            "created_at": "Mon, 20 Oct 2014 13:38:23 GMT",
            "version": 1
        },
        "name": "ANUGA"
    }
}

POST /toolboxes

GET /toolboxes/:id

Return a detailed description of the toolbox with id.
{
    // ID of this toolbox entry, should be a URL to retrieve the entry
    "@id": "http://example.org/toolbox/abcde",

    // Basic information about the scientific code
    //
    // name        -- (string) short name
    // description -- (string) description of the scientific code
    // homepage    -- (string url) homepage of the code
    // license     -- (string) url or description of the code license
    //
    "name": "toolbox1",
    "description": "lorem ipsum...",
    "homepage": "http://...",
    "license": "http://...",

    // Source of the scientific code this toolbox implements.
    //
    // Note that a git branch is (probably) not fixed, so a tag should
    // be preferred in order to be able to always retrieve the same
    // version of the source.
    //
    // type     -- (string enum) type of repository (git, svn)
    // url      -- (string url) URL to check out from the repository
    // checkout -- (string) checkout target (git branch/tag, svn revision)
    //
    "source": {
        "type": "git"|"svn",
        "url": "http://...",
        "branch": "foo",
        "tag": "foo"
    },

    // List of dependencies required to run the code.
    //
    // Currently system packages and python packages from pypi are
    // supported as dependencies specifications.
    //
    // Each dependency is specified by an object, whose "type" entry
    // indicates how to handle the dependency.
    //
    // A package (system or python) is specified by name and version.
    //
    // A set of python dependencies can be specified by supplying a
    // "path" entry for a dependency of type "python". It should be
    // the path to a requirements.txt file in the source
    // codebase. Either "path" or "name" (and "version") should be
    // specified for a python entry.
    //
    // The list of dependencies implies an order, but we don't
    // guarantee that they will be installed in order at
    // present. System packages will be installed before python
    // dependencies, so any requirements for the python packages
    // should be included explicitly as system dependencies.
    //
    // type    -- (string enum) type of dependency (system, python, toolbox)
    // name    -- (string) package name
    // version -- (string) package version
    // path    -- (string) path to requirements.txt
    // uri     -- (string url) id of another toolbox we depend on
    //
    "dependencies": [
        {
            "type": "system",
            "name": "package1",
            "version": "1.2.3"
        },
        {
            "type": "python",
            "name": "package1",
            "version": "1.2.3"
        },
        {
            "type": "python",
            "path": "/path/to/requirements.txt"
        }
        {
            "type": "toolbox",
            "uri": "http://example.org/toolbox/abcde"
        }
    ],

    // This entry includes metadata about the SCM entry itself.
    //
    // author  -- (string) who submitted the toolbox
    // version -- (string) generated version number
    // date    -- (string datetime) date toolbox was submitted to the SCM
    "metadata": {
        "author": "Joe Bloggs",
        "version": "1.0",
        "created_at": "20140101"
    }
}


-- GeoffreySquire - 21 Oct 2014
Topic revision: r2 - 13 Feb 2015, RyanFraser
 

Current license: All material on this collaboration platform is licensed under a Creative Commons Attribution 3.0 Australia Licence (CC BY 3.0).