50d394c587526db4622320a27d85f1e1ef8b9e4f lrnassar Thu May 16 11:12:37 2019 -0700 Adding an additional section with longer examples to api.html #18869 diff --git src/hg/htdocs/goldenPath/help/api.html src/hg/htdocs/goldenPath/help/api.html index b8dc50c..10eddad 100755 --- src/hg/htdocs/goldenPath/help/api.html +++ src/hg/htdocs/goldenPath/help/api.html @@ -7,30 +7,31 @@
JSON data is a data transfer syntax from a data provider to a data consumer. See also: JSON Introduction
This access url: https://api.genome.ucsc.edu/ is used to access @@ -263,16 +264,59 @@
+When querying track data with the /getData/track function, the jsonOutputArrays +can be used in conjunction to see the track schema. This includes a description of each field +present in the track. The data will also be returned in JSON array type.
+ +
+Request data from hg38 gold track in array type -
+
api.genome.ucsc.edu/getData/track?genome=hg38;track=gold;chrom=chrM;jsonOutputArrays=1
+When using the /list/tracks function to see the available tracks in an assembly, it can +be useful to return all tracks in the same hierarchical level. By default, composite and +supertracks will have the subtracks nested below, however, the trackLeavesOnly=1 parameter +can be passed to hide the container information, and display all tracks and subtracks at the +same level.
+ ++In the following example, the first link does not include the trackLeavesOnly parameter. The +output can be compared to the second link to see the difference. This can be observed in the +conservation track. In the first link, the multiz20way track is nested within the cons20way +track. In the second link, however, the multiz20way subtrack is seen at an equivelant level +with all other tracks, and the container, cons20way, is not present in the list.
+ +
+Request available tracks in the rn6 genome -
+
api.genome.ucsc.edu/list/tracks?genome=rn6
+Request available tracks in the rn6 genome, hiding container information -
+
api.genome.ucsc.edu/list/tracks?genome=rn6;trackLeavesOnly=1