API sisenemispunkt asub aadressil https://ecobank.botany.ut.ee/wfs.php. EcoBank kasutab ArcGIS Web Feature Service (WFS) süsteemi, millele on võimalik GET või POST käskudega saata päringuid.

Päringud

Päring Kirjeldus
https://ecobank.botany.ut.ee/wfs.php?
service=wfs&
version=1.1.0&
request=GetCapabilities
Kuvab kõik võimalikud päringutüübid XML formaadis.
https://ecobank.botany.ut.ee/wfs.php?
service=wfs&
version=1.1.0&
request=DescribeFeatureType&
[typeName=featureType]
Kuvab kõik võimalikud andmetüübid XML formaadis. Võimalik typeName parameetriga määrata huvi pakkuva andmetüübi mudel.
https://ecobank.botany.ut.ee/wfs.php?
service=wfs&
version=1.1.0&
request=GetFeature&
&typeName=featureType&[featureID=feature&
count=N&
maxFeatures=N&
sortBy=attribute+D]
Kuvab huvipakkuva kasutaja poolt määratud andmetüübi andmestiku.

HTTP tagastus koodid

Kood Tekst Kirjeldus
200 OK Päring oli korrektne!
304 Not Modified Andmeid ei ole uuendatud.
400 Bad Request Päringu viga. Kaasa tulev veakirjeldus näitab ära, mistõttu päring vigaseks osutus, aitamaks kasutajal/programmeerijal päringut täiustada.
401 Unauthorized Autoriseerimiseks vajalikud vahendid puuduvad või ei sisestatud korrektset parooli.
403 Forbidden Päringust saadakse aru, aga mingitel põhjustel ei lubata päringut teostada. Lisatakse kirjeldus, miks päringut ei teostata.
404 Not Found Lehekülge ei leitud. Kontrollida pöördumispunkti aadressit.
410 Gone Resurss on maha võetud, näitamaks et varem aktiivne pääsupunkt on keelatud.
429 Too Many Requests Liiga palju päringuid tehtud lühikese ajaga.
500 Internal Server Error Midagi on katki, päringu täitmine ebaõnnestus.
502 Bad Gateway EcoBank lehekülg on mahavõetud või uuendamisel.
503 Service Unavailable EcoBank lehekülg on olemas, aga ülekoormatud liigsete päringutega. Proovige hiljem uuesti.
504Gateway timeoutEcoBank lehekülg on olemas, aga mingitel põhjustel ei suudetud täita päringut mõistliku ajajooksul, seega katkestati pikk päring. Proovige hiljem uuesti.

Error Codes

In addition to descriptive error text, error messages contain machine-parseable codes. While the text for an error message may change, the codes will stay the same. The following table describes the codes which may appear when working with the API:

Code Text Description
1 Request method is incorrect. Should be POST Corresponds with an HTTP 400
2 Required parameter is missing Corresponds with an HTTP 400
3 You are not allowed to access this project/issue Corresponds with an HTTP 403
4 Unknown error occurred Corresponds with an HTTP 403
34 Sorry, that page does not exist Corresponds with an HTTP 404 - the specified resource was not found.
64 Your account is suspended and is not permitted to access this feature Corresponds with an HTTP 403 - the API key being used belongs to a suspended user and they can't complete the action you're trying to take.
130 Over capacity Corresponds with an HTTP 503 - EcoBank is temporarily over capacity.
131 Internal error Corresponds with an HTTP 500 - An unknown internal error occurred.
215 Bad authentication data The method requires authentication but it was not presented or was wholly invalid.