tmserver.api package

Module contents

RESTful API.

Submodules

tmserver.api.acquisition module

API view functions for querying acquisition resources.

tmserver.api.acquisition.add_microcope_file(*args, **kwargs)
POST /api/experiments/(string: experiment_id)/acquisitions/(string: acquisition_id)/microscope-file

Upload a single file via HTTP.

Example response:

Content-Type: application/json

{
    "message": "ok"
}
Request Headers:
 
Status Codes:
tmserver.api.acquisition.check_file_validity(*args, **kwargs)
POST /api/experiments/(string: experiment_id)/acquisitions/(string: acquisition_id)/upload/validity-check

Check if a collection of image or metadata file names have the correct format for the experiment’s microscope type. If this is not the case, the files can’t be analyzed and shouldn’t be uploaded.

Example request:

Content-Type: application/json

{
    files: ["right_format_1.png", "right_format_2.png", "wrong_format.png"...]
}

Example response:

Content-Type: application/json

{
    "is_valid": [true, true, false, ...]
}
Request Headers:
 
Status Codes:
tmserver.api.acquisition.create_acquisition(*args, **kwargs)
POST /api/experiments/(string: experiment_id)/acquisitions

Create a new Acquisition.

Example request:

Content-Type: application/json

{
    "name": "Acquisition XY",
    "plate_name": "Plate XY"
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": "MQ==",
        "name": "Plate XY",
        "description": "Optional description"
        "status": "WAITING"
    }
}
Request Headers:
 
Status Codes:
tmserver.api.acquisition.delete_acquisition(*args, **kwargs)
DELETE /api/experiments/(string: experiment_id)/acquisitions/(string: acquisition_id)

Delete a specific Acquisition.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok"
}
Request Headers:
 
Status Codes:
tmserver.api.acquisition.get_acquisition(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/acquisitions/(string: acquisition_id)

Get a specific acquisition object.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": "MQ==",
        "name": "Acquisition XY",
        "description": "",
        "status": "UPLOADING" | "COMPLETE" | "WAITING"
    }
}
Request Headers:
 
Status Codes:
tmserver.api.acquisition.get_acquisitions(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/acquisitions

Get acquisitions for the specified experiment.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "id": "MQ==",
            "name": "Acquisition XY",
            "description": "",
            "status": "UPLOADING" | "COMPLETE" | "WAITING"
        },
        ...
    ]
}
Query Parameters:
 
  • plate_name – name of a parent plate (optional)
  • name – name of an acquistion (optional)
Request Headers:
 
Status Codes:
tmserver.api.acquisition.get_microscope_image_file_information(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/acquisitions/(string: acquisition_id)/images

Get information about image files registerd for the specified Acquisition

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "name": "some-file-name.png",
            "status": "UPLOADING" | "WAITING" | "COMPLETE" | "FAILED"
        },
        ...
    ]
}
Request Headers:
 
Status Codes:
tmserver.api.acquisition.get_microscope_metadata_file_information(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/acquisitions/(string: acquisition_id)/metadata

Get information about metadata files registered for the specified Acquisition

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "name": "some-file-name.png",
            "status": "UPLOADING" | "WAITING" | "COMPLETE" | "FAILED"
        },
        ...
    ]
}
Request Headers:
 
