Developers - new for 2.38

Data store improvements [2.37-2.38]

The data store API has received numerous improvements to make it a fully-fledged data store and more useful to web apps and other clients. Video | DHIS2 documentation

Field filtering

Allows you to return only specific keys and values of entries in the data store using the fields parameter. Works similar to fields filtering in the metadata API. The filtering takes place at the namespace level and is useful when a client needs to list many entries with specific keys/values in a single query.

Paging

In query responses, paging is supported and enabled by default. You can specify paging explicitly with the page and pageSize parameters. Paging is useful to work with namespaces with high numbers of entries.

Entry filtering

Allows you to match and filter entries in a namespace based on a variety of operators, such as eq, lt, le, gt, ge, like, null, using the filter parameter. Works similar to object filtering in the metadata API. The filtering is useful when a client wants to list many entries which match one or many criteria.

Sorting

Allows you to sort entries in a namespace ascending or descending based on a specific key/value using the order parameter. This is useful when clients have specific requirements for sorting a list of entries.

Personal (API) access tokens [2.37]

You can now create personal API access tokens for your account. API access tokens are useful for authentication of software API clients such as integration services and web portals. When authenticating with an access token, a client will only get access to the API and not the user interface. Tokens can be restricted to specific HTTP methods (e.g. GET, POST) and IP addresses. There are to types of tokens, one for server-side clients and one for web browser-based clients. To create a token, navigate to the profile menu > Edit profile > Personal access tokens. Video | API docs

Request logging in http header [2.38]

Clients of the API can now submit a value with the ‘X-Request-ID’ HTTP header which is included in all log statements. This is useful when looking at DHIS2 logs and trying to understand which client/app made a request, for example when debugging an issue which applies to a specific installation of an Android app on a phone. Docs

Gist API [2.37]

new metadata API which renders a flat version of objects without nested associations to allow for efficiently rendering large payloads. The Gist API response can be accessed by appending /gist to the regular metadata object API paths. Collection properties, like /userGroups/gist. 

Video | Docs

Patch API [2.37]

for partial updates of metadata. Add, remove and replace operations can be performed with a single patch request. Docs

Â