{"name": "VFBquery API", "version": "1.22.47", "description": "Query services for Virtual Fly Brain \u2014 term information, search, connectivity, cross-references, FlyBase stocks and the hosted-CATMAID pass-through. All endpoints are read-only GETs returning JSON.", "documentation": "https://vfbquery.readthedocs.io", "source": "https://github.com/VirtualFlyBrain/VFBquery", "groups": [{"group": "Term information", "endpoints": [{"path": "/get_term_info", "summary": "Full term report for one VFB/FBbt id", "description": "The report behind the website's term information panel: metadata, synonyms, relationships, aligned images, cross-references, and the list of queries that can be run from the term.", "params": [{"name": "id", "required": true, "doc": "Ontology class or individual short_form", "example": "FBbt_00003748"}, {"name": "force_refresh", "header": "X-Force-Refresh", "doc": "Force a cache clear: bypasses the edge cache and makes VFBquery recompute now. Refreshes the canonical URL directly, so this call and the very next one \u2014 even unticked \u2014 both return fresh data."}]}, {"path": "/run_query", "summary": "Run one of a term's named queries", "description": "Executes one of the query types listed in a term's Queries section (see /get_term_info). Results are the website's own row format; offset/limit page them.", "params": [{"name": "id", "required": true, "doc": "Term the query starts from", "example": "FBbt_00003748"}, {"name": "query_type", "required": true, "doc": "One of the named query types", "example": "ListAllAvailableImages", "enum": "dynamic:query_types"}, {"name": "offset", "doc": "First row to return", "example": ""}, {"name": "limit", "doc": "Maximum rows to return", "example": ""}, {"name": "include_graph", "doc": "true adds a graph rendering of the rows", "example": ""}, {"name": "force_refresh", "header": "X-Force-Refresh", "doc": "Force a cache clear: bypasses the edge cache and makes VFBquery recompute now. Refreshes the canonical URL directly, so this call and the very next one \u2014 even unticked \u2014 both return fresh data."}]}, {"path": "/get_hierarchy", "summary": "Partonomy / subclass tree around a term", "description": "The hierarchy browser's tree: follow one relationship from a term, upward, downward or both.", "params": [{"name": "id", "required": true, "doc": "Root term", "example": "FBbt_00005801"}, {"name": "relationship", "doc": "part_of (default) or subclass_of", "example": "part_of"}, {"name": "direction", "doc": "up, down or both", "example": "both"}, {"name": "max_depth", "doc": "Levels to expand", "example": "1"}]}]}, {"group": "Search and identifiers", "endpoints": [{"path": "/search", "summary": "Website-equivalent free-text search", "description": "The canonical ranked search the site uses. filter/exclude/boost/demote take type names \u2014 GET /facets lists every accepted name.", "params": [{"name": "query", "required": true, "doc": "Free text", "example": "medulla"}, {"name": "limit", "doc": "Rows to return", "example": "10"}, {"name": "filter_types", "doc": "Only these types (comma-separated)", "example": ""}, {"name": "exclude_types", "doc": "Drop these types", "example": ""}, {"name": "boost_types", "doc": "Rank these types higher", "example": ""}, {"name": "demote_types", "doc": "Rank these types lower", "example": ""}]}, {"path": "/facets", "summary": "Type names /search accepts", "description": "The vocabulary for /search's four type parameters.", "params": [{"name": "contains", "doc": "Only names containing this text", "example": ""}]}, {"path": "/xref", "summary": "VFB id \u2194 external accession", "description": "Both directions of the cross-reference mapping. Give id= for VFB \u2192 external, or accession= (optionally with db=) for external \u2192 VFB.", "params": [{"name": "id", "doc": "VFB id (forward direction)", "example": "VFB_001011rj"}, {"name": "accession", "doc": "External id (reverse direction)", "example": ""}, {"name": "db", "doc": "Restrict to one site (name, symbol or nickname)", "example": ""}]}, {"path": "/combine", "summary": "Set algebra over query results", "description": "Combine two or more named queries with OR/AND/NOT/XOR (and friends), compared on term id. Name each operand as its own parameter, then reference the names in expr. The response traces every step.", "params": [{"name": "expr", "required": true, "doc": "Boolean expression over the operand names", "example": "calyx AND lh"}, {"name": "calyx", "doc": "Example operand (any name works)", "example": "NeuronsPartHere:FBbt_00007401"}, {"name": "lh", "doc": "Example operand", "example": "NeuronsPartHere:FBbt_00007053"}]}]}, {"group": "Connectivity", "endpoints": [{"path": "/list_connectome_datasets", "summary": "Connectome datasets in the knowledge graph", "description": "The datasets /query_connectivity can draw on, with their labels and symbols.", "params": []}, {"path": "/query_connectivity", "summary": "Synaptic connectivity between neuron types", "description": "Connections from one neuron type (or any subclass) to another, summed across the connectomes. Types are labels, synonyms or FBbt ids.", "params": [{"name": "upstream_type", "required": true, "doc": "Presynaptic type (label, synonym or FBbt id)", "example": "LPLC2"}, {"name": "downstream_type", "required": true, "doc": "Postsynaptic type", "example": "giant fiber neuron"}, {"name": "weight", "doc": "Minimum synapse count per connection", "example": ""}, {"name": "group_by_class", "doc": "true groups rows by neuron class", "example": ""}, {"name": "exclude_dbs", "doc": "Datasets to leave out (comma-separated)", "example": ""}, {"name": "include_graph", "doc": "true adds a graph rendering", "example": ""}, {"name": "force_refresh", "header": "X-Force-Refresh", "doc": "Force a cache clear: bypasses the edge cache and makes VFBquery recompute now. Refreshes the canonical URL directly, so this call and the very next one \u2014 even unticked \u2014 both return fresh data."}]}]}, {"group": "FlyBase stocks and combinations", "endpoints": [{"path": "/resolve_entity", "summary": "Resolve a gene/allele/transgene name", "description": "Free-text resolver for FlyBase features; returns candidate ids for /find_stocks.", "params": [{"name": "query", "required": true, "doc": "Name, symbol or FlyBase id", "example": "dpp"}]}, {"path": "/find_stocks", "summary": "Stocks carrying a FlyBase feature", "description": "Stock-centre holdings for a resolved feature id.", "params": [{"name": "id", "required": true, "doc": "FlyBase feature id from /resolve_entity", "example": "FBgn0000490"}, {"name": "collection", "doc": "Restrict to one stock collection", "example": ""}]}, {"path": "/resolve_combination", "summary": "Resolve a split-GAL4 combination", "description": "Resolver for hemidriver combinations (FBco ids).", "params": [{"name": "query", "required": true, "doc": "Combination name or synonym", "example": "GMR37H08-ZpGAL4DBD in attP2"}]}, {"path": "/find_combo_publications", "summary": "Publications for a combination", "description": "Publications using a resolved FBco combination.", "params": [{"name": "id", "required": true, "doc": "FBco id from /resolve_combination", "example": "FBco0000052"}]}]}, {"group": "CATMAID pass-through", "endpoints": [{"path": "/catmaid", "summary": "The VFB-hosted CATMAID instances", "description": "Every hosted instance with its metadata, projects, anonymous read-only token, and the knowledge-graph cross-reference site used for VFB id \u2194 skeleton id conversion.", "params": []}, {"path": "/catmaid/{instance}", "summary": "One instance's metadata and commands", "description": "Instance details plus the full command registry with per-command documentation.", "path_params": [{"name": "instance", "required": true, "doc": "Instance id (see /catmaid)", "example": "fafb", "enum": "dynamic:catmaid_instances"}], "params": []}, {"path": "/catmaid/{instance}/{command}", "methods": ["GET", "POST"], "summary": "Run a read-only CATMAID command", "description": "The curated CATMAID query surface. Commands taking skeleton ids accept CATMAID skids, VFB ids, or a mixed comma-separated list \u2014 VFB ids are converted through the knowledge graph before the request is made, and the response envelope maps ids both ways. raw=true returns the untouched CATMAID payload. Unrecognised parameters are forwarded to CATMAID verbatim. For swc, aligned= names a template space for VFB's registered copy, and the swc_alignments command lists the spaces available. Every command also has its own runnable card in the expanded section below. Also accepts POST: put the same parameters in a JSON object body (or an application/x-www-form-urlencoded/multipart form) instead of the query string \u2014 the only way to send an id list too long for a URL. project and raw stay on the query string either way; a GET and the equivalent POST share one cache entry. The Run button below only exercises GET \u2014 for example, curl -X POST '/catmaid/fafb/annotations_for_skeletons' -H 'Content-Type: application/json' -d '{\"ids\": [1, 2, 3]}'.", "path_params": [{"name": "instance", "required": true, "doc": "Instance id (see /catmaid)", "example": "fafb", "enum": "dynamic:catmaid_instances"}, {"name": "command", "required": true, "doc": "Command name (see the registry below)", "example": "neuron_names", "enum": "dynamic:catmaid_commands"}], "params": [{"name": "ids", "doc": "Skeleton ids and/or VFB ids, comma-separated (list commands)", "example": "VFB_001011rj,10603863"}, {"name": "id", "doc": "One skeleton id or VFB id (single-id commands)", "example": ""}, {"name": "project", "doc": "CATMAID project id (defaults to the instance's first project)", "example": ""}, {"name": "raw", "doc": "true returns the untouched CATMAID response", "example": ""}]}]}, {"group": "Service", "endpoints": [{"path": "/health", "summary": "Liveness and running version", "description": "", "params": []}, {"path": "/status", "summary": "Queue depth, cache stats, worker utilisation", "description": "", "params": []}]}], "vocabularies": {"query_types": ["AlignedDatasets", "AllAlignedImages", "AllDatasets", "AnatomyExpressedIn", "ComponentsOf", "DatasetImages", "DownstreamClassConnectivity", "FindComboPublications", "FindStocks", "ImagesNeurons", "ImagesThatDevelopFrom", "LineageClonesIn", "ListAllAvailableImages", "NeuronClassesFasciculatingHere", "NeuronInputsTo", "NeuronNeuronConnectivityQuery", "NeuronRegionConnectivityQuery", "NeuronsCapableOf", "NeuronsPartHere", "NeuronsPostsynapticHere", "NeuronsPresynapticHere", "NeuronsSynaptic", "PaintedDomains", "PartsOf", "SimilarMorphologyTo", "SimilarMorphologyToNB", "SimilarMorphologyToNBexp", "SimilarMorphologyToPartOf", "SimilarMorphologyToPartOfexp", "SimilarMorphologyToUserData", "SplitsTargeting", "SubclassesOf", "TargetNeurons", "TemplateROIBrowser", "TermsForPub", "TractsNervesInnervatingHere", "TransgeneExpressionHere", "UpstreamClassConnectivity", "anatScRNAseqQuery", "clusterExpression", "epFrag", "expressionCluster", "scRNAdatasetData"], "catmaid_commands": {"annotations": {"method": "GET", "path": "/{project_id}/annotations/", "doc": "List annotations in the project.", "takes_ids": [], "returns": "json", "local": false}, "annotations_for_skeletons": {"method": "POST", "path": "/{project_id}/annotations/forskeletons", "doc": "Annotations on each of a set of skeletons.", "takes_ids": ["ids"], "returns": "json", "local": false}, "annotations_query_targets": {"method": "POST", "path": "/{project_id}/annotations/query-targets", "doc": "Find neurons/annotations by annotation or name (name=, annotated_with=, types[0]=neuron, ...).", "takes_ids": [], "returns": "json", "local": false}, "cable_length": {"method": "POST", "path": "/{project_id}/skeletons/cable-length", "doc": "Cable length per skeleton.", "takes_ids": ["ids"], "returns": "json", "local": false}, "circles_of_hell": {"method": "POST", "path": "/{project_id}/graph/circlesofhell", "doc": "Skeletons within n hops of the given set (n_circles=1, ...).", "takes_ids": ["ids"], "returns": "json", "local": false}, "compact_detail": {"method": "POST", "path": "/{project_id}/skeletons/compact-detail", "doc": "Compact treenode representation for a set of skeletons (with_connectors=, with_tags=, ...).", "takes_ids": ["ids"], "returns": "json", "local": false}, "connectivity": {"method": "POST", "path": "/{project_id}/skeletons/connectivity", "doc": "Upstream/downstream synaptic partners (boolean_op=OR, with_nodes=false, ...).", "takes_ids": ["ids"], "returns": "json", "local": false}, "connectivity_counts": {"method": "POST", "path": "/{project_id}/skeletons/connectivity-counts", "doc": "Synapse counts by link type per skeleton.", "takes_ids": ["ids"], "returns": "json", "local": false}, "connectivity_matrix": {"method": "POST", "path": "/{project_id}/skeleton/connectivity_matrix", "doc": "Sparse connectivity matrix between two skeleton sets.", "takes_ids": ["rows", "columns"], "returns": "json", "local": false}, "connector_info": {"method": "GET", "path": "/{project_id}/connectors/{connector_id}/", "doc": "Detailed information on one connector (path id is a raw connector id).", "takes_ids": ["connector_id"], "returns": "json", "local": false}, "connector_links": {"method": "POST", "path": "/{project_id}/connectors/links/", "doc": "Connector links on a set of skeletons (relation_type=presynaptic_to|postsynaptic_to|...).", "takes_ids": ["ids"], "returns": "json", "local": false}, "connector_types": {"method": "GET", "path": "/{project_id}/connectors/types/", "doc": "List available connector (synapse) link types.", "takes_ids": [], "returns": "json", "local": false}, "connectors_in_bounding_box": {"method": "POST", "path": "/{project_id}/connectors/in-bounding-box", "doc": "Connectors in a bounding box (minx=..maxz=, ...).", "takes_ids": [], "returns": "json", "local": false}, "deep_links": {"method": "GET", "path": "/{project_id}/links/", "doc": "List saved deep links.", "takes_ids": [], "returns": "json", "local": false}, "eswc": {"method": "GET", "path": "/{project_id}/skeleton/{skeleton_id}/eswc", "doc": "Skeleton as extended SWC text (creator/edit metadata).", "takes_ids": ["id"], "returns": "text", "local": false}, "find_label_nodes": {"method": "POST", "path": "/{project_id}/nodes/find-labels", "doc": "Find nodes whose labels match a query (query=).", "takes_ids": [], "returns": "json", "local": false}, "interpolatable_sections": {"method": "GET", "path": "/{project_id}/interpolatable-sections/", "doc": "Broken/interpolatable section locations.", "takes_ids": [], "returns": "json", "local": false}, "label_stats": {"method": "GET", "path": "/{project_id}/labels/stats", "doc": "Label usage statistics.", "takes_ids": [], "returns": "json", "local": false}, "labels": {"method": "GET", "path": "/{project_id}/labels/", "doc": "List all (treenode) labels in use.", "takes_ids": [], "returns": "json", "local": false}, "landmark_groups": {"method": "GET", "path": "/{project_id}/landmarks/groups/", "doc": "List landmark groups (with_members/with_locations options).", "takes_ids": [], "returns": "json", "local": false}, "landmarks": {"method": "GET", "path": "/{project_id}/landmarks/", "doc": "List landmarks (with_locations=true for coordinates).", "takes_ids": [], "returns": "json", "local": false}, "list_neurons": {"method": "GET", "path": "/{project_id}/neurons/", "doc": "List neurons by filter criteria.", "takes_ids": [], "returns": "json", "local": false}, "list_skeletons": {"method": "GET", "path": "/{project_id}/skeletons/", "doc": "List skeleton ids by filter (nodecount_gt=, created_by=, ...).", "takes_ids": [], "returns": "json", "local": false}, "nearest_node": {"method": "GET", "path": "/{project_id}/nodes/nearest", "doc": "Closest node to a location (x=, y=, z=).", "takes_ids": [], "returns": "json", "local": false}, "neuroglancer_skeleton": {"method": "GET", "path": "/{project_id}/skeletons/{skeleton_id}/neuroglancer", "doc": "Skeleton in neuroglancer precomputed format (base64 in the JSON envelope).", "takes_ids": ["id"], "returns": "bytes", "local": false}, "neuron_ids": {"method": "POST", "path": "/{project_id}/neurons/from-models", "doc": "CATMAID neuron id for each skeleton id.", "takes_ids": ["ids"], "returns": "json", "local": false}, "neuron_names": {"method": "POST", "path": "/{project_id}/skeleton/neuronnames", "doc": "Map skeleton ids to neuron names.", "takes_ids": ["ids"], "returns": "json", "local": false}, "neuron_skeletons": {"method": "GET", "path": "/{project_id}/neuron/{neuron_id}/get-all-skeletons", "doc": "All skeleton ids modelling a neuron. id= accepts a skid or VFB id; the CATMAID neuron id is derived automatically.", "takes_ids": ["id"], "returns": "json", "local": false}, "node_labels": {"method": "GET", "path": "/{project_id}/labels/{node_type}/{node_id}/", "doc": "Labels on one node (node_type=treenode|connector, node_id=).", "takes_ids": ["node_type", "node_id"], "returns": "json", "local": false}, "node_locations": {"method": "POST", "path": "/{project_id}/nodes/location", "doc": "Locations for a set of node ids (node_ids[0]=..., raw node ids, not skeleton ids).", "takes_ids": [], "returns": "json", "local": false}, "origins": {"method": "GET", "path": "/{project_id}/origins/", "doc": "List available data sources.", "takes_ids": [], "returns": "json", "local": false}, "projects": {"method": "GET", "path": "/projects/", "doc": "List projects visible on this instance.", "takes_ids": [], "returns": "json", "local": false}, "review_status": {"method": "POST", "path": "/{project_id}/skeletons/review-status", "doc": "Review status per skeleton.", "takes_ids": ["ids"], "returns": "json", "local": false}, "sampler_count": {"method": "POST", "path": "/{project_id}/skeletons/sampler-count", "doc": "Number of reconstruction samplers per skeleton.", "takes_ids": ["ids"], "returns": "json", "local": false}, "similarity_configs": {"method": "GET", "path": "/{project_id}/similarity/configs/", "doc": "List NBLAST similarity configurations.", "takes_ids": [], "returns": "json", "local": false}, "similarity_queries": {"method": "GET", "path": "/{project_id}/similarity/queries/", "doc": "List NBLAST similarity tasks.", "takes_ids": [], "returns": "json", "local": false}, "skeleton_cable_length": {"method": "GET", "path": "/{project_id}/skeletons/{skeleton_id}/cable-length", "doc": "Cable length of a single skeleton.", "takes_ids": ["id"], "returns": "json", "local": false}, "skeleton_compact_detail": {"method": "GET", "path": "/{project_id}/skeletons/{skeleton_id}/compact-detail", "doc": "Compact treenode representation of one skeleton (with_connectors=, with_tags=, ...).", "takes_ids": ["id"], "returns": "json", "local": false}, "skeleton_node_overview": {"method": "GET", "path": "/{project_id}/skeletons/{skeleton_id}/node-overview", "doc": "Treenode / review / label overview of one skeleton.", "takes_ids": ["id"], "returns": "json", "local": false}, "skeleton_root": {"method": "GET", "path": "/{project_id}/skeletons/{skeleton_id}/root", "doc": "Root treenode id and location of a skeleton.", "takes_ids": ["id"], "returns": "json", "local": false}, "skeleton_summary": {"method": "POST", "path": "/{project_id}/skeletons/summary", "doc": "Summary information (node counts, cable, review) per skeleton.", "takes_ids": ["ids"], "returns": "json", "local": false}, "skeleton_validity": {"method": "POST", "path": "/{project_id}/skeletons/validity", "doc": "Which of the given skeleton ids exist in the project.", "takes_ids": ["ids"], "returns": "json", "local": false}, "skeletons_in_bounding_box": {"method": "POST", "path": "/{project_id}/skeletons/in-bounding-box", "doc": "Skeleton ids intersecting a bounding box (minx=..maxz=, min_nodes=, ...).", "takes_ids": [], "returns": "json", "local": false}, "skeletons_within_distance": {"method": "POST", "path": "/{project_id}/skeletons/within-spatial-distance", "doc": "Skeletons with nodes within a distance of a location.", "takes_ids": [], "returns": "json", "local": false}, "stats_cable_length": {"method": "GET", "path": "/{project_id}/stats/cable-length", "doc": "Largest skeletons by cable length.", "takes_ids": [], "returns": "json", "local": false}, "stats_nodecount": {"method": "GET", "path": "/{project_id}/stats/nodecount", "doc": "Nodes created per user.", "takes_ids": [], "returns": "json", "local": false}, "stats_server": {"method": "GET", "path": "/{project_id}/stats/server", "doc": "Server state information.", "takes_ids": [], "returns": "json", "local": false}, "swc": {"method": "GET", "path": "/{project_id}/skeleton/{skeleton_id}/swc", "doc": "Skeleton as SWC text. aligned=<template short_form or label> returns VFB's copy registered to that template instead of the original EM-space skeleton (aligned=vfb picks the VFB copy while there is only one; aligned=original or omitted is the CATMAID original).", "takes_ids": ["id"], "returns": "text", "local": false}, "swc_alignments": {"method": "GET", "path": "(served by VFBquery, not CATMAID)", "doc": "List the spaces an swc download is available in for one neuron: the original EM space plus any VFB template-registered copies. Each row carries the aligned= value to pass to swc.", "takes_ids": ["id"], "returns": "json", "local": true}, "treenode_info": {"method": "GET", "path": "/{project_id}/treenodes/{treenode_id}/info", "doc": "Skeleton/neuron information for one treenode (path id is a raw treenode id).", "takes_ids": ["treenode_id"], "returns": "json", "local": false}}}}