Status Codes:
tmserver.api.acquisition.get_uploaded_file_count(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/acquisitions/(string: acquisition_id)/upload/count

Get the number of successfully uploaded microscope files for the specified Acquisition.

Example response:

Content-Type: application/json

{
    "data": 132
}
Request Headers:
 
Status Codes:
tmserver.api.acquisition.register_upload(*args, **kwargs)
POST /api/experiments/(string: experiment_id)/acquisitions/(string: acquisition_id)/upload/register

Notify the server that an upload for this acquisition is imminent. The client has to wait for this response before uploading files.

Example request:

Content-Type: application/json

{
    "files": ["file1.png", "file2.png", ...]
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": ["file1.png", "file2.png", ...]
}
Request Headers:
 
Status Codes:
tmserver.api.acquisition.update_acquisition(*args, **kwargs)
PUT /api/experiments/(string: experiment_id)/acquisitions/(string: acquisition_id)

Update an Acquisition.

Example request:

Content-Type: application/json

{
    "name": "New Name"
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok"
}
Request Headers:
 
Status Codes:

tmserver.api.channel module

API view functions for querying channel resources.

tmserver.api.channel.get_channel(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/channels/(string: channel_id)

Get a channel.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": "MQ==",
        "name": "Channel 1",
        "bit_depth": 8,
        "layers": [
            {
                "id": "MQ==",
                "max_zoom": 12,
                "tpoint": 0,
                "zplane": 0,
                "max_intensity": 6056,
                "min_intensity": 0,
                "experiment_id": "MQ==",
                "image_size": {
                    "width": 22000,
                    "height": 10000
                }
            },
            ...
        ]
    }
}
Request Headers:
 
Status Codes:
tmserver.api.channel.get_channels(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/channels

Get channels for a specific experiment.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "id": "MQ==",
            "name": "Channel 1",
            "bit_depth": 8,
            "layers": [
                {
                    "id": "MQ==",
                    "max_zoom": 12,
                    "tpoint": 0,
                    "zplane": 0,
                    "max_intensity": 6056,
                    "min_intensity": 0,
                    "image_size": {
                        "width":  2200,
                        "height": 2100
                    }
                },
                ...
            ]
        },
        ...
    ]
}
Query Parameters:
 
  • name – name of a channel (optional)
Request Headers:
 
Status Codes:
tmserver.api.channel.update_channel(*args, **kwargs)
PUT /api/experiments/(string: experiment_id)/channels/(string: channel_id)

Update a Channel.

Example request:

Content-Type: application/json

{
    "name": "New Name"
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok"
}
Request Headers:
 
Status Codes:

tmserver.api.cycle module

API view functions for querying cycle resources.

tmserver.api.cycle.get_cycle(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/cycles/(string: cycle_id)

Get a cycle.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": "MQ==",
        "index": 0,
        "tpoint": 0
    }
}
Request Headers:
 
Status Codes:
tmserver.api.cycle.get_cycles(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/cycles

Get cycles for the specified experiments.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "id": "MQ==",
            "index": 0,
            "tpoint": 0
        },
        ...
    ]
}
Query Parameters:
 
  • plate_name – the name of the plate (optional)
  • index – the cycle’s index (optional)
Request Headers:
 
Status Codes:

tmserver.api.experiment module

API view functions for experiment resources.

tmserver.api.experiment.create_experiment(*args, **kwargs)
POST /api/experiments

Create a new Experiment.

Example request:

Content-Type: application/json

{
    "name": "Experiment XY",
    "description": "Optional description",
    "workflow_type": "canonical",
    "plate_format": "0",
    "plate_acquisition_mode": "multiplexing",
    "microscope_type": "cellvoyager"
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": "MQ==",
        "name": "Experiment XY",
        "description": "Optional description",
        "user": "Testuser"
    }
}
Request Headers:
 
Status Codes:
tmserver.api.experiment.delete_experiment(*args, **kwargs)
DELETE /api/experiments/(string: experiment_id)

Delete a specific Experiment.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok"
}
Request Headers:
 
Status Codes:
tmserver.api.experiment.get_acquisition_modes(*args, **kwargs)
GET /api/acquisition_modes

Get a list of all implemented plate acquisition modes.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": ["basic", "multiplexing"]
}
Request Headers:
 
Status Codes:
tmserver.api.experiment.get_experiment(*args, **kwargs)
GET /api/experiments/(string: experiment_id)

Get the experiment with the hashed id experiment_id.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": "MQ==",
        "name": "Experiment XY",
        "description": "Optional experiment description",
        "user": "Testuser"
    }
}
Request Headers:
 
