Versions Compared

Key

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

Purpose: get all of the data associated with a case, including all case property values, a list of associated forms and a list of associated referrals. The case data may be presented to the end user as a case details screen.

Base URL: https://www.commcarehq.org/a/[domain]/api/[version]/case/[case_id]/

Authentication: For more information, please review CommCare's API Authentication Documentation.

Input parameters:

Name

Description

Values

Example

Status

format

Return data format

xml, json

format=xml

Supported

properties

Whether to include properties

all, none

properties=all

Proposed

indices

Whether to include indices

all, none

indices=all

Proposed

xforms_by_name__full

Whether to include all xforms by name

true

xforms_by_name__full=true

Supported

xforms_by_xmls__full

Whether to include all xforms by xmlns

true

xforms_by_xmlns__full=true

Supported

child_cases__full

Whether to include child cases

true

child_cases__full=true

Supported since version 4

parent_cases__full

Whether to include parent cases

true

parent_cases__full=true

Supported since version 4

Output values: 

Name

Description

Example

case_id

Case UUID

0X9OCW3JMV98EYOVN32SGN4II

user_name

User name of case owner, including domain

jdoe@example.commcarehq.org

user_id

UUID of user that owns the case

3c5a623af057e23a32ae4000cf291339

date_modified

Date and time case was last modified

2011-12-13T15:09:47Z

closed

Status of the case (open, closed)

false

date_closed

Date and time case was closed

2011-12-20T15:09:47Z

properties

List of all editable case properties, including both special predefined properties and user-defined dynamic properties

Special Properties

owner_id

ID of the owner of the case (can be user or group)

case_name

Name of case

Rose

external_id

External ID associated with the case

123456

case_type

Type of case

pregnancy

date_opened

Date and time case was opened

2011-11-16T14:26:15Z

End Special Properties

indices

List of references to other cases with properties <case_type/> and <case_id/>

Start of data from for each form associated with the case
Repeats for each form, as seen in sample output below

form_id

UUID of form associated with the case

1J9NF7B4FTH73435PYJJSL5SJ

form_name

Name of form associated with the case

Prenatal visit

started_on

Date and time form was started

2011-11-16T14:26:15Z

ended_on

Date and time form was completed

2011-11-16T14:27:35Z

Sample usage:

Code Block
https://www.commcarehq.org/a/demo/api/v0.4/case/0X9OCW3JMV98EYOVN32SGN4II/?format=xml&properties=all&indices=all

...