Skip to content
Snippets Groups Projects
documentation.component.html 15.1 KiB
Newer Older
  • Learn to ignore specific revisions
  • <div class="container">
        <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>{{ apiPath }}/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 separeted 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>
        
                    <h4>Available parameters</h4>
        
                    <h5>Datasets</h5>
                    <table id="table">
                        <tr>
                            <th>dataset</th>
                            <th>description</th>
                        </tr>
                        <tr>
                            <td>l1</td>
                            <td>L0 & L1 products list</td>
                        </tr>
                        <tr>
                            <td>products</td>
                            <td>SR3 & SR4 products list</td>
                        </tr>
                        <tr>
                            <td>sp_cards</td>
                            <td>Contains metadata of scientific products (Core Program & General Program)</td>
                        </tr>
                    </table>
        
                    <h5>Outputs</h5>
                    <div class="row">
                        <div class="col">
                            <h6>L0/L1 output list</h6>
                            <table id="table">
                                <tr>
                                    <th>id</th>
                                    <th>attribute</th>
                                </tr>
                                <tr>
                                    <td>1</td>
                                    <td>rawproduct_id</td>
                                </tr>
                                <tr>
                                    <td>2</td>
                                    <td>filename</td>
                                </tr>
                                <tr>
                                    <td>3</td>
                                    <td>level</td>
                                </tr>
                                <tr>
                                    <td>4</td>
                                    <td>obs_id</td>
                                </tr>
                                <tr>
                                    <td>5</td>
                                    <td>obs_seq</td>
                                </tr>
                                <tr>
                                    <td>6</td>
                                    <td>obs_num</td>
                                </tr>
                                <tr>
                                    <td>7</td>
                                    <td>obs_type</td>
                                </tr>
                                <tr>
                                    <td>8</td>
                                    <td>object_id</td>
                                </tr>
                                <tr>
                                    <td>9</td>
                                    <td>source_id</td>
                                </tr>
                                <tr>
                                    <td>10</td>
                                    <td>apid</td>
                                </tr>
                                <tr>
                                    <td>11</td>
                                    <td>category</td>
                                </tr>
                                <tr>
                                    <td>12</td>
                                    <td>instrument</td>
                                </tr>
                                <tr>
                                    <td>13</td>
                                    <td>detector</td>
                                </tr>
                                <tr>
                                    <td>14</td>
                                    <td>version</td>
                                </tr>
                                <tr>
                                    <td>15</td>
                                    <td>ext_name</td>
                                </tr>
                                <tr>
                                    <td>16</td>
                                    <td>ext_rel</td>
                                </tr>
                                <tr>
                                    <td>17</td>
                                    <td>group_name</td>
                                </tr>
                                <tr>
                                    <td>18</td>
                                    <td>packet_id</td>
                                </tr>
                                <tr>
                                    <td>19</td>
                                    <td>start_stime</td>
                                </tr>
                                <tr>
                                    <td>20</td>
                                    <td>end_stime</td>
                                </tr>
                                <tr>
                                    <td>21</td>
                                    <td>conf_min</td>
                                </tr>
                                <tr>
                                    <td>22</td>
                                    <td>conf_max</td>
                                </tr>
                                <tr>
                                    <td>23</td>
                                    <td>temp_low</td>
                                </tr>
                                <tr>
                                    <td>24</td>
                                    <td>temp_high</td>
                                </tr>
                            </table>
                        </div>
                        <div class="col">
                            <h6>Scientific products output list</h6>
                            <table id="table">
                                <tr>
                                    <th>id</th>
                                    <th>attribute</th>
                                </tr>
                                <tr>
                                    <td>1</td>
                                    <td>product_id</td>
                                </tr>
                                <tr>
                                    <td>2</td>
                                    <td>obs_id</td>
                                </tr>
                                <tr>
                                    <td>3</td>
                                    <td>sp_acronym</td>
                                </tr>
                                <tr>
                                    <td>4</td>
                                    <td>filename</td>
                                </tr>
                                <tr>
                                    <td>5</td>
                                    <td>criteria</td>
                                </tr>
                                <tr>
                                    <td>6</td>
                                    <td>added_at</td>
                                </tr>
                                <tr>
                                    <td>7</td>
                                    <td>version</td>
                                </tr>
                                <tr>
                                    <td>8</td>
                                    <td>program</td>
                                </tr>
                                <tr>
                                    <td>9</td>
                                    <td>instrument</td>
                                </tr>
                                <tr>
                                    <td>10</td>
                                    <td>type</td>
                                </tr>
                            </table>
                        </div>
                        
                        <div class="col">
                            <h6>SP Metadata output list</h6>
                            <table id="table">
                                <tr>
                                    <th>id</th>
                                    <th>attribute</th>
                                </tr>
                                <tr>
                                    <td>1</td>
                                    <td>acronym</td>
                                </tr>
                                <tr>
                                    <td>2</td>
                                    <td>sp_id</td>
                                </tr>
                                <tr>
                                    <td>3</td>
                                    <td>version</td>
                                </tr>
                                <tr>
                                    <td>4</td>
                                    <td>program</td>
                                </tr>
                                <tr>
                                    <td>5</td>
                                    <td>instrument</td>
                                </tr>
                                <tr>
                                    <td>6</td>
                                    <td>type</td>
                                </tr>
                                <tr>
                                    <td>7</td>
                                    <td>json_schema</td>
                                </tr>
                                <tr>
                                    <td>8</td>
                                    <td>search_kw</td>
                                </tr>
                                <tr>
                                    <td>9</td>
                                    <td>json_schema_uploaded</td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    
                    <h5>Operators</h5>
                    <table id="table">
                        <tr>
                            <th>operator</th>
                            <th>description</th>
                            <th>usage</th>
                            <th>example</th>
                        </tr>
                        <tr>
                            <td>eq</td>
                            <td>equal to</td>
                            <td><code>c=id_attribute::eq::value</code></td>
                            <td><code>c=1::eq::89</code></td>
                        </tr>
                        <tr>
                            <td>neq</td>
                            <td>not equal to</td>
                            <td><code>c=id_attribute::neq::value</code></td>
                            <td><code>c=1::neq::89</code></td>
                        </tr>
                        <tr>
                            <td>gt</td>
                            <td>greater than</td>
                            <td><code>c=id_attribute::gt::value</code></td>
                            <td><code>c=1::gt::1.5</code></td>
                        </tr>
                        <tr>
                            <td>gte</td>
                            <td>greater than or equal to</td>
                            <td><code>c=id_attribute::gte::value</code></td>
                            <td><code>c=1::gte::2</code></td>
                        </tr>
                        <tr>
                            <td>lt</td>
                            <td>lower than</td>
                            <td><code>c=id_attribute::lt::value</code></td>
                            <td><code>c=1::lt::1.5</code></td>
                        </tr>
                        <tr>
                            <td>lte</td>
                            <td>lower than or equal to</td>
                            <td><code>c=id_attribute::lte::value</code></td>
                            <td><code>c=1::lte::2</code></td>
                        </tr>
                        <tr>
                            <td>bw</td>
                            <td>between</td>
                            <td><code>c=id_attribute::bw::value_min|value_max</code></td>
                            <td><code>c=1::bw::10|90</code></td>
                        </tr>
                        <tr>
                            <td>lk</td>
                            <td>like</td>
                            <td><code>c=id_attribute::lk::value</code></td>
                            <td><code>c=1::lk::ECL</code></td>
                        </tr>
                        <tr>
                            <td>nlk</td>
                            <td>not like</td>
                            <td><code>c=id_attribute::nlk::value</code></td>
                            <td><code>c=1::nlk::ECL</code></td>
                        </tr>
                        <tr>
                            <td>in</td>
                            <td>in</td>
                            <td><code>c=id_attribute::in::value_x|value_y|value_z</code></td>
                            <td><code>c=1::in::TT_ECL|TT_GRM|TT_VT</code></td>
                        </tr>
                        <tr>
                            <td>nin</td>
                            <td>not in</td>
                            <td><code>c=id_attribute::nin::value_x|value_y|value_z</code></td>
                            <td><code>c=1::nin::TT_ECL|TT_GRM|TT_VT</code></td>
                        </tr>
                        <tr>
                            <td>nl</td>
                            <td>is null</td>
                            <td><code>c=id_attribute::nl</code></td>
                            <td><code>c=1::nl</code></td>
                        </tr>
                        <tr>
                            <td>nnl</td>
                            <td>is not null</td>
                            <td><code>c=id_attribute::nnl</code></td>
                            <td><code>c=1::nnl</code></td>
                        </tr>
                        <tr>
                            <td>js</td>
                            <td>json</td>
                            <td><code>c=id_attribute::js::extension,keyword|operator|value</code></td>
                            <td><code>c=1::js::PrimaryHDU,OBS_ID|eq|45</code></td>
                        </tr>
                    </table>
        
                    <h4>Examples</h4>
                    <blockquote>{{ apiPath }}/search/l1?a=1;2;3&c=1::eq::1</blockquote>
                    <p>This will return the raw product with id equals to 1 and display its rawproduct_id, filename and level as
                        outputs.</p>
                    <blockquote>
                        {{ apiPath }}/search/products?a=1;2;3;4;5;6;7;8;9;10&c=3::in::TT_ECL|TT_GRM
                    </blockquote>
                    <p>This will return a list of <code>TT_ECL</code> or <code>TT_GRM</code> products with all available
                        outputs.</p>
                    <blockquote>
                        {{ apiPath }}/search/products?a=1&c=3::eq::LAMTEST_DC1;5::js::PrimaryHDU,OBS_ID|nnl
                    </blockquote>
                    <p>This will return a list of product id of <code>LAMTEST_DC1</code> scientific product where the searchable
                        keyword <code>OBS_ID</code> is not null.</p>
                </div>
            </div>
        </div>
    </div>