Status Codes:
tmserver.api.experiment.get_experiments(*args, **kwargs)
GET /api/experiments

Get experiments for the currently logged in user.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "id": "MQ==",
            "name": "Experiment XY",
            "description": "Optional experiment description",
            "user": "Testuser"
        },
        ...
    ]
}
Query Parameters:
 
  • name – name of an experiment (optional)
Request Headers:
 
Status Codes:
tmserver.api.experiment.get_microscope_types(*args, **kwargs)
GET /api/microscope_types

Get a list of implemented microscope types.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        "visiview", "cellvoyager"
    ]
}
Request Headers:
 
Status Codes:

See also

tmlib.workflow.metaconfig.SUPPORTED_MICROSCOPE_TYPES

tmserver.api.experiment.get_workflow_types(*args, **kwargs)
GET /api/workflow_types

Get a list of implemented workflow types.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        "canonical", "multiplexing"
    ]
}
Request Headers:
 
Status Codes:

See also

tmlib.workflow.get_workflow_type_information()

tmserver.api.experiment.update_experiment(*args, **kwargs)
PUT /api/experiments/(string: experiment_id)

Update an Experiment.

Example request:

Content-Type: application/json

{
    "name": "New Name"
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok"
}
Request Headers:
 
Status Codes:

tmserver.api.feature module

API view functions for querying feature resources.

tmserver.api.feature.add_feature_values(*args, **kwargs)
POST /api/experiments/(string: experiment_id)/mapobject_types/(string: mapobject_type_id)/feature-values

Add FeatureValues for every Mapobject of the given MapobjectType at a given Site and time point. Feature values must be provided in form of a n*x*p array, where n are the number of objects (rows) and p the number of features (columns). Rows are identifiable by labels and columns by names. Provided labels must match the label of segmented objects.

Example request:

Content-Type: application/json

{
    "plate_name": "plate1",
    "well_name": "D04",
    "well_pos_y": 0,
    "well_pos_x": 2,
    "tpoint": 0
    "names": ["feature1", "feature2", "feature3"],
    "labels": [1, 2],
    "values" [
        [2.45, 8.83, 4.37],
        [5.67, 7.21, 1.58]
    ]
}
Request Headers:
 
Status Codes:
tmserver.api.feature.delete_feature(*args, **kwargs)
DELETE /api/experiments/(string: experiment_id)/features/(string: feature_id)

Delete a specific Feature.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok"
}
Request Headers:
 
