Fixture Data APIs (or Lookup Tables)

Purpose: get all of the data associated with a fixture. (see https://github.com/dimagi/commcare-core/wiki/fixtures for the definition of fixture)

Authentication: For more information, please review https://dimagi.atlassian.net/wiki/x/LwXKfw.

Base URLs:

 

Input parameters (for the list of all fixtures):

Name

Description

Example

Name

Description

Example

fixture_type

Returns the fixtures of a in a given domain whose data_type

fixture_type=city

Output values:

Name

Description

Example

Name

Description

Example

id

Fixture UUID

1J9NF7B4FTH73435PYJJSL5SJ

fixture_type

Name of the fixture's data_type

city

fields

Values for the custom fields in the fixture.

{"name": "Boston", "population": 617594, "state": "Massachusetts"

Note: A call to the Fixture List API endpoint will return a JSON list of objects with these output values.

In order to get the full table via API, use the 'name of the table', which is the same as you would find without the API call from https://www.commcarehq.org/a/[domain]/fixtures (the string in the Table ID column)

 

Sample input:

https://www.commcarehq.org/a/demo/api/v0.4/fixture/1J9NF7B4FTH73435PYJJSL5SJ/

Sample output:

{ "fields": { "name": "Boston", "population": 617594, "state": "Massachusetts", }, "fixture_type": "city", "resource_uri": "", "id": "1J9NF7B4FTH73435PYJJSL5SJ" }