49c8c187d62eefad13f63e8e01fe12f820eb0ef9 lrnassar Tue May 28 15:02:26 2019 -0700 Updating api.html based on Ann suggestions #18869 diff --git src/hg/htdocs/goldenPath/help/api.html src/hg/htdocs/goldenPath/help/api.html index 5dfafdd..d043118 100755 --- src/hg/htdocs/goldenPath/help/api.html +++ src/hg/htdocs/goldenPath/help/api.html @@ -22,62 +22,62 @@
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 +This access URL: https://api.genome.ucsc.edu/ is used to access the endpoint functions. For example:
wget -O- 'https://api.genome.ucsc.edu/list/publicHubs'
The following data sets can be accessed at this time:
-The url https://api.genome.ucsc.edu/ is used to access +The URL https://api.genome.ucsc.edu/ is used to access the endpoint functions. For example:
curl -L 'https://api.genome.ucsc.edu/list/ucscGenomes'
Using the chrom=<name> parameter will limit the request to the single specified chromosome. To limit the request to a specific position, both start=4321 and end=5678 must be given together.
Any extra parameters not allowed in a function will be flagged as an error.
-
There are different ways around this item limit, depending on how many items are in the track. For the knownGene track, breaking it down to component chromosome queries using the chrom parameter will suffice. In order to get a listing of the chrom names, and what chroms have data for that track, the /list/chromosomes function can be used.
Request listing of chroms that have data for the knownGene track in hg19 -
api.genome.ucsc.edu/list/chromosomes?genome=hg19;track=knownGene
With the list of chrom names that have data, the /getData/track function can be used -again while specifying the chrom parameter. In the following example chr1 is queried -and the itemsReturned field shows a total of 7967 items in the output. Well below the +again while specifying the chrom parameter. In the following example, chr1 is queried +and the itemsReturned field shows a total of 7967 items in the output, well below the 1M limit, meaning all data for chr1 has been extracted. This can then be repeated for all chroms of interest.
Request iems in knownGene track of hg19, only for chr1 -
+target=_blank>Request items in knownGene track of hg19, only for chr1 -
api.genome.ucsc.edu/getData/track?genome=hg19;track=knownGene;chrom=chr1
For tracks that have additional items, such as SNP tracks, the query can be further broken down using the additional start and end parameters.