Get number of all tracks from server

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

Get number of all tracks from server

BenjaminPross
Hi,

Is there a way to get the number of all tracks from the server? The result I get from calling [1] is limited to 100.

Thanks!
Benjamin

[1] https://giv-car.uni-muenster.de/dev/rest/tracks
Reply | Threaded
Open this post in threaded view
|

Re: Get number of all tracks from server

staschc
Hi Benjamin,

AFAIK that's not possible at the moment, as there is a paging mechanism that restricts the maximum number of results to 100. See previous thread [1].

Cheers,

Christoph

[1] http://envirocar-discuss.forum.52north.org/enviroCar-discuss-How-to-access-the-data-td3.html

-----Ursprüngliche Nachricht-----
Von: [hidden email] [mailto:[hidden email]] Im Auftrag von BenjaminPross
Gesendet: Mittwoch, 25. September 2013 09:30
An: [hidden email]
Betreff: [enviroCar-discuss] Get number of all tracks from server

Hi,

Is there a way to get the number of all tracks from the server? The result I get from calling [1] is limited to 100.

Thanks!
Benjamin

[1] https://giv-car.uni-muenster.de/dev/rest/tracks



--
View this message in context: http://envirocar-discuss.forum.52north.org/Get-number-of-all-tracks-from-server-tp7.html
Sent from the 52°North - Envirocar Discussion Forum mailing list archive at Nabble.com.
_______________________________________________
enviroCar-discuss mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/envirocar-discuss
_______________________________________________
enviroCar-discuss mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/envirocar-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Get number of all tracks from server

Daniel Nüst
In reply to this post by BenjaminPross
Am 25.09.2013 09:51, schrieb Stasch, Christoph:
> AFAIK that's not possible at the moment, as there is a paging mechanism
that restricts the maximum number of results to 100. See previous thread [1].

A paging mechanism should not prevent returning the number of tracks. The
problem is that without that number you cannot jump to the "last" page
because you don't know where it is.

Imho this is a useful new feature to add to the paging links.

/Daniel

> [1]
http://envirocar-discuss.forum.52north.org/enviroCar-discuss-How-to-access-the-data-td3.html
> -----UrsprÃŒngliche Nachricht-----
> Von: [hidden email]
[mailto:[hidden email]] Im Auftrag von
BenjaminPross
> Gesendet: Mittwoch, 25. September 2013 09:30
> An: [hidden email]
> Betreff: [enviroCar-discuss] Get number of all tracks from server Hi,
> Is there a way to get the number of all tracks from the server? The
result I get from calling [1] is limited to 100.
> Thanks!
> Benjamin
> [1] https://giv-car.uni-muenster.de/dev/rest/tracks
> --
> View this message in context:
http://envirocar-discuss.forum.52north.org/Get-number-of-all-tracks-from-server-tp7.html
> Sent from the 52°North - Envirocar Discussion Forum mailing list
archive at Nabble.com.
> _______________________________________________
> enviroCar-discuss mailing list
> [hidden email]
> http://list.52north.org/mailman/listinfo/envirocar-discuss
> _______________________________________________
> enviroCar-discuss mailing list
> [hidden email]
> http://list.52north.org/mailman/listinfo/envirocar-discuss


--
Daniel NÃŒst
52°North Initiative for Geospatial Open Source Software GmbH
Martin-Luther-King-Weg 24
48155 MÃŒnster, Germany
E-Mail: [hidden email]
Fon: +49-(0)-251–396371-36
Fax: +49-(0)-251–396371-11

http://52north.org/
Twitter: @FiveTwoN

General Managers: Dr. Albert Remke, Dr. Andreas Wytzisk
Local Court Muenster HRB 10849




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

Re: Get number of all tracks from server

Christian Autermann
On Wed, Sep 25, 2013 at 10:32 AM, "Daniel Nüst" <[hidden email]> wrote:
> A paging mechanism should not prevent returning the number of tracks. The
> problem is that without that number you cannot jump to the "last" page
> because you don't know where it is.
>
> Imho this is a useful new feature to add to the paging links.
>

Is anybody reading the documentation [1]? You get the last page with
every request. And by requesting only a single track you even can get
the absolute number of tracks if that is a absolute requirement…

curl -v https://giv-car.uni-muenster.de/dev/rest/tracks\?limit\=1\&page\=5
[...]
< Link: <https://giv-car.uni-muenster.de/dev/rest/tracks?limit=1&page=1>;rel=first;type=application/json
< Link: <https://giv-car.uni-muenster.de/dev/rest/tracks?limit=1&page=250>;rel=last;type=application/json
< Link: <https://giv-car.uni-muenster.de/dev/rest/tracks?limit=1&page=4>;rel=prev;type=application/json
< Link: <https://giv-car.uni-muenster.de/dev/rest/tracks?limit=1&page=6>;rel=next;type=application/json[...]

--Christian

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

Re: Get number of all tracks from server

BenjaminPross
From reading the documentation, it didn't occur to me that you could get the number of all tracks like that. Seems logical, though... I think, I can work with that, thanks!

Cheers,

Benjamin
Reply | Threaded
Open this post in threaded view
|

Re: Get number of all tracks from server

Daniel Nüst
In reply to this post by BenjaminPross
Am 25.09.2013 11:55, schrieb Christian Autermann:
> Is anybody reading the documentation [1]?

Sorry! I actually did not check it in this case, I just assumed if a
"last" page would have been there Benjamin would have used it ;-).

/Daniel

--
Daniel NÃŒst
52°North Initiative for Geospatial Open Source Software GmbH
Martin-Luther-King-Weg 24
48155 MÃŒnster, Germany
E-Mail: [hidden email]
Fon: +49-(0)-251–396371-36
Fax: +49-(0)-251–396371-11

http://52north.org/
Twitter: @FiveTwoN

General Managers: Dr. Albert Remke, Dr. Andreas Wytzisk
Local Court Muenster HRB 10849




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

Re: Get number of all tracks from server

BenjaminPross
I think two posts before this one would have been a good moment to close this topic :-) I volunteer to be a moderator for this forum!

Cheers,

Benjamin