Case exports - ability to apply search criteria

I see that both the CCHQ case export UI and the case export API [1] support
excluding closed cases. I seem to remember the export API also supporting
a 'group' parameter, although I don't see this in the Wiki.

If possible, I would like to like to use the export API to download a *
subset* of all cases associated with my domain. This capability would be
used to automatically generate case exports for different users. Search
criteria that I would like to apply include:

  • Constrain the case list of only include cases that are open; which is
    already supported by both the UI and the API, and documented in the Wiki
  • Constrain the case list to only include cases owned by specified
    group(s); I suspect a group constraint is already supported, but I'm not
    sure
  • Constrain the case list to only include cases with specific case types
  • Constrain the case list to only include cases that have been modified in
    the last 'N' days

Are any of the last three capabilities already supported by hidden API
parameters?

Thanks, Ray

[1] Export API - CommCare Public - CommCare Public

Hi Ray,

You can filter by open status as documented and by group
(?group=[group_id]). The way the group filter works is it gets the set of
users in that group, and then gets only cases that "belongs to" one of the
users. If you're using our bleeding-edge case-sharing feature, then it gets
hairier, because users and cases are no longer one-to-one. We haven't
ironed that out in reports yet. We don't have a date filter set up, however.

Cheers,
Danny

··· 2012/4/10 Ray Brunsting

I see that both the CCHQ case export UI and the case export API
[1] support excluding closed cases. I seem to remember the export API also
supporting a 'group' parameter, although I don't see this in the Wiki.

If possible, I would like to like to use the export API to download a *
subset* of all cases associated with my domain. This capability would be
used to automatically generate case exports for different users. Search
criteria that I would like to apply include:

  • Constrain the case list of only include cases that are open; which is
    already supported by both the UI and the API, and documented in the Wiki
  • Constrain the case list to only include cases owned by specified
    group(s); I suspect a group constraint is already supported, but I'm not
    sure
  • Constrain the case list to only include cases with specific case types
  • Constrain the case list to only include cases that have been modified in
    the last 'N' days

Are any of the last three capabilities already supported by hidden API
parameters?

Thanks, Ray

[1] Export API - CommCare Public - CommCare Public

I see that both the CCHQ case export UI and the case export API
[1] support excluding closed cases. I seem to remember the export API also
supporting a 'group' parameter, although I don't see this in the Wiki.

If possible, I would like to like to use the export API to download a *
subset* of all cases associated with my domain. This capability would
be used to automatically generate case exports for different users. Search
criteria that I would like to apply include:

  • Constrain the case list of only include cases that are open; which is
    already supported by both the UI and the API, and documented in the Wiki
  • Constrain the case list to only include cases owned by specified
    group(s); I suspect a group constraint is already supported, but I'm not
    sure
  • Constrain the case list to only include cases with specific case types

Also, just wanted to mention that you can now use custom case exports to
get a customized view of the cases by type, but there isn't currently great
API access for it.

Cory

··· On Tue, Apr 10, 2012 at 4:34 PM, Daniel Roberts wrote: > 2012/4/10 Ray Brunsting
  • Constrain the case list to only include cases that have been modified in

the last 'N' days

Are any of the last three capabilities already supported by hidden API
parameters?

Thanks, Ray

[1] Export API - CommCare Public - CommCare Public