Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Purpose: get a list of cases. The list of cases may be presented to the end user a simple list of cases, where each case name incudes a hyperlink to access detailed information about the case.

Base URL: https://www.commcarehq.org/a/[domain]/api/v0.5/case/

Authentication: For more information, please review CommCare's API Authentication Documentationhttps://dimagi.atlassian.net/wiki/x/LwXKfw.

Input parameters:

In addition to all Case Data APIsAPI parameters, you may use the following input parameters to filter results and control paging.

Name

Description

Example

Summary

owner_id

User or Group UUID (optional)

owner_id=ac9d34ff59cf6388e4f5804b12276d8a

All cases owned by that entity (should not use with user)

user_id

User UUID (optional)

user_id=3c5a623af057e23a32ae4000cf291339

All cases last modified by that user

type

Type of case (optional)

type=pregnant_mother

All cases matching the type

closed

Case status (optional)
Supported: false, true (defaults to both)

closed=true

All open/closed/both cases

indexed_on_start

A date (and time). Will return only cases that have had data modified since the passed in date.

indexed_on_start=2021-01-01

indexed_on_start=2021-01-01T06:05:42

This is the recommended field to use for data pagination.

It is very similar to server_date_modified, but handles edge cases better.

indexed_on_end

A date (and time). Will return only cases that have had data modified before the passed in date.

indexed_on_end=2021-01-01

indexed_on_end=2021-01-01T06:05:42


date_modified_start

Modified after this date (phone date)

date_modified_start=2012-05-20

date_modified_start=2013-09-29T10:40Z

Defaults to the first submission date.

date_modified_end

Modifed before this date (phone date)

date_modified_end=2012-05-27

Defaults to the current date.

server_date_modified_start

Modified after this date (server date)

server_date_modified_start=2012-05-20

Defaults to the first submission date.

server_date_modified_end

Modifed before this date (server date)

server_date_modified_end=2012-05-27

Defaults to the current date.

name

Name

name=NEAL


limit

The maximum number of records to return.

limit=100

Defaults to 20. Maximum is 5000.

offset

The number of records to offset in the results.

offset=100

Defaults to 0.

external_id

'external_id' property

external_id=123abc


indexed_on

Indexed on date

order_by=indexed_on

Defaults to the oldest indexed_on date 

server_date_modified

Date after which case was modified on in the server

order_by=server_date_modified

Defaults to oldest server_date_modified

...