...
Request parameters
- filterId (string): Filter id.
- documentVersion (string): File format version.
- documentFormat (string): PI_XML (default) or PI_JSON
- showAttributes (boolean): toggle to show locations attributes.
Response
- Locations PI-XML or PI-JSON file content.
...
Code Block |
---|
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/locations?showAttributes=true&documentVersion=1.24"
|
Example PI-XML response
Code Block |
---|
<?xml version="1.0" encoding="UTF-8"?> <Locations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews/PI" xsi:schemaLocation="http://www.wldelft.nl/fews/PI http://fews.wldelft.nl/schemas/version1.0/pi-schemas/pi_locations.xsd" version="1.2324"> <geoDatum>WGS 1984</geoDatum> <location locationId="10160355000"> <description>SKIKDA</description> <shortName>SKIKDA</shortName> <lat>36.93</lat> <lon>6.95</lon> <x>6.95</x> <y>36.93</y> <z>7.0</z> </location> <attribute <location locationIdid="country" name="10160360000country"> <description>ANNABA</description> <text>101</text> <shortName>ANNABA<</shortName>attribute> <lat>36.83</lat> <attribute id="popSize" name="popSize"> <lon>7.82</lon> <x>7.82<<text>107</x>text> <y>36.83<</y>attribute> <z>4.0</z><attribute id="oceanDistance" name="oceanDistance"> </location> </Locations> |
Example PI-JSON response
<text>1</text>
</attribute>
</location>
<location locationId="10160360000">
<description>ANNABA</description>
<shortName>ANNABA</shortName>
<lat>36.83</lat>
<lon>7.82</lon>
<x>7.82</x>
<y>36.83</y>
<z>4.0</z>
<attribute id="country" name="country">
<text>101</text>
</attribute>
<attribute id="popSize" name="popSize">
<text>256</text>
</attribute>
<attribute id="oceanDistance" name="oceanDistance">
<text>1</text>
</attribute>
</location>
</Locations> |
Example PI-JSON response
Code Block | ||
---|---|---|
| ||
{
"version" : "1.23",
"geoDatum" : "WGS 1984",
"locations" : [ {
"locationId" : "10160355000",
"description" : "SKIKDA",
"shortName" : "SKIKDA",
"lat" : "36.93",
"lon" : "6.95",
"x" : "6.95",
"y" : "36.93",
"z" : "7.0",
"attributes" : [ {
"name" : "country",
"type" : "text",
"id" : "country",
"value" : "101"
}, {
"name" : "popSize",
"type" : "text",
"id" : "popSize",
"value" : "107"
}, {
"name" : "oceanDistance",
"type" : "text",
"id" : "oceanDistance",
"value" : "1"
}]
}, {
"locationId" : "10160360000",
"description" : "ANNABA",
"shortName" : "ANNABA",
"lat" : "36.83",
"lon" : "7.82",
"x" : "7.82 | ||
Code Block | ||
| ||
{ "version" : "1.23", "geoDatum" : "WGS 1984", "locations" : [ { "locationId" : "10160355000", "descriptiony" : "SKIKDA36.83", "shortNamez" : "SKIKDA4.0", "latattributes" : "36.93", [ { "lonname" : "6.95country", "xtype" : "6.95text", "yid" : "36.93country", "zvalue" : "7.0101" }, { "locationIdname" : "10160360000popSize", "descriptiontype" : "ANNABAtext", "shortNameid" : "ANNABApopSize", "latvalue" : "36.83", 256" }, { "lonname" : "7.82oceanDistance", "xtype" : "7.82text", "yid" : "36.83oceanDistance", "zvalue" : "4.0"1" } ] }] } |
GET parameters
Retrieve Pi Parameters file containing all parameters that are available for the passed 'filterId' argument. If no filterId is passed then all parameters configured in the pre-defined filter will be returned.
...