Downloading an Ontology's Structure Graph

Allows downloading of an Ontology's StructureGraph as a JSON or XML document.

Prototype

http://api.brain-map.org/api/v2/structure_graph_download/[StructureGraph.id].[xml|json]

Examples

Review a list of current Atlases, download one's ontology, then download its Nissl images.

    First, retrieve a list of current atlases:

http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::Atlas,
rma::include,structure_graph(ontology[has_atlas$eq'true'])

    Second, choose a current atlas, such as the Mouse, P56 Sagittal Atlas, and download its Ontology's StructureGraph (StructureGraph id=1):

http://api.brain-map.org/api/v2/structure_graph_download/1.json

    Third, retrieve a list of the Mouse, P56 Sagittal Atlas' Nissl images:

http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::Atlas,
rma::criteria,[id$eq2],
rma::include,atlas_data_sets(atlas_images(treatments))

    Finally, iterate through the list of AtlasImages and call the AtlasImage Download Service to download the Nissl images:

http://api.brain-map.org/api/v2/atlas_image_download/100883771

Parameters

filename

Integer

StructureGraph.id

file extension

String

.xml or .json format.

Returns

A hierarchical XML or JSON document containing each of the Structures in the requested StructureGraph with the following:

parent_id

ID of the parent Structure.

children

1..n descendants of the Structure