d7b4748a91dc6442607af5c9a3c0c9a96282dd53 hiram Wed Apr 3 14:13:00 2019 -0700 add link to trackDb definition document help refs #18869 diff --git src/hg/htdocs/goldenPath/help/api.html src/hg/htdocs/goldenPath/help/api.html index 3e43bf4..65231a9 100755 --- src/hg/htdocs/goldenPath/help/api.html +++ src/hg/htdocs/goldenPath/help/api.html @@ -7,35 +7,30 @@ <h1>JSON API data interface</h1> <h2>Contents</h2> <h6><a href="#Intro">What is JSON data ?</a></h6> <h6><a href="#Access">What is the access URL ?</a></h6> <h6><a href="#Return">What type of data can be accessed ?</a></h6> <h6><a href="#Endpoint">Endpoint functions</a></h6> <h6><a href="#Parameters">Parameters to endpoint functions</a></h6> <h6><a href="#Parameter use">Required and optional parameters</a></h6> <h6><a href="#Track types">Supported track types</a></h6> <h6><a href="#list examples">Example data access, list functions</a></h6> <h6><a href="#getData examples">Example data access, getData functions</a></h6> <h6><a href="#Error examples">Error return examples</a></h6> -<hr> -<p> -<strong>Additional resources</strong></p> -<ul> -</ul> <!-- ========== What is JSON data ? ============================== --> <a name="Intro"></a> <h2>What is JSON data ?</h2> <p> JSON data is a data transfer syntax from a data provider to a data consumer. See also: <a href="https://www.w3schools.com/js/js_json_intro.asp" target=_blank>JSON Introduction</a> </p> <!-- ========== What is the access URL ? ============================== --> <a name="Access"></a> <h2>What is the access URL ?</h2> <p> The gateway html page to the interface is available at @@ -50,54 +45,54 @@ This access url: <b>https://api-test.gi.ucsc.edu/</b> is used to access the endpoint functions. For example: <pre> wget -O- 'https://api-test.gi.ucsc.edu/list/publicHubs' </pre> <!-- ========== What type of data can be accessed ? ===================== --> <a name="Return"></a> <h2>What type of data can be accessed ?</h2> <p> The following data sets can be accessed at this time: <ul> <li>Listing of available public hubs</li> <li>Listing of available UCSC browser genome assemblies</li> <li>List genomes from a specified assembly or track hub</li> -<li>List available data tracks from a specified hub or UCSC browser genome assembly</li> +<li>List available data tracks from a specified hub or UCSC browser genome assembly (see also: <a href='trackDb/trackDbHub.html' target=_blank>track definition help</a>)</li> <li>List of chromosomes contained in an assembly hub or UCSC browser genome assembly. <li>List of chromosomes contained in a specific track of an assembly or track hub or UCSC browser genome assembly. <li>Return DNA sequence from an assembly hub 2bit file, or UCSC genome browser assembly</li> <li>Return track data from a specified assembly or track hub or UCSC genome browser assembly</li> </ul> </p> <!-- ========== Endpoint functions ======================= --> <a name="Endpoint"></a> <h2>Endpoint functions to return data</h2> <p> Use the url: <b>https://api-test.gi.ucsc.edu/</b> is access the endpoint functions. For example: <pre> wget -O- 'https://api-test.gi.ucsc.edu/list/publicHubs' </pre> </p> <p> <ul> <li><b>/list/publicHubs</b> - list public hubs</li> <li><b>/list/ucscGenomes</b> - list UCSC database genomes</li> <li><b>/list/hubGenomes</b> - list genomes from specified hub</li> -<li><b>/list/tracks</b> - list data tracks available in specified hub or database genome</li> +<li><b>/list/tracks</b> - list data tracks available in specified hub or database genome (see also: <a href='trackDb/trackDbHub.html' target=_blank>track definition help</a>)</li> <li><b>/list/chromosomes</b> - list chromosomes from a data track in specified hub or database genome</li> <li><b>/getData/sequence</b> - return sequence from specified hub or database genome</li> <li><b>/getData/track</b> - return data from specified track in hub or database genome</li> </ul> </p> <!-- ========== Parameters to endpoint functions ======================= --> <a name="Parameters"></a> <h2>Parameters to endpoint functions</h2> <p> <ul> <li>hubUrl=<url> - specify track hub or assembly hub URL</li> <li>genome=<name> - specify genome assemby in track or assembly hub (only used with hubUrl)</li> <li>db=<ucscDb> - specify database (aka genome assembly) in UCSC genome browser (either hubUrl or db specified, not both)</li> <li>track=<trackName> - specify data track in hub or UCSC database genome assembly</li> @@ -143,34 +138,36 @@ the parameter <b>db=<name></b> is required. </p> <p> Using the <b>chrom=<name></b> parameter will limit the request to the single specified chromosome. To limit the request to a specific position, both <b>start=4321</b> and <b>end=5678</b> must be given together. </p> <!-- ========== Supported track types ======================= --> <a name="Track types"></a> <h2>Supported track types, at this time (April 2019), for getData functions</h2> <p> <ul> <li><a href='/FAQ/FAQformat.html#format1' target=_blank>bed</a></li> <li><a href='/FAQ/FAQformat.html#format1.5' target=_blank>bigBed</a></li> +<!-- not yet <li><a href='/FAQ/FAQformat.html#format9.1' target=_blank>bigGenePred</a></li> +--> <li><a href='/FAQ/FAQformat.html#format9.5' target=_blank>bigNarrowPeak</a></li> <li><a href='/FAQ/FAQformat.html#format6.1' target=_blank>bigWig</a></li> -<li>broadPeak</li> +<li><a href='/FAQ/FAQformat.html#format9' target=_blank>genePred</a></li> <li><a href='/FAQ/FAQformat.html#format9.5' target=_blank>narrowPeak</a></li> <li><a href='/FAQ/FAQformat.html#format6' target=_blank>wig</a></li> <li>(Work is under way to support additional track types)</li> </ul> </p> <!-- ========== Example data access ======================= --> <a name="list examples"></a> <h2>Example data access</h2> <h3>Listing functions</h3> <ol> <li><a href='/list/publicHubs' target=_blank>list public hubs</a> - <b>api.genome.ucsc.edu/list/publicHubs</b></li> <li><a href='/list/ucscGenomes' target=_blank>list UCSC database genomes</a> - <b>api.genome.ucsc.edu/list/ucscGenomes</b></li> <li><a href='/list/hubGenomes?hubUrl=http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt' target=_blank>list genomes from specified hub</a> - <b>api.genome.ucsc.edu/list/hubGenomes?hubUrl=http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt</b></li> <li><a href='/list/tracks?hubUrl=http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt;genome=_araTha1' target=_blank>list tracks from specified hub and genome</a> - <b>api.genome.ucsc.edu/list/tracks?hubUrl=http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt;genome=_araTha1</b></li>