Blame view

src/DDSERVICES/HAPI/catalog.php 534 Bytes
99a4a488   Elena.Budnik   HAPI services draft
1
2
3
4
<?php
    
    $response = array();
    $response["HAPI"] = "2.0"; 
7b25cb53   Elena.Budnik   hapi : status : o...
5
    $response["status"] = array("code" => 1200, "msg" => "OK");
99a4a488   Elena.Budnik   HAPI services draft
6
7
8
9
10
11
12
13
14

    $catalog = array();
    $datasets = file("AMDA_HAPI.list");
   
    foreach ($datasets as $dataset) {
        $catalog[] = array("id" => str_replace("\n","",$dataset));
    }

    $response["catalog"] = $catalog;
f3e98005   Elena.Budnik   index.html + head...
15
16
    
    header('Content-Type: application/json');
9ecc3961   Elena.Budnik   nc var name; cors...
17
    header("Access-Control-Allow-Origin: *");
2419e2cc   Elena Budnik   cors header for data
18
    header("Access-Control-Allow-Methods: GET");
9ecc3961   Elena.Budnik   nc var name; cors...
19

99a4a488   Elena.Budnik   HAPI services draft
20
21
    exit(json_encode($response));
?>