Status Codes:
tmserver.api.feature.get_feature_values(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/mapobject_types/(string: mapobject_type_id)/feature-values

Get FeatureValues for objects of the given MapobjectType in form of a CSV table with a row for each Mapobject and a column for each Feature.

Query Parameters:
 
  • plate_name – name of the plate (optional)
  • well_name – name of the well (optional)
  • well_pos_x – x-coordinate of the site within the well (optional)
  • well_pos_y – y-coordinate of the site within the well (optional)
  • tpoint – time point (optional)
Request Headers:
 
Status Codes:

Note

The table is send in form of a CSV stream with the first row representing column names.

tmserver.api.feature.get_metadata(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/mapobject_types/(string: mapobject_type_id)/metadata

Get positional information for the given MapobjectType as a n*x*p feature table, where n is the number of mapobjects (Mapobject) and p is the number of metadata attributes.

Query Parameters:
 
  • plate_name – name of the plate (optional)
  • well_name – name of the well (optional)
  • well_pos_x – x-coordinate of the site within the well (optional)
  • well_pos_y – y-coordinate of the site within the well (optional)
  • tpoint – time point (optional)
Request Headers:
 
Status Codes:

Note

The table is send in form of a CSV stream with the first row representing column names.

tmserver.api.feature.update_feature(*args, **kwargs)
PUT /api/experiments/(string: experiment_id)/features/(string: feature_id)

Update a Feature.

Example request:

Content-Type: application/json

{
    "name": "New Name"
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok"
}
Status Codes:

tmserver.api.file module

API view functions for querying file resources.

tmserver.api.file.get_channel_image_file(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/channels/(string: channel_id)/image-files

Get a specific image belonging to a channel.

Example response:

HTTP/1.1 200 OK
Content-Type: image/png
Query Parameters:
 
  • plate_name – name of the plate (required)
  • cycle_index – cycle’s index (required)
  • well_name – name of the well (required)
  • well_pos_x – x-coordinate of the site within the well (optional)
  • well_pos_y – y-coordinate of the site within the well (optional)
  • tpoint – time point (required)
  • zplane – z-plane (required)
  • illumcorr – correct image for illumination artifacts (optional)
  • align – align image relative to reference cycle (optional)
Request Headers:
 
Status Codes:

tmserver.api.layer module

API view functions for querying layer and tile resources.

tmserver.api.layer.get_channel_layers(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/channel_layers

Get channel layers.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "id": "MQ==",
            "max_zoom": 12,
            "tpoint": 0,
            "zplane": 0,
            "max_intensity": 6056,
            "min_intensity": 0,
            "experiment_id": "MQ==",
            "image_size": {
                "width":  2200,
                "height": 2100
            }
        },
        ...
    ]
}
Query Parameters:
 
  • channel_name – the name of the channel (optional)
  • tpoint – the time point associated with this layer (optional)
  • zplane – the zplane of this layer (optional)
Request Headers:
 
Status Codes:
tmserver.api.layer.get_segmentation_layers(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/segmentation_layers

Get segmentation layers.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "id": "MQ==",
            "tpoint": 0,
            "zplane": 0,
            "image_size": {
                "width":  2200,
                "height": 2100
            }
        },
        ...
    ]
}
Query Parameters:
 
  • mapobject_type_name – the name of the mapobject type (optional)
  • tpoint – the time point associated with this layer (optional)
  • zplane – the zplane of this layer (optional)
Request Headers:
 
Status Codes:

tmserver.api.mapobject module

API view functions for querying mapobject resources.

tmserver.api.mapobject.add_segmentations(*args, **kwargs)
POST /api/experiments/(string: experiment_id)/mapobject_types/(string: mapobject_type_id)/segmentations

Provide segmentations in form of a labeled 2D pixels array for a given Site. A Mapobject and MapobjectSegmentation will be created for each labeled connected pixel component in image.

Request Headers:
 
Status Codes:
Query Parameters:
 
  • image – 2D pixels array (required)
  • plate_name – name of the plate (required)
  • well_name – name of the well (required)
  • well_pos_x – x-coordinate of the site within the well (required)
  • well_pos_y – y-coordinate of the site within the well (required)
  • tpoint – time point (required)
  • zplane – z-plane (required)
tmserver.api.mapobject.create_mapobject_type(*args, **kwargs)
POST /api/experiments/(string: experiment_id)/mapobject_type

Create a MapobjectType

Example request:

Content-Type: application/json

{
    "name": "Cells"
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": "MQ==",
        "name": "Cells",
        "features": [
            {
                "id": "MQ==",
                "name": "Cell_Area"
            },
            ...
        ]
    }
}
Status Codes:
tmserver.api.mapobject.delete_mapobject_type(*args, **kwargs)
DELETE /api/experiments/(string: experiment_id)/mapobject_types/(string: mapobject_type_id)

Delete a specific MapobjectType.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok"
}
Request Headers:
 
Status Codes:
tmserver.api.mapobject.get_features(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/mapobject_types/(string: mapobject_type_id)/features

Get a list of feature objects supported for this experiment.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "id": "MQ==",
            "name": "Morpholgy_Area"
        },
        ...
    ]
}
Query Parameters:
 
  • name – name of a feature (optional)
Request Headers:
 
