Neo visualizer REST API

This page is a placeholder. If you are hosting an instance of the Neo Viewer REST API, you may wish to replace this page with a custom one for your organization.

API Documentation

The API follows the Neo container structure: the outermost container is the Block, which contains one or more Segments (a continuous recording period, corresponding for example to one trial or one stimulus presentation). Each segment contains one or more AnalogSignals, each of which may be multi-channel.

Spiketrains, Events and Epochs are not yet supported, but are coming soon!

All endpoints support only GET requests.

/blockdata/

Return a list of all the Blocks in the file.

URL Params

Required:
url=[URL]
Location of data file to be viewed

Success Response:

Code:
200 OK
Content:
{
    "block": [
        {
            "annotations": {
                "key1": "value1",
                "key2": "value2"
            },
            "name": "Name of data block",
            "description": "Description of data block",
            "file_origin": "original_file_name.dat",
            "rec_datetime": "2018-04-01T12:00:00",
            "segments": [
                {
                    "name": "Name of data segment",
                    "annotations": {
                        "key3": "value3",
                        "key4": "value4"
                    },
                    "description": "Description of data segment",
                    "rec_datetime": "2018-04-01T12:00:00",
                    "file_origin": "original_file_name.dat",
                    "analogsignals": [],
                },
                {
                    ...
                },
                ...
            ]
        },
        {
            ...
        },
        ...
    ]
}
                                

Error Responses:

Code:
404 Not Found
Content:
{ error : "File doesn't exist at this URL" }
Code:
415 Unsupported Media Type
Content:
{ error : "Neo is unable to read this file" }

/segmentdata/

Return information about an individual Segment, including metadata about the signals contained in the segment, but not the signal data themselves.

URL Params

Required:
url=[URL]
Location of data file to be viewed
Optional:
segment_id=[integer]
ID of the segment to be viewed

Success Response:

Code:
200 OK
Content:
{
    "name": "Name of the segment",
    "description": "Description of the segment",
    "file_origin": "original_file_name.dat",
    "annotations": {
        "key3": "value3",
        "key4": "value4"
    }
    "analogsignals": [{}, {}, ...],
    "as_prop": [
        {"size": 1000, "name": "signal1_name"},
        {"size": 500, "name": "signal2_name"},
        ...
    ]
}
                                    

Error Responses:

Code:
404 Not Found
Content:
{ error : "File doesn't exist at this URL" }
Code:
415 Unsupported Media Type
Content:
{ error : "Neo is unable to read this file" }

/analogsignaldata/

Return an individual AnalogSignal, both metadata and the data array.

URL Params

Required:
url=[URL]
Location of data file to be viewed
Optional:
segment_id=[integer]
ID of the segment containing the signal
analog_signal_id=[integer]
ID of the signal to be viewed

Success Response:

Code:
200 OK
Content:
{
    "name": "Name of the signal",
    "values": [-71.0, -72.0, -71.5, -71.5, -71.5, -71.0, -72.0, -71.0, -71.5, -71.0, -71.0, -72.0, ...],
    "values_units": "mV",
    "times": [0.0, 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007, 0.0008, 0.0009, 0.001, ...],
    "times_dimensionality": "ms",
    "t_start": 0.0,
    "t_stop": 1000.0,
    "sampling_rate": 10.0,
    "sampling_rate_units": "kHz"
}
                                

Error Responses:

Code:
404 Not Found
Content:
{ error : "File doesn't exist at this URL" }
Code:
415 Unsupported Media Type
Content:
{ error : "Neo is unable to read this file" }