Versions Compared

Key

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

...

This section is for you if...

- You are a programmer .

- You are looking to write code that interacts directly with CommCare HQ through its APIs.

If you are not a programmer and are looking to integrate CommCare with other platforms we recommend looking at https://dimagi.atlassian.net/wiki/x/fRzKfw.

...

- You should have a familiarity with HTTP conventions, such as GET and POST and url parameters.

- To follow the examples, you should be familiar with the standard command line tool curl. Here's the manual: https://curl.haxx.se/docs/.

- Character encoding is UTF-8. Dates should be compliant ISO 8601. (In some cases we're still using RFC 3339, but we're moving towards ISO 8601.) Guids should be generated in accordance with RFC 4122.

...

API

Description

URL Endpoint

Permission required

Submission

API to submit data to CommCare HQ.

See Documentation

Set per domain

Bulk Upload API

Performs Bulk Imports of Case Data through the Excel Case Data Importer to either create or update cases

See Documentation

Valid login

User Creation (Mobile Worker)

API to create a mobile worker on CommCare HQ

https://www.commcarehq.org/a/[domain]/api/[version]/user/

Edit Mobile Workers

User Edit (Mobile Worker)

API to edit a mobile worker on CommCare HQ

https://www.commcarehq.org/a/[domain]/api/[version]/user/[id] 

Edit Mobile Workers

User Delete (Mobile Worker)

API to delete a mobile worker on CommCare HQ

https://www.commcarehq.org/a/[domain]/api/[version]/user/[id]

Edit Mobile Workers

User Registration

API for registering users on CommCare HQ.

https://www.commcarehq.org/a/\[domain\]/receiver

Set per domain

OTA Restore (Case List)

API to retrieve data payload consumable to restore a users current state of cases.

See Documentation

Valid login

Data Export

API to export data from CommCare HQ.

See Documentation

Set per domain

Groups

List, create, edit and delete groups

See Documentation

Edit Mobile Workers

Mobile Workers

list mobile workers or access individual user data

https://www.commcarehq.org/a/[domain]/api/[version]/user/

Edit Mobile Workers

Web Users

list web users or access individual user data

http://www.commcarehq.org/a/[domain]/api/ [version] /web-user/

Edit Web Users

Locations

List locations and location types and view their details

See documentation

Valid login

SMS Mobile Worker Registration API

API to initiate the SMS Mobile Worker Registration workflow

https://www.commcarehq.org/a/[domain]/api/[version]/sms_user_registration/

Edit Data

Send CommCare Install Info over SMS

API to facilitate the reinstallation of CommCare for already-registered users

https://www.commcarehq.org/a/[domain]/api/[version]/sms_user_registration_reinstall/

Edit Data

Cases

list cases

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

Edit Data

Case Data APIs

find a single case

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

Edit Data

Forms

list form submissions

https://www.commcarehq.org/a/[domain]/api/[version]/form/

Edit Data

Form Data APIs

list/search forms or access a single form

https://www.commcarehq.org/a/[domain]/api/[version]/form/[form_id]/

Edit Data

Application Structure

view the schema of modules, cases, and forms for your application

https://www.commcarehq.org/a/[domain]/api/[version]/application/

Edit Apps

User Identity

Look up user details

https://www.commcarehq.org/api/[version]/identity/

Valid login

User Domain List

Look up user domains

https://www.commcarehq.org/api/[version]/user_domains/

Valid login

Single Sign On

check login credentials and get the user details

https://www.commcarehq.org/a/[domain]/api/[version]/sso/

Valid login

Form Attachments

API to get an attachment from a form

https://www.commcarehq.org/a/[domain]/api/form/attachment/{form_id}/{attachment_name}

Valid login

Case Attachments

API to get an attachment from a case

https://www.commcarehq.org/a/[domain]/api/case/attachment/{form_id}/{ attachment_name}

Valid login

Lookup Table Download

Get lookup table data

See documentation

Edit Apps

Lookup Table Upload

Create or edit lookup tables by uploading excel file containing table data

See documentation

Edit Apps

Download a .ccz file

Download the .ccz file for a specific version of an application

/wiki/spaces/GTD/pages/2145058940


List Reports

List the available reports in the project

https://www.commcarehq.org/a/[PROJECT]/api/v0.5/simplereportconfiguration/?format=json

Domain Admin

Download Report Data

Filter and download data for a specific report

https://www.commcarehq.org/a/[PROJECT]/api/v0.5/configurablereportdata/REPORTID/

View Data

...

Panel
panelIconIdatlassian-info
panelIcon:info:
bgColor#EAE6FF

CommCare applies API rate limits on all project spaces at all times.

Standard rate limit thresholds

  • The standard rate limit per minute is 3 API requests per mobile worker.

  • The standard rate limit per hour is 130 API requests per mobile worker.

  • The standard rate limit per day is 1000 API requests per mobile worker.

...