Status Codes:
tmserver.api.mapobject.get_mapobject_types(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/mapobject_types

Get the supported mapobject types for a specific experiment.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "id": "MQ==",
            "name": "Cells",
            "features": [
                {
                    "id": "MQ==",
                    "name": "Cell_Area"
                },
                ...
            ]
        },
        ...
    ]
}
Query Parameters:
 
  • name – name of a mapobject type (optional)
Request Headers:
 
Status Codes:
tmserver.api.mapobject.get_segmentations(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/mapobject_types/(string: mapobject_type_id)/segmentations

Get segmentations for each Mapobject contained within the specified Site. Segmentations are provided in form of a 2D labeled array, where pixel values encode object identity with unsigned integer values and background pixels are zero.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
       [1205, 7042, 4438, 7446, 3213, 8773, 5445, 9884, 8326, 6357],
       [4663, 2740, 9954, 5187,  309, 8029, 4502, 4927, 5259, 1802],
       [8117, 8489, 8495, 1194, 9788, 8182, 5431, 9969, 5931, 6490],
       [7974, 3990, 8892, 1866, 7890, 1147, 9630, 3687, 1565, 3613],
       [3977, 7318, 5252, 3270, 6746,  822, 7035, 5184, 7808, 4013],
       [4380, 6719, 5882, 4279, 7996, 2139, 1760, 2548, 3753, 5511],
       [7829, 8825,  224, 1192, 9296, 1663, 5213, 9040,  463, 9080],
       [6922, 6781, 9776, 9002, 6992, 8887, 9672, 8500, 1085,  563]
    ]
}
Request Headers:
 
Status Codes:
Query Parameters:
 
  • plate_name – name of the plate (required)
  • well_name – name of the well (required)
  • well_pos_x – x-coordinate of the site within the well (required)
  • well_pos_y – y-coordinate of the site within the well (required)
  • tpoint – time point (required)
  • zplane – z-plane (required)
tmserver.api.mapobject.update_mapobject_type(*args, **kwargs)
PUT /api/experiments/(string: experiment_id)/mapobject_types/(string: mapobject_type_id)

Update a MapobjectType

Example request:

Content-Type: application/json

{
    "name": "New Name"
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok"
}
Status Codes:

tmserver.api.plate module

API view functions for querying plate resources.

tmserver.api.plate.create_plate(*args, **kwargs)
POST /api/experiments/(string: experiment_id)/plates

Create a new Plate.

Example request:

Content-Type: application/json

{
    "name": "Plate XY",
    "description": "Optional description"
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": "MQ==",
        "name": "Plate XY",
        "description": "Optional description",
        "acquisitions": [],
        "status": "WAITING"
    }
}
Request Headers:
 
Status Codes:
tmserver.api.plate.delete_plate(*args, **kwargs)
DELETE /api/experiments/(string: experiment_id)/plates/(string: plate_id)

Delete a specific Plate.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok"
}
Request Headers:
 
Status Codes:
tmserver.api.plate.get_plate(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/plates/(string: plate_id)

Get a plate given its id and the it of its parent experiment.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": "MQ==",
        "name": "Plate XY",
        "description": "Optional description",
        "acquisitions": [
            {
                "id": "MQ==",
                "name": "Acquisition XY",
                "description": "",
                "status": "UPLOADING" | "COMPLETE" | "WAITING"
            },
            ...
        ],
        "status": "UPLOADING" | "COMPLETE" | "WAITING"
    }
}
Request Headers:
 
Status Codes:
tmserver.api.plate.get_plates(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/plates

Get plates for the specified experiment.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "id": "MQ==",
            "name": "Plate XY",
            "description": "Optional description",
            "acquisitions": [
                {
                    "id": "MQ==",
                    "name": "Acquisition XY",
                    "description": "",
                    "status": "UPLOADING" | "COMPLETE" | "WAITING"
                },
                ...
            ],
            "status": "UPLOADING" | "COMPLETE" | "WAITING"
        },
        ...
    ]
}
Query Parameters:
 
  • name – name of a plate (optional)
