/
api.html
84 lines (80 loc) · 3.43 KB
/
api.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html>
<head>
<title>Exposure checker | API</title>
<link rel="stylesheet" media="screen" href="assets/bootstrap/css/bootstrap.min.css" type="text/css" charset="utf-8">
<link rel="stylesheet" media="screen" href="assets/eyeball.css" type="text/css" charset="utf-8">
<meta charset="utf-8">
<meta name="author" content="Peter Melchior, Erin Sheldon, Alex Drlica-Wagner">
<link rel="icon" href="assets/DESC_logo_trans.png" type="image/png">
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div id="wrapper">
<div class='container'>
<div class="navbar">
<div class="navbar-inner">
<a class="brand" href="index.html">Exposure checker</a>
<ul class="nav">
<li><a href="viewer.html">Viewer</a></li>
<li><a href="tutorial.html">Tutorial</a></li>
<li><a href="faq.html">FAQ</a></li>
<li><a href="statistics.html">Statistics</a></li>
<li class="active"><a href="#">API</a></li>
<li><a href="gallery.html">Gallery</a></li>
<li><a href="hodgepodge.html">Hodge-podge</a></li>
</ul>
<ul class="nav pull-right hide">
<!--#include file="release_selector.shtml"-->
</ul>
</div>
</div>
<!-- content area -->
<div class="span12">
<h1>API</h1>
<p>The API allows you to query our submission database for the list of the
categorized problems. You'll get them anonymized and without a timestamp,
the format is <a href="http://www.json.org/">JSON</a>, which should be digestible in almost
any programming language. If you need at different format,
open a <a href="https://github.com/LSSTDESC/desc-exp-checker/issues">github issue</a>.
</p>
<p>Select the problem class below for an example:</p>
<!--#include file="problem_selector.shtml"-->
<h3>Query parameters</h3>
<p>
The basic URL for GET requests is <a href="api.php">api.php</a>. We support/require the following parameters:
<ul>
<li><code>release</code> The four-letter name of the release, e.g. Y1A1</li>
<li><code>problem</code> The name of the problem as it appear in the problem selector (URL encoding is required, e.g. whitespace becomes <code>%20</code>)</li>
</ul>
</p>
<h3>Any other queries?</h3>
The set of queries we currently allow is restricted to global queries based on the problem class.
If you want to be able to quiery our database differently, tell us by
opening a <a href="https://github.com/LSSTDESC/desc-exp-checker/issues">github issue</a>.
</div>
</div>
<div id="push"></div>
</div>
<!--#include file="footer.shtml"-->
</body>
<script type="text/javascript" src="assets/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="assets/jquery.cookie.js"></script>
<script type="text/javascript" src="assets/common.js"></script>
<script type="text/javascript" src="assets/bootstrap/js/bootstrap.min.js"></script>
<script>
// initial setup
$(document).ready(function(){
// set up release
setRelease($.cookie('default-release'));
// connect problem selector to anchor in page
$('a[class*="problem"]').on('click', function(evt) {
var problem = evt.target.innerHTML;
window.open('api.php?release=' + release + '&problem=' + encodeURI(problem));
});
});
</script>
</html>