diff --git a/api/docs/api.rst b/api/docs/api.rst new file mode 100644 --- /dev/null +++ b/api/docs/api.rst @@ -0,0 +1,77 @@ +Compressed graph API +==================== + +Stats +----- + +Returns statistics on the compressed graph. + +GET /graph/stats/ + +Parameter: + +- dataset: (string) name of one of the subgraph dataset (dir_to_dir, + dir_to_file, dir_to_rev, origin_to_snapshot, release_to_obj, rev_to_dir, + rev_to_rev, snapshot_to_obj). + +JSON output: + +- nb_nodes (long) +- nb_edges (long) +- compression_ratio (double) +- bits_per_edge (double) +- bits_per_node (double) +- avg_locality (double) +- min_indegree (long) +- max_indegree (long) +- avg_indegree (double) +- min_outdegree (long) +- max_outdegree (long) +- avg_outdegree (double) + +Space-recursive +--------------- + +Recursively lists contents of a directory. + +GET /graph/list/ + +Parameter: + +- directory: (string) hexadecimal representation of the directory sha1 + identifier. + +JSON output: + +- paths: (list of strings) full paths starting from given directory + +Spacetime-recursive +------------------- + +Lists directories present in revision history. + +GET /graph/??/ + +Parameter: + +- revision: (string) hexadecimal representation of the revision sha1 identifier. + +JSON output: + +- directories: (list of strings) directories appearing in revision history + starting from a given revision. + +Time-recursive +-------------- + +Show revisions log. + +GET /graph/log/ + +Parameter: + +- revision: (string) hexadecimal representation of the revision sha1 identifier. + +JSON output: + +- revisions: (list of strings) revision logs starting from a given revision.