Request Headers:
 
Status Codes:
tmserver.api.plate.update_plate(*args, **kwargs)
PUT /api/experiments/(string: experiment_id)/plates/(string: plate_id)

Update a Plate.

Example request:

Content-Type: application/json

{
    "name": "New Name"
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok"
}
Request Headers:
 
Status Codes:

tmserver.api.site module

API view functions for querying site resources.

tmserver.api.site.get_site(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/sites/(string: site_id)

Get a Site.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": "MQ==",
        "y": 0,
        "x": 1,
        "height": 2230,
        "width": 2140
    }

}
Request Headers:
 
Status Codes:
tmserver.api.site.get_sites(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/sites

Get sites.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "id": "MQ==",
            "y": 0,
            "x": 1,
            "height": 2230,
            "width": 2140
        },
        ...
    ]

}
Query Parameters:
 
  • plate_name – name of a plate (optional)
  • well_name – name of a well (optional)
  • well_pox_y – y-coordinate of a site relative to its well (optional)
  • well_pox_x – x-coordinate of a site relative to its well (optional)
Request Headers:
 
Status Codes:

tmserver.api.tile module

API view functions for querying tile resources.

tmserver.api.tile.get_channel_layer_tile(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/channel_layer/(string: channel_layer_id)/tiles

Sends a ChannelLayerTile <tmlib.models.tile.ChannelLayerTile.

Query Parameters:
 
  • x – zero-based x coordinate
  • y – zero-based y coordinate
  • z – zero-based zoom level index
tmserver.api.tile.get_segmentation_layer_label_tile(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/segmentation_layers/(string: segmentation_layer_id)/labeled_tiles

Sends each the geometric representation of each MapobjectSegmentation as a GeoJSON feature collection that intersect with the given Pyramid tile at position x, y, z together with the LabelValues for the specified tool Result.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "type": "FeatureCollection",
    "features": [
        "type": "Feature",
        "id": 1,
        "geometry": {
            "type": "Polygon",
            "coordinates": [[
                [x1, y1], [x2, y2], ...
            ]]
        },
        "properties": {
            "label": 123
        }
        ...
    ]
}
Query Parameters:
 
  • x – zero-based x coordinate
  • y – zero-based y coordinate
  • z – zero-based zoom level index
Status Codes:
tmserver.api.tile.get_segmentation_layer_tile(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/segmentation_layers/(string: segmentation_layer_id)/tile

Sends each the geometric representation of each MapobjectSegmentation as a GeoJSON feature collection that intersect with the given Pyramid tile at position x, y, z.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "type": "FeatureCollection",
    "features": [
        "type": "Feature",
        "id": 1,
        "geometry": {
            "type": "Polygon",
            "coordinates": [[
                [x1, y1], [x2, y2], ...
            ]]
        },
        "properties": {
            "type": "Cells"
        }
        ...
    ]
}
Query Parameters:
 
  • x – zero-based x coordinate
  • y – zero-based y coordinate
  • z – zero-based zoom level index
Status Codes:

tmserver.api.tools module

API view functions for querying tools resources as well as related result and plot resources.

tmserver.api.tools.delete_tool_result(*args, **kwargs)
DELETE /api/experiments/(string: experiment_id)/tools/result/(string: tool_result_id)

Delete a tool result.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok"
}
Status Codes:
tmserver.api.tools.get_tool_job_log(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/tools/jobs/(string: job_id)/log

Get the log output of a ToolJob for a given ToolResult.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "stdout": "bla bla bla",
        "stderr": ""
    }
}
Status Codes:
tmserver.api.tools.get_tool_jobs(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/tools/jobs

Get the status of each ToolJob processing a tool request.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "id": "dG1hcHM3NzYxOA==",
            "name": "tool_Heatmap",
            "submission_id": 4,
            "submitted_at": "2017-04-01 10:42:10",
            "state": "RUNNING",
            "exitcode": null,
            "memory": 1024,
            "time": "1:21:33",
            "cpu_time": "1:14:12"
        },
        ...
    ]
}
Query Parameters:
 
  • submission_id – numeric ID of the submission for which the job status should be retrieved (optional)
  • tool_name – name of a tool for which job status should be retrieved (optional)
  • state – state jobs should have, e.g. RUNNING (optional)
