Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API-request: ability to filter the last changed items on list endpoints #525

Open
Kobo-one opened this issue Jul 12, 2022 · 6 comments
Open

Comments

@Kobo-one
Copy link

Would it be possible to add a filter updated_since to the list endpoint.
That way it would be possible to query the endpoints only based on data that changed instead of returning every item.

This would be used by Statik to connect Restarters.net and Repair Connects. We store some of the group and event data to make device live logging possible. This is done using a periodic sync.

Possible endpoints: /groups/network and /events/network

@edwh
Copy link
Collaborator

edwh commented Jul 13, 2022

9c0b255 Add updated_at into API endpoints while we're in the code.

@ngm
Copy link
Contributor

ngm commented Jul 13, 2022

Thanks for logging @Kobo-one - yes we'll add this in, exact name TBC.

@edwh updated_since is more semantic for the kind of filtering that Kobe is after, but is it preferable for it to be named updated_at due to internal naming?

@edwh
Copy link
Collaborator

edwh commented Jul 13, 2022

I think the query parameter to triggering the filtering should be updated_since, but the field on the individual objects should be updated_at.

@ngm
Copy link
Contributor

ngm commented Aug 9, 2022

Hi @Kobo-one ,

The following endpoints should now be available to you:

Both endpoints have the following parameters available:

  • updated_start
  • updated_end

which can take an ISO8601 formatted date, e.g. 2020-01-01. If either are left blank, no restriction to that end of the date range will be made.

@Kobo-one
Copy link
Author

HI @ngm,

Thank you.
It seems there is a new parameter id in the query now.
I used https://restarters.net/api/v2/networks/ to find the correct network-id for our use case but noticed it returned multiple networks.

I was able to get (network, group and event) data from other networks aswel. Is this expected behaviour?

@ngm
Copy link
Contributor

ngm commented Aug 10, 2022

Yes, we haven't chosen to restrict any of the group/event info in v2 for now, given that none of it is personal or private. Given what we discussed about ORDP earlier, it seems potentially possible that we'll expose all of this info in future for that purpose. That said, it's possible we may decide otherwise, or to provide access to everything for ORDP via a different 'firehose' endpoint, so don't necessarily rely on having access to other networks this way in future, just your own :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants