[enviroCar-discuss] How to access the data

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[enviroCar-discuss] How to access the data

staschc
Hi,
 
we're planning to use the data of the envirocar project and tried to download data using the dev [1] and stable data server [2] as described on the Envirocar website. However, both seem to provide only a very limited number of measurements. Could someone explain where and how to retrieve more data?
 
Cheers,
 
Christoph
 
 
 
 
 
------
Christoph Stasch
 
 
 

_______________________________________________
enviroCar-discuss mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/envirocar-discuss
Reply | Threaded
Open this post in threaded view
|

Re: How to access the data

Christian Autermann
On Mon, Sep 9, 2013 at 2:58 PM, Stasch, Christoph
<[hidden email]> wrote:
> Hi,
>
> we're planning to use the data of the envirocar project and tried to
> download data using the dev [1] and stable data server [2] as described on
> the Envirocar website. However, both seem to provide only a very limited
> number of measurements. Could someone explain where and how to retrieve more
> data?
>

Hey Christoph,

all collection resources are paginated [1]. You are only allowed to
request 100 entities at once. Either specify some filters or iterate
over the pages. The bounds can be found in the Link header field[1]…

curl -v https://giv-car.uni-muenster.de/dev/rest/measurements
[...]
< HTTP/1.1 200 OK
< Link: <https://giv-car.uni-muenster.de/dev/rest/measurements?limit=100&page=592>;rel=last;type=application/json
< Link: <https://giv-car.uni-muenster.de/dev/rest/measurements?limit=100&page=2>;rel=next;type=application/json
[...]

curl -v https://giv-car.uni-muenster.de/dev/rest/measurements\?page\=20
[...]
< Link: <https://giv-car.uni-muenster.de/dev/rest/measurements?limit=100&page=1>;rel=first;type=application/json
< Link: <https://giv-car.uni-muenster.de/dev/rest/measurements?limit=100&page=592>;rel=last;type=application/json
< Link: <https://giv-car.uni-muenster.de/dev/rest/measurements?limit=100&page=19>;rel=prev;type=application/json
< Link: <https://giv-car.uni-muenster.de/dev/rest/measurements?limit=100&page=21>;rel=next;type=application/json
[...]

(Whether 100 entities is insufficient for that resource is another question ;))

--Christian

[1] http://envirocar.github.io/enviroCar-server/api/#toc_2
[2] http://tools.ietf.org/html/rfc5988
_______________________________________________
enviroCar-discuss mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/envirocar-discuss
Reply | Threaded
Open this post in threaded view
|

Re: How to access the data

staschc
Hi Christian,

thanks for the quick reply! I've somehow overseen the API Reference link on the server documentation page. That's exactly the information I've been searching for.

Cheers,

Christoph

-----Ursprüngliche Nachricht-----
Von: Christian Autermann [mailto:[hidden email]]
Gesendet: Montag, 9. September 2013 15:09
An: Stasch, Christoph
Cc: [hidden email]
Betreff: Re: [enviroCar-discuss] How to access the data

On Mon, Sep 9, 2013 at 2:58 PM, Stasch, Christoph <[hidden email]> wrote:
> Hi,
>
> we're planning to use the data of the envirocar project and tried to
> download data using the dev [1] and stable data server [2] as
> described on the Envirocar website. However, both seem to provide only
> a very limited number of measurements. Could someone explain where and
> how to retrieve more data?
>

Hey Christoph,

all collection resources are paginated [1]. You are only allowed to request 100 entities at once. Either specify some filters or iterate over the pages. The bounds can be found in the Link header field[1]…

curl -v https://giv-car.uni-muenster.de/dev/rest/measurements
[...]
< HTTP/1.1 200 OK
< Link: <https://giv-car.uni-muenster.de/dev/rest/measurements?limit=100&page=592>;rel=last;type=application/json
< Link: <https://giv-car.uni-muenster.de/dev/rest/measurements?limit=100&page=2>;rel=next;type=application/json
[...]

curl -v https://giv-car.uni-muenster.de/dev/rest/measurements\?page\=20
[...]
< Link: <https://giv-car.uni-muenster.de/dev/rest/measurements?limit=100&page=1>;rel=first;type=application/json
< Link: <https://giv-car.uni-muenster.de/dev/rest/measurements?limit=100&page=592>;rel=last;type=application/json
< Link: <https://giv-car.uni-muenster.de/dev/rest/measurements?limit=100&page=19>;rel=prev;type=application/json
< Link: <https://giv-car.uni-muenster.de/dev/rest/measurements?limit=100&page=21>;rel=next;type=application/json
[...]

(Whether 100 entities is insufficient for that resource is another question ;))

--Christian

[1] http://envirocar.github.io/enviroCar-server/api/#toc_2
[2] http://tools.ietf.org/html/rfc5988
_______________________________________________
enviroCar-discuss mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/envirocar-discuss
Reply | Threaded
Open this post in threaded view
|

[enviroCar-discuss] Workshop materials

Edzer Pebesma
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I uploaded my R workshop material for tomorrow here:

http://rpubs.com/edzer/enviroCar

Comments are welcome, by email, or in the workshop!
- --
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Heisenbergstraße 2, 48149 Münster, Germany. Phone: +49 251
83 33081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSMIK2AAoJEM1OCHCtOnfxzV8H/jkJtrfMtr8uS3+SMhQ8Orvg
84hEeyzdPlZr+iB6aujeBFgeTSyX1XIswSBJCd4B6wkUr1CAUTViO/5vw3khKyEX
qpWIYdQkrIBXWp3TGLyqkVnyeUE9di+rpJ4rsswcXm84VHmU3tW+g3kfqeMoe3ZH
hMz5olsPeZQLygXMlGee8fsMSJI6K217EqecpFdcGHDj5cmgxEmvJjaeJyv9WJwB
7olnolITPEOdqGCbZ70aHsKqlYl97UM/0w7Dlwj9te2W3wjVr+U0rco08EDhRFK5
oempiqXFXTSzbHoiWrKf1oAxG0omKgliEYcxp33p7ZxDEGiQE/u9/90/u9xvrVc=
=25tr
-----END PGP SIGNATURE-----
_______________________________________________
enviroCar-discuss mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/envirocar-discuss