Status Codes:
tmserver.api.tools.get_tool_result(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/tools/results/(string: tool_result_id)

Get the result of a previous tool request including a label layer that can be queried for tiled cell labels as well as optional plots.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": "MQ==",
        "name": "Cluster Result 1",
        "submission_id": 117,
        "layer": {
            "id": "MQ==",
            "type": "HeatmapLayer",
            "attributes": {
                "min": 0,
                "max": 2414
            }
        },
        "plots": []
    }
}
Status Codes:
tmserver.api.tools.get_tool_results(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/tools/result

Get the result of a previous tool request including a label layer that can be queried for tiled cell labels as well as optional plots.

Example request:

Content-Type: application/json

{
    "submission_id": 117
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "id": "MQ==",
            "name": "Cluster Result 1",
            "submission_id": 117,
            "layer": {
                "id": "MQ==",
                "type": "HeatmapLayer",
                "attributes": {
                    "min": 0,
                    "max": 2414
                }
            },
            "plots": []
        },
        ...
    ]
}
Query Parameters:
 
  • submission_id – ID of the corresponding submission (optional)
  • name – name of the tool result (optional)
Status Codes:
tmserver.api.tools.get_tools(*args, **kwargs)
GET /api/tools

Get a list of supported tools.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "name": "Cluster Tool",
            "icon": "<span>CLU</span>",
            "description",
            "methods": [...]
        },
        ...
    ]
}
Request Headers:
 
Status Codes:
tmserver.api.tools.process_tool_request(*args, **kwargs)
POST /api/experiments/(string: experiment_id)/tools/request

Processes a generic tool request sent by the client.

Example request:

Content-Type: application/json

{
    "tool_name": "Cluster Tool",
    "payload": any object,
    "session_uuid": string
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "submission_id": "MQ=="
    }
}
Request Headers:
 
Status Codes:
tmserver.api.tools.update_tool_result(*args, **kwargs)
PUT /api/experiments/(string: experiment_id)/tools/result/(string: tool_result_id)

Update a ToolResult.

Example request:

Content-Type: application/json

{
    "name": "New Name"
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok"
}
Status Codes:

tmserver.api.user module

tmserver.api.well module

API view functions for querying well resources.

tmserver.api.well.get_well(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/wells/(string: well_id)

Get a Well.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": "MQ==",
        "name": "D04",
        "description": ""
    }

}
Request Headers:
 
Status Codes:
tmserver.api.well.get_wells(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/wells

Get wells for the specified experiments.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "id": "MQ==",
            "name": "D04",
            "description": ""
        },
        ...
    ]

}
Query Parameters:
 
  • plate_name – name of a plate (optional)
  • name – name of a well (optional)
Request Headers:
 
Status Codes:
tmserver.api.well.update_well_description(*args, **kwargs)
PUT /api/experiments/(string: experiment_id)/wells/(string: well_id)

Update description of a Well.

Example request:

Content-Type: application/json

{
    "description": {}
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok"
}
Request Headers:
 
Status Codes:

tmserver.api.workflow module

API view functions for querying workflow resources.

tmserver.api.workflow.get_job_log(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/workflow/jobs/(string: job_id)/log

Get the log output of a WorkflowStepJob.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "stdout": string,
        "stderr": string
    }
}
Request Headers:
 
