Question

I'm creating a small tool that will fetch new issues from our redmine repository and do some utility task on them. I'm planning the tool to run in background and to poll redmine for new issues ~ every minute.

I have no problems getting all issues via GET /issues.xml API, but I don't know how to correctly poll new issues since last call. The only way i can suggest is to use updated_on field and get issues that has update time > last poll time. Is it correct? And if this is correct, how I can get issues with update time > specified time?

The API documentation page has examples like GET /issues.xml?project_id=2, but this is equality comparison and i need to compare if "update_time" is GREATER THAN specified time.

Of course, GET /issues.xml?update_time>'01.10.10 12:08:41', and I suggest that it must be special syntax for comparison.
Any hints on correct API request I can use?

Was it helpful?

Solution

After communication with developers i have found that correct API request will be:

/issues.xml?sort=updated_on:desc&page=[1..n]

OTHER TIPS

/issues.xml?sort=updated_on%3Adesc&limit=100

This worked for me to get the most recently updated issues. Could not find a solution to only get issues updated after time x. Use &offset=100 ... &offset=200 and so on to get the following issues if you need them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top