318a5c110a86569bd4e4b8fd7263c684245e6049 lrnassar Thu Oct 10 10:54:48 2019 -0700 Changing JSON API to REST API and adding new entry to API help page refs #24282 diff --git src/hg/htdocs/goldenPath/help/api.html src/hg/htdocs/goldenPath/help/api.html index 209bc47..a292173 100755 --- src/hg/htdocs/goldenPath/help/api.html +++ src/hg/htdocs/goldenPath/help/api.html @@ -1,44 +1,55 @@ <!DOCTYPE html> -<!--#set var="TITLE" value="JSON API data interface" --> +<!--#set var="TITLE" value="REST API data interface" --> <!--#set var="ROOT" value="../.." --> <!-- Relative paths to support mirror sites with non-standard GB docs install --> <!--#include virtual="$ROOT/inc/gbPageStart.html" --> -<h1>JSON API data interface</h1> +<h1>REST API data interface</h1> <h2>Contents</h2> -<h6><a href="#Intro">What is JSON data?</a></h6> +<h6><a href="#REST">What is REST?</a></h6> +<h6><a href="#Intro">What is JSON output 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 REST? ============================== --> +<a id="REST"></a> +<h2>What is REST?</h2> +<p> +REST is an acronym for REpresentational State Transfer. It states architectural guidelines for how +an API will operate. See also: <a target="_blank" href="https://restfulapi.net/">Principles +of REST</a> +</p> + <!-- ========== What is JSON data? ============================== --> <a id="Intro"></a> -<h2>What is JSON data?</h2> +<h2>What is JSON output data?</h2> <p> -JSON data is a data transfer syntax from a data provider to a data consumer. +The REST API returns data in JSON format. 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 id="Access"></a> <h2>What is the access URL?</h2> <p> This access URL: <b>https://api.genome.ucsc.edu/</b> is used to access the endpoint functions. For example: <pre> wget -O- 'https://api.genome.ucsc.edu/list/publicHubs' </pre> </p>