Newer
Older
<app-spinner *ngIf="attributeListIsLoading | async"></app-spinner>
<div class="jumbotron">
<div class="row align-items-center">
<div class="col-md-12 order-md-1 text-justify text-md-left pr-md-5">
<h2 class="mb-3">Export server documentation</h2>
<h4>URL construction</h4>
<p>
To request the server, you need to construct a correct URL. Just below you can find the URL schema and a
description of mandatory parameters:
</p>
<code>{{ getUrlServer() }}/search/dataset?a=id_attribute&c=id_attribute::operator::value</code>
<ul>
<li>
<code>dataset</code>: dataset in which to search. See datasets section for available datasets.
</li>
<li>
<code>a</code>: output parameters as attributes id list semicolon separated. See outputs section for available attributes.
</li>
<blockquote>a=1;2;3</blockquote>
<li>
<code>c</code>: criteria list separated with semicolon. A criterion is defined by an id_attribute,
an operator and a value. See operators section for available operators.
</li>
<blockquote>c=3::eq::ping;2::eq::pong</blockquote>
</ul>
<app-output-list
[datasetSelected]="datasetSelected | async"
[attributeList]="attributeList | async">
</app-output-list>
<table id="operator-table" aria-describedby="Operator description">
<th id="operator">operator</th>
<th id="description">description</th>
<th id="usage">usage</th>
<th id="example">example</th>
<td headers="operator">eq</td>
<td headers="description">equal to</td>
<td headers="usage"><code>c=id_attribute::eq::value</code></td>
<td headers="example"><code>c=1::eq::89</code></td>
<td headers="operator">neq</td>
<td headers="description">not equal to</td>
<td headers="usage"><code>c=id_attribute::neq::value</code></td>
<td headers="example"><code>c=1::neq::89</code></td>
<td headers="operator">gt</td>
<td headers="description">greater than</td>
<td headers="usage"><code>c=id_attribute::gt::value</code></td>
<td headers="example"><code>c=1::gt::1.5</code></td>
<td headers="operator">gte</td>
<td headers="description">greater than or equal to</td>
<td headers="usage"><code>c=id_attribute::gte::value</code></td>
<td headers="example"><code>c=1::gte::2</code></td>
<td headers="operator">lt</td>
<td headers="description">lower than</td>
<td headers="usage"><code>c=id_attribute::lt::value</code></td>
<td headers="example"><code>c=1::lt::1.5</code></td>
<td headers="operator">lte</td>
<td headers="description">lower than or equal to</td>
<td headers="usage"><code>c=id_attribute::lte::value</code></td>
<td headers="example"><code>c=1::lte::2</code></td>
<td headers="operator">bw</td>
<td headers="description">between</td>
<td headers="usage"><code>c=id_attribute::bw::value_min|value_max</code></td>
<td headers="example"><code>c=1::bw::10|90</code></td>
<td headers="operator">lk</td>
<td headers="description">like</td>
<td headers="usage"><code>c=id_attribute::lk::value</code></td>
<td headers="example"><code>c=1::lk::ping</code></td>
<td headers="operator">nlk</td>
<td headers="description">not like</td>
<td headers="usage"><code>c=id_attribute::nlk::value</code></td>
<td headers="example"><code>c=1::nlk::pong</code></td>
<td headers="operator">in</td>
<td headers="description">in</td>
<td headers="usage"><code>c=id_attribute::in::value_x|value_y|value_z</code></td>
<td headers="example"><code>c=1::in::ping|pong|paff</code></td>
<td headers="operator">nin</td>
<td headers="description">not in</td>
<td headers="usage"><code>c=id_attribute::nin::value_x|value_y|value_z</code></td>
<td headers="example"><code>c=1::nin::ping|pong|paf</code></td>
<td headers="operator">nl</td>
<td headers="description">is null</td>
<td headers="usage"><code>c=id_attribute::nl</code></td>
<td headers="example"><code>c=1::nl</code></td>
<td headers="operator">nnl</td>
<td headers="description">is not null</td>
<td headers="usage"><code>c=id_attribute::nnl</code></td>
<td headers="example"><code>c=1::nnl</code></td>
<td headers="operator">js</td>
<td headers="description">json</td>
<td headers="usage"><code>c=id_attribute::js::extension,keyword|operator|value</code></td>
<td headers="example"><code>c=1::js::PrimaryHDU,ID|eq|45</code></td>
<h4>Examples</h4>
We supposed to have the dataset ping with following attributes:
<table id="examples-table" aria-describedby="Attribute list example">
<th id="id">id</th>
<th id="attribute">attribute</th>
<td headers="id">1</td>
<td headers="attribute">obs_id</td>
<td headers="id">2</td>
<td headers="attribute">ra</td>
<td headers="id">3</td>
<td headers="attribute">dec</td>
<td headers="id">4</td>
<td headers="attribute">instrument</td>
</tr>
</table>
<blockquote>{{ getUrlServer() }}/search/ping?a=1;2;3&c=1::eq::1</blockquote>
<p>This will return the <code>obs_id</code> with its value equals to 1 and display <code>obs_id</code>, <code>RA</code> and <code>DEC</code> as
outputs.</p>
<blockquote>
{{ getUrlServer() }}/search/ping?a=1;2;3;4&c=4::in::TEL_1|TEL_2
</blockquote>
<p>This will return a list of <code>TEL_1</code> or <code>TEL_2</code> observations with all available
outputs.</p>
<blockquote>
{{ getUrlServer() }}/search/ping?a=1&c=2::gt::1;3::gt::2
</blockquote>
<p>This will return a list of <code>obs_id</code> where <code>RA</code> is greater than 1 and <code>DEC</code> is greater than 2</p>
</div>
</div>
</div>
<a routerLink='/instance/{{ instanceSelected | async }}/documentation' class="btn btn-outline-secondary mt-3">
<span class="fas fa-arrow-left"></span> Return to previous page
</a>