f8ec1e5046ba29f263a9483fe00ee7b9da0af206 max Thu Jul 4 08:20:03 2024 -0700 pointing users to other options to get our data in API docs, refs #34045 diff --git src/hg/htdocs/goldenPath/help/api.html src/hg/htdocs/goldenPath/help/api.html index 188a380..617b97a 100755 --- src/hg/htdocs/goldenPath/help/api.html +++ src/hg/htdocs/goldenPath/help/api.html @@ -1,56 +1,78 @@

REST API data interface

Contents

+
Why you may not want to use this API
What is REST?
What is JSON output data?
What is the access URL?
What type of data can be accessed?
Endpoint functions
Parameters to endpoint functions
Required and optional parameters
Supported track types
Using the API on mirrors and local installations
Example data access, list functions
Example data access, getData functions
Example data access, Search functions
Error return examples
Practical examples
+ +

Why you may not want to use this API

+

+Genomic data is not tiny, and usually computational biologists need all the +data for their analyses. Web APIs as a technology were made for grabbing +rather small pieces of data, often from Javascript. This means that Web APIs +may not be the best way to get our data. For this reason, we also provide all +our data through our +Table Browser for custom +exports and reports as tab-separated files and can be +joined with other tables. For tracks that are stored in MySQL, our +MySQL/MariaDB server is +publicly +accessible. Also, dumps of SQL-stored tracks +as well as tracks in binary file formats can be found on our +download server. All binary +files on the download server (bigBed, bigWig and derivatives like bigPsl, bigChain, etc) can even be +streamed over +HTTP. All these options are faster for bulk downloads and often easier to +parse from scripting languages. +

+

If however you write Javascript clients or just need a few features given a +range or you like APIs for other reasons, then the endpoints documented on this +page may solve your problem. If you are missing an option or endpoint below for +your use case, let us know. +

+ -

What is REST?

+

What are REST and JSON?

REST is an acronym for REpresentational State Transfer. It states architectural guidelines for how an API will operate. See also: Principles -of REST -

- - - -

What is JSON output data?

-

-The REST API returns data in JSON format. JSON data is a data transfer -syntax from a data provider to a data consumer. +of REST. +Like most APIs, ours returns data in JSON format. JSON data is a data transfer +syntax almost identical to the Javascript object and array syntax. See also: JSON Introduction

What is the access URL?

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'