Gebruik onderstaande URL-sjablonen om een overzicht van de bestanden in uw documentbibliotheek te maken.
Ondersteunde HTTP-methoden
GET
URL-sjablonen
Maak een inventarislijst van alle bestanden, inclusief metadata.
http://api.gisblox.com/REST/v1/gridstatistics/manage/inventory?format=format&key=PersoonlijkeGISBloxSleutel
Lees de metadata van een enkel bestand.
http://api.gisblox.com/REST/v1/gridstatistics/manage/inventory?file=filename&format=format&key=PersoonlijkeGISBloxSleutel
Parameters
Opmerking
Parameternamen en -waarden zijn niet hoofdlettergevoelig.
Parameter |
Omschrijving |
Waarde |
file |
Optioneel De naam van het bronbestand waarvoor metadata opgehaald moet worden. |
Een string met de bestandsnaam. Laat deze parameter weg om een inventarislijst van alle bestanden in uw documentbibliotheek op te halen.
Voorbeeld: file=enquete2013
|
format |
Optioneel Het output-formaat van de respons. |
Eén van de volgende opties:
- xml [standaardwaarde]
- json
Voorbeeld: format=json
|
key |
Vereist Specificeert de GISBlox API-sleutel die voor dit verzoek gebruikt moet worden. |
Een geldige GISBlox API-sleutel.
Voorbeeld: key=abc1234def56789
|
Respons
Als antwoord op een HTTP-verzoek wordt een respons-object geretourneerd. Afhankelijk van de waarde van input-parameter format, heeft het respons-object het volgende output-formaat:
- XML (application/xml)
- JSON (application/json)
Voorbeelden
Creëer een inventarislijst van alle bestanden in mijn documentbibliotheek
In onderstaand voorbeeld wordt een inventarislijst van alle bestanden gemaakt, inclusief metadata.
http://api.gisblox.com/REST/v1/gridstatistics/manage/inventory?key=PersoonlijkeGISBloxSleutel
XML Response
<Response xmlns="http://schemas.gisblox.com/rest/v1/gridstatistics" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Copyright>Copyright © 2011-2017 Bartels Online. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Bartels Online.</Copyright>
<StatusCode>200</StatusCode>
<StatusDescription>OK</StatusDescription>
<ErrorDetails />
<TraceId>8FF19DAE-A073-40B8-BEF0-51070CAB9E86/eeea4a47-572e-4bc6-9a71-431294fc3145/-728168344</TraceId>
<Resource i:type="DataFileMetaDataCollection">
<ItemId>1</ItemId>
<FileCount>2</FileCount>
<DataFiles>
<DataFileMetaData>
<ItemId>1</ItemId>
<Name>Enquete2012</Name>
<FileType>Excel file</FileType>
<Created>2013-03-16T18:27:35.65</Created>
<Modified>2013-03-16T18:27:37.557</Modified>
<Description />
<FileSize>1081883</FileSize>
</DataFileMetaData>
<DataFileMetaData>
<ItemId>2</ItemId>
<Name>Enquete2013</Name>
<FileType>Flat data file</FileType>
<Created>2013-04-09T19:18:51.083</Created>
<Modified>2013-04-09T19:18:52.15</Modified>
<Description />
<FileSize>541211</FileSize>
</DataFileMetaData>
</DataFiles>
</Resource>
</Response>
JSON Response
{
"Copyright": "Copyright © 2011-2017 Bartels Online. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Bartels Online.",
"StatusCode": 200,
"StatusDescription": "OK",
"ErrorDetails": "",
"TraceId": "8FF19DAE-A073-40B8-BEF0-51070CAB9E86\/e203e1d1-5260-4ce2-b2bb-5615723130b3\/1822319343",
"Resource": {
"__type": "DataFileMetaDataCollection:http:\/\/schemas.gisblox.com\/rest\/v1\/gridstatistics",
"ItemId": 1,
"FileCount": 2,
"DataFiles": [
{
"ItemId": 1,
"Name": "Enquete2012",
"FileType": "Excel file",
"Created": "\/Date(1366129655650+0200)\/",
"Modified": "\/Date(1366129657557+0200)\/",
"Description": "",
"FileSize": 1081883
},
{
"ItemId": 2,
"Name": "Enquete2013",
"FileType": "Flat data file",
"Created": "\/Date(1365527931083+0200)\/",
"Modified": "\/Date(1365527932150+0200)\/",
"Description": "",
"FileSize": 541211
}
]
}
}
Haal de metadata op van een bestand in mijn documentbibliotheek
In onderstaand voorbeeld wordt de metadata van bestand 'enquete2013' opgevraagd.
http://api.gisblox.com/REST/v1/gridstatistics/manage/inventory?file=enquete2013&key=PersoonlijkeGISBloxSleutel
XML Response
<Response xmlns="http://schemas.gisblox.com/rest/v1/gridstatistics" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Copyright>Copyright © 2011-2017 Bartels Online. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Bartels Online.</Copyright>
<StatusCode>200</StatusCode>
<StatusDescription>OK</StatusDescription>
<ErrorDetails />
<TraceId>8FF19DAE-A073-40B8-BEF0-51070CAB9E86/2d78e362-ab82-4716-87e6-fb79acf0a000/-1407731429</TraceId>
<Resource i:type="DataFileMetaDataCollection">
<ItemId>1</ItemId>
<FileCount>1</FileCount>
<DataFiles>
<DataFileMetaData>
<ItemId>1</ItemId>
<Name>Enquete2013</Name>
<FileType>Flat data file</FileType>
<Created>2013-04-09T19:18:51.083</Created>
<Modified>2013-04-09T19:18:52.15</Modified>
<Description />
<FileSize>541211</FileSize>
</DataFileMetaData>
</DataFiles>
</Resource>
</Response>
JSON Response
{
"Copyright": "Copyright © 2011-2017 Bartels Online. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Bartels Online.",
"StatusCode": 200,
"StatusDescription": "OK",
"ErrorDetails": "",
"TraceId": "8FF19DAE-A073-40B8-BEF0-51070CAB9E86\/c6580591-05a3-4323-90c3-273335dff2c9\/772350230",
"Resource": {
"__type": "DataFileMetaDataCollection:http:\/\/schemas.gisblox.com\/rest\/v1\/gridstatistics",
"ItemId": 1,
"FileCount": 1,
"DataFiles": [
{
"ItemId": 1,
"Name": "Enquete2013",
"FileType": "Flat data file",
"Created": "\/Date(1365527931083+0200)\/",
"Modified": "\/Date(1365527932150+0200)\/",
"Description": "",
"FileSize": 541211
}
]
}
}
HTTP-statuscodes
Na een succesvol verzoek wordt de volgende HTTP-statuscode geretourneerd.
Na een niet-succesvol verzoek wordt een van de volgende foutcodes geretourneerd.
Verwante onderwerpen
Laatst gewijzigd: 2018-10-18