0cee4b190ab4c2ddfa9fafc6e50c16cca5542851 lrnassar Wed Sep 18 11:04:50 2019 -0700 Expanding API documentation for mirrors refs #24129 diff --git src/hg/htdocs/goldenPath/help/api.html src/hg/htdocs/goldenPath/help/api.html index afdada3..209bc47 100755 --- src/hg/htdocs/goldenPath/help/api.html +++ src/hg/htdocs/goldenPath/help/api.html @@ -4,30 +4,31 @@ <!-- Relative paths to support mirror sites with non-standard GB docs install --> <!--#include virtual="$ROOT/inc/gbPageStart.html" --> <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="#Mirrors">Using the API on mirrors and local installations</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> <h6><a href="#Practical_examples">Practical examples</a></h6> <!-- ========== What is JSON data? ============================== --> <a id="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? ============================== --> @@ -168,30 +169,53 @@ --> <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><a href='/goldenPath/help/chain.html' target=_blank>chain</a></li> <li><a href='/FAQ/FAQformat.html#format9' target=_blank>genePred</a></li> <li><a href='/FAQ/FAQformat.html#format22' target=_blank>interact</a></li> <li><a href='/FAQ/FAQformat.html#format9.5' target=_blank>narrowPeak</a></li> <li><a href='/FAQ/FAQformat.html#format17' target=_blank>peptideMapping</a></li> <li><a href='/FAQ/FAQformat.html#format2' target=_blank>psl</a></li> <li><a href='http://hgdownload.cse.ucsc.edu/goldenPath/hg38/database/rmsk.sql' target=_blank>rmsk - repeat masker</a></li> <li><a href='/FAQ/FAQformat.html#format6' target=_blank>wig</a></li> <li>(Work is underway to support additional track types)</li> </ul> </p> +<!-- ========== API on mirrors and local installations ======================= --> +<a id="Mirrors"></a> +<h2>Using the API on mirrors and local installations</h2> +<p> +In order to access the API from a <a href='/mirror.html' target=_blank>mirror installation</a> +or one of the UCSC official mirrors, the complete URL with the cgi-bin should be used:</p> + +<ul> +<li><strong>Europe</strong>: https://genome-euro.ucsc.edu/cgi-bin/hubApi/</li> +<li><strong>Asia</strong>: https://genome-asia.ucsc.edu/cgi-bin/hubApi/<li> +<li><strong>Mirror installation</strong>: https://your.server.edu/cgi-bin/hubApi/</li> +</ul> + +<p> +The URL can then be passed any of the functions described in this page:</p> + +<ul> +<li><a href='https://genome-euro.ucsc.edu/cgi-bin/hubApi/list/publicHubs' target=_blank>list public hubs</a> - +<b>https://genome-euro.ucsc.edu/cgi-bin/hubApi/list/publicHubs</b></li> +<li><a href='https://genome-asia.ucsc.edu/cgi-bin/hubApi/list/ucscGenomes' target=_blank>list UCSC database genomes</a> - +<b>https://genome-asia.ucsc.edu/cgi-bin/hubApi/list/ucscGenomes</b></li> +</ul> + <!-- ========== Example data access ======================= --> <a id="list_examples"></a> <h2>Example data access</h2> <p> Your WEB browser can be configured to interpret JSON data and format in a convenient browsing format. Firefox has this function built in, other browsers have add-ons that can be turned on to format JSON data. With your browser thus configured, the following links can demonstrate the functions of the API interface. </p> <h3>Listing functions</h3> <ol> <li><a href='https://api.genome.ucsc.edu/list/publicHubs' target=_blank>list public hubs</a> - <b>api.genome.ucsc.edu/list/publicHubs</b></li> <li><a href='https://api.genome.ucsc.edu/list/ucscGenomes' target=_blank>list UCSC database genomes</a> -