Jobs

Note

To get the status of the server at the specified port, you can use the curl or Postman to test your calls.

getJob GET

curl localhost:5003/service/get/:catalog/:module/:procedure/:service/:token

Note

Where token is a uniquely generated token on accessing the app. Default development is always generated

Returns

Array - List of all services that belong to a specific version of a module’s procedure in the catalog

Example

curl localhost:5003/service/get/mytax/0/1/0/development

{
"status": 200,
"message": "Completed job setting",
"data": {
    "exists": false,
    "fully_installed": true,
    "procedure": {
        "error": null,
        "stream": null,
        "running": false,
        "building": false,
        "fully_installed": true,
        "partial_install": true
    },
    "dependencies": [
        {
            "downloading": false,
            "decompressing": false,
            "dependComplete": true,
            "exists": {
                "version": "sha256:4762c42837c0fcffcb36a08398d7aafff57de72584804e797a63bc28ddd9c9b1"
            },
            "error": null,
            "stream": null,
            "fully_installed": fals

startJob POST

localhost:5003/job/start

Note

Where token is a uniquely generated token on accessing the app. Default development is always generated

Starts a job, sets necessary variables, designates services and beings the Docker API communication processes. Multi-service procedures will run all services sequentially

Parameters

  1. module Int - Index of the version of the module

  2. catalog String - Name of the specific Catalog

  3. variables Object - Object of all unique variable names to assign to 1 or more services

  4. token String - Autogenerated token on startup of Basestack

  5. procedure - Int - Index of the procedure for the module. Comprises 1 or more services

  6. service - List of Int - Index of the services for the selected procedure.

Returns

Status - Success or Error on procedure (1 or more service ) completion


Note

Test data download from Gdrive location

Example Body

{
  "service": 0,
    "catalog": "mytax",
    "module":0,
    "procedure": 0,
    "token": "development",
    "variables": {
        "file": {
            "source": "/Users/merribb1/Desktop/test-data2/metagenome/sample_metagenome.fastq"
        },
        "db": {
            "option": 1
        }
    }
}

cancelJob POST

localhost:5003/job/cancel

Note

Where token is a uniquely generated token on accessing the app. Default development is always generated

Stops the running job. Keeps it present in the backend but it no longer runs its services (and cancels any currently running ones)

Parameters

  1. module Int - Index of the version of the module

  2. catalog String - Name of the specific Catalog

  3. token String - Autogenerated token on startup of Basestack

  4. procedure - Int - Index of the procedure for the module. Comprises 1 or more services

Returns

Status - Success or Error on cancelation of the service


setJob POST

localhost:5003/job/set

Note

Where token is a uniquely generated token on accessing the app. Default development is always generated

Sets the variables and creates a job for a given procedure that is being viewed from the application piece of the app

Parameters

  1. module Int - Index of the version of the module

  2. catalog String - Name of the specific Catalog

  3. variables Object - Object of all unique variable names to assign to 1 or more services

  4. token String - Autogenerated token on startup of Basestack

  5. procedure - Int - Index of the procedure for the module. Comprises 1 or more services

  6. services - List of Int - Index of the service(s) for the procedure.

Returns

Status - Success or Error on setting job (1 or more services ) completion

Example Body

setJob ``POST``

{
    "token": "development",
    "procedure": 0,
    "catalog": "mytax",
    "module": 0,
    "services": [ 0 ],
    "variables": {
        "file": {
            "source": "/Users/merribb1/Desktop/test-data2/metagenome/sample_metagenome.fastq"
        },
        "db": {
            "option": 1
        },
        "nodes": {
            "option": 0