Using the REST API in a program

In addition to the browser interface, the PyMapManager server provides a REST interface allowing Map Manager data to be retrieved from almost any programming environment.

In Python using the PyMapManager package

from pymapmanager import mmMap
urlmap = 'rr30a'
m = mmMap(urlmap=urlmap)

What we just did was very powerful. We just loaded a map from an internet REST server!

In pure Python

import json
import urllib2


mytracing = json.load(urllib2.urlopen("url"))

# plot with matplotlib
import matplotlib.pyplot as plt

In Matlab

myimage = webread(url);

In Igor

print fetchurl("")


The following REST routes specify end-points that will return JSON text or images.

We will be using the public user and the rr30a map included in the mmserver/data/ folder.

The links on this page point to a development server that may or may not be running.

Get help

Get a list of maps

Load a map


Get annotation values

Here we will get an x-stat days, a y-stat pDist, and a z-stat z for map segment 0 across all sessions

Get a tracing

Here we will get the x/y/z of a tracing (in um) for all map segments in session 3

Get an image

Here we will get the 20th image in the stack for timepoint 3, channel 2

Get a maximal intensity projection

Here we will get the maximal intensity projection of timepoint 0, channel 2