Status Codes:
tmserver.api.workflow.get_jterator_project(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/workflow/jtproject

Get a jterator project consisting of a PipelineDescription and an optional HandleDescriptions. for each module of the pipeline.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "pipeline": {
            "input": {
                "channels": [
                    {
                        "name": "wavelength-1"
                    }
                ],
                "objects": []
            },
            "output": {
                "objects": []
            },
            "pipeline": [
                {
                    "handles": ../handles/module1.handles.yaml,
                    "source": module1.py
                    "active": true
                }
            ]

        },
        "handles": {
            "module1": {
                "version": 0.1.0,
                "input": [],
                "output": []
            },
            ...
        }
    }
}
Request Headers:
 
Status Codes:
tmserver.api.workflow.get_workflow_description(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/workflow/description

Get the persisted WorkflowDescription.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {...}
}
Request Headers:
 
Status Codes:
tmserver.api.workflow.get_workflow_jobs(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/workflow/jobs

Query the status of jobs for a given WorkflowStep.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "id": "dG1hcHM3NzYxOA==",
            "name": "metaconfig_run_000001",
            "state": "RUNNING",
            "exitcode": 0,
            "memory": 1024,
            "time": "1:21:33"
            "cpu_time": "1:14:12"
        },
        ...
    ]
}
Query Parameters:
 
  • step_name – name of the workflow step for which jobs should be queried (required)
  • step_phase – name of the workflow step phase for which jobs should be queried (optional)
  • name – name of the job (optional)
  • index – the index of the first job queried (optional)
  • batch_size – the amount of job stati to return starting from index (optional)
Request Headers:
 
Status Codes:

Note

Parameters index and batch_size can only be used togethger. Parameters name and step_phase are exclusive and cannot be combined with index and batch_size.

tmserver.api.workflow.get_workflow_status(*args, **kwargs)
GET /api/experiments/(string: experiment_id)/workflow/status

Query the status for the currently running workflow for the specified experiment.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": status # TODO
}
Query Parameters:
 
  • depth – number of subtasks that should be queried (optional, default: 2)
Request Headers:
 
Status Codes:
tmserver.api.workflow.kill_workflow(*args, **kwargs)
POST /api/experiments/(string: experiment_id)/workflow/kill

Kill all jobs of the currently running workflow.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok"
}
Request Headers:
 
Status Codes:
tmserver.api.workflow.resubmit_workflow(*args, **kwargs)
POST /api/experiments/(string: experiment_id)/workflow/resubmit

Resubmit a workflow for an experiment providing a new WorkflowDescription in YAML format and optionally an index of a stage at which the workflow should be resubmitted.

Example request:

Content-Type: application/json

{
    "description": {...},
    "index": 1
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok",
    "submission_id": 1
}
Request Headers:
 
Status Codes:
tmserver.api.workflow.submit_workflow(*args, **kwargs)
POST /api/experiments/(string: experiment_id)/workflow/submit

Submit a workflow based on a WorkflowDescription. Please refer to the respective class documention for more details on how to structure such a description object.

Example request:

Content-Type: application/json

{
    "description": {...}
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok",
    "submission_id": 1
}
Request Headers:
 
Status Codes:
tmserver.api.workflow.update_project(*args, **kwargs)
PUT /api/experiments/(string: experiment_id)/workflow/jtproject

Update a jterator project consisting of a PipelineDescription and an optional HandleDescriptions for each module in the pipeline.

Example request:

Content-Type: application/json

{
    "pipeline": {
        "input": {
            "channels": [
                {
                    "name": "wavelength-1"
                }
            ]
        },
        "output": {},
        "pipeline": [
            {
                "handles": ../handles/module1.handles.yaml,
                "source": module1.py
                "active": true
            }
        ]

    },
    "handles": {
        "module1": {
            "version": 0.1.0,
            "input": [],
            "output": []
        },
        ...
    }
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok"
}
Request Headers:
 
Status Codes:
tmserver.api.workflow.update_workflow_description(*args, **kwargs)
POST /api/experiments/(string: experiment_id)/workflow/description

Upload a WorkflowDescription.

Example request:

Content-Type: application/json

{
    "description": {...}
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "message": "ok"
}
Request Headers:
 
Status Codes: