-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathverify.html
More file actions
130 lines (127 loc) · 6.8 KB
/
verify.html
File metadata and controls
130 lines (127 loc) · 6.8 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<title>HAPI Verifier</title>
<link rel="icon" href="//hapi-server.org/HAPI-favicon.svg" sizes="any" type="image/svg+xml">
</head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script>
const testURLs = [
"http://hapi-server.org/servers/TestData2.0/hapi",
"http://hapi-server.org/servers/TestData2.0/hapi&id=dataset1&time.min=1970-01-01T00:00:10.000Z&time.max=1970-01-01T00:00:20.000Z",
"http://hapi-server.org/servers/TestData2.0/hapi&id=dataset1¶meter=scalar&time.min=1970-01-01T00:00:10.000Z&time.max=1970-01-01T00:00:20.000Z",
"http://hapi-server.org/servers/TestData2.1/hapi&version=2.1",
"http://hapi-server.org/servers/TestData3.0/hapi&version=2.1",
"http://hapi-server.org/servers/TestData3.0/hapi",
"http://hapi-server.org/servers/TestData3.1/hapi",
"http://hapi-server.org/servers/TestData3.2/hapi",
"http://hapi-server.org/servers/TestData3.3/hapi",
"http://hapi-server.org/servers/SSCWeb/hapi&id=ace",
"https://cdaweb.gsfc.nasa.gov/hapi&id=AC_H0_MFI&time.min=2013-04-13T07:00:00&time.max=2013-04-14T11:00:00",
"https://supermag.jhuapl.edu/hapi&dataset=indices_all",
"https://supermag.jhuapl.edu/hapi&dataset=a01/baseline_all/PT1M/XYZ",
"http://planet.physics.uiowa.edu/das/das2Server/hapi",
"https://jfaden.net/HapiServerDemo/hapi",
"https://imag-data.bgs.ac.uk/GIN_V1/hapi&dataset=aae/definitive/PT1M/native",
"https://api.helioviewer.org/hapi/Helioviewer/hapi",
"https://csatools.esac.esa.int/HapiServer/hapi",
"https://amda.irap.omp.eu/service/hapi",
"https://vires.services/hapi",
"https://iswa.gsfc.nasa.gov/IswaSystemWebApp/hapi",
"http://lasp.colorado.edu/lisird/hapi",
"https://pds-ppi.igpp.ucla.edu/hapi&id=urn:nasa:pds:maven.anc:data.drf.eps",
"http://hapi.ftecs.com/hapi&id=rbsp_a_rbspice_esrhelt"
];
//"http://datashop.elasticbeanstalk.com/hapi/info?id=CASSINI_MAG_HI_RES&datatimeout=5000",
//"http://datashop.elasticbeanstalk.com/hapi/info?id=CASSINI_LEMMS_PHA_PITCH_ANGLES_10_MIN",
$(document).ready(function(){
var list = $('#tests');
$.each(testURLs, function(i) {
const li = $('<li/>').appendTo(list);
$('<a/>')
.attr("href","?url=" + testURLs[i])
.text("?" + testURLs[i])
.appendTo(li);
});
})
</script>
<body>
<p>
<a href="https://github.com/hapi-server/data-specification/">HAPI</a>
server verifier. See
<a href="https://github.com/hapi-server/verifier-nodejs">verifier-nodejs</a>
for source code for tests.
</p>
<h3>Usage</h3>
<p>
In the following, <code>{id,dataset}</code> means <code>id</code> or <code>dataset</code> allowed;
<code>{time.min,start}</code> means <code>time.min</code> or <code>start</code> allowed;
<code>{time.max,start}</code> means <code>time.max</code> or <code>start</code> allowed
<ul>
<li>
<code>?url=URL</code>
</li>
<li>
<code>?url=URL&{id,dataset}=ID</code>
</li>
<li>
<code>?url=URL&id={id,dataset}&parameter=PARAMETER</code> (note <code>parameter</code> is not plural - only a single parameter may be specified)
</li>
<li>
<code>?url=URL&id={id,dataset}&parameter=PARAMETER&{time.min,start}=HAPIDATETIME&{time.max,start}=HAPIDATETIME</code> where <code>HAPIDATETIME</code> is decribed in the <a href="https://github.com/hapi-server/data-specification/blob/master/hapi-3.1.0/HAPI-data-access-spec-3.1.0.md#376-representation-of-time">HAPI specification</a>.
</li>
<li>
<code>?url=URL&...&metatimeout=MILLISECONDS</code> See below for additional details.
</li>
<li>
<code>?url=URL&...&datatimeout=MILLISECONDS</code> See below for additional details.
</li>
<li>
<code>?url=URL&...&version=VERSION</code> Allowed values are <code>2.0</code>, <code>2.1</code>, <code>3.0</code>, <code>3.1</code>, <code>3.2</code>, and <code>3.3</code>.
</li>
<li>
<code>?url=URL&...&output=OUTPUT</code> Allowed values are <code>html</code> and <code>json</code>.
</li>
</ul>
</p>
<p>
If <code>id</code> or <code>dataset</code> starts with a <code>^</code>, it is interpreted as a regular expression and only datasets with ids that match will be tested.
</p>
<p>
Only a <code>URL</code> that ends in <code>/hapi</code> is required. Only one <code>ID</code> and one <code>PARAMETER</code> may be specified (a comma-separated list is not supported).
</p>
<p>
When only a <code>URL</code> is provided, all datasets and all parameters are checked. For data requests, <code>start=sampleStartDate</code> and <code>stop=sampleStopDate</code> are used if both are given in a dataset's <code>/info</code> response; otherwise <code>start=startDate</code> and <code>stop=startDate+P1D</code> from the <code>/info</code> response are used.
</p>
<p>
The parameters <code>metatimeout</code> and <code>datatimeout</code> set the amount of time in milliseconds before a warning about response time is given. <code>metatimeout</code> applies to all non-<code>/data</code> requests. The defaults are described and given in the function <code>timeout</code> in <a href="https://github.com/hapi-server/verifier-nodejs/blob/master/tests.js">tests.js</a>.
</p>
<h3>Usage Examples</h3>
<p>
<ul>
<li>
Test all datasets and all parameters: <a href="?url=http://hapi-server.org/servers/TestData2.0/hapi">?url=http://hapi-server.org/servers/TestData2.0/hapi</a>
</li>
<li>
Test all parameters in <code>dataset1</code> only: <a href="?url=http://hapi-server.org/servers/TestData2.0/hapi&id=dataset1">?url=http://hapi-server.org/servers/TestData2.0/hapi&id=dataset1</a>
</li>
<li>
Test only parameter <code>scalar</code> in <code>dataset1</code>: <a href="?url=http://hapi-server.org/servers/TestData2.0/hapi&id=dataset1¶meter=scalar">?url=http://hapi-server.org/servers/TestData2.0/hapi&id=dataset1&parameter=scalar</a>
</li>
<li>
Return JSON summary for previous test: <a href="?url=http://hapi-server.org/servers/TestData2.0/hapi&id=dataset1¶meter=scalar&output=json">?url=http://hapi-server.org/servers/TestData2.0/hapi&id=dataset1&parameter=scalar&output=json</a>
</li>
<li>
Test only parameter <code>scalar</code> in <code>dataset1</code> and use a given timerange for data requests: <a href="?url=http://hapi-server.org/servers/TestData2.0/hapi&id=dataset1¶meter=scalar&time.min=1970-01-01&time.max=1970-01-01T00:00:10">?url=http://hapi-server.org/servers/TestData2.0/hapi&id=dataset1&parameter=scalar&time.min=1970-01-01&time.max=1970-01-01T00:00:10</a>
</li>
</ul>
</p>
<h3>Test URLs</h3>
<p>
The following URLs are tested when the verifier is updated.
<ul id="tests">
</ul>
</p>
</body>
</html>