Skip to content

GO API Changes v4.4.0 Safari

Sanjay Bhangar edited this page Sep 22, 2020 · 1 revision

GO API Changes in Release 4.4:

Summary of Changes

The GO API Release 4.4 is a significant release that includes some backwards incompatible changes for API consumers. The main changes involve parts of the API now being translatable into multiple languages, based on Accept-Language headers sent by the client. The language changes are non-breaking and if you wish to continue querying english content, you should not need to change anything, but further details are below.

The big breaking change involves changes to the CSV end-point to query emergencies data. Continuing a process to improve the performance and consistency of the CSV exports, we have modified the output format for the Emergencies CSV significantly, to reduce the number of columns output, and ensure that there are always a fixed number of columns in the output. Details below.

Changes for Translation

In order to support translation of ENUM values from the backend, most end-points have got additional fields to return both "display value" and raw ENUM values from the database. The "display value" will be returned translated based on language headers.

The following document details all changes to the API for Translation support:

https://notes.togglecorp.com/s/OcqWwH4o9

Addition of Geospatial Data to Geo Endpoints

With this release, we are also beginning to integrate spatial data into our database and APIs. This change involves the addition of fields to spatial entities, which should be non-breaking for most use-cases:

  • /country and /district list and item end points now return bbox and centroid as GeoJSON features
  • /region list and item returns bbox as a GeoJSON
  • /country now has an independent flag to determine status
  • /region returns a label for front-end display
  • /country and /district now can be deprecated through an is_deprecated field. This is exposed in the list endpoints

Changes to Emergencies CSV end-point

Changes have been made as per this Github ticket: https://github.com/IFRCGo/go-api/issues/708

The main change is including multiple countries and field reports as single fields with multiple comma separated values within the field, so that the export does not generate an arbitrary number of columns.