mediacloud / news-search-api

Internal API server that offers search access to the Media Cloud Online News Archive (in Elasticsearch).
https://mediacloud.org
GNU Affero General Public License v3.0
1 stars 3 forks source link

add release version to all API responses #4

Closed rahulbot closed 8 months ago

rahulbot commented 11 months ago

We have an informal standard of returning a services release number in every response, typically via a decorator used on all endpoints. This required us to have a central VERSION constant to track the app version, and return something like:

{ 
    "version": "v0.1.1",
    .....
}

(associated with #2)

rahulbot commented 9 months ago

Note: the API version is actually returned in the response header: ('x-api-version', '1.0.0') This doesn't match our standard, but is a place it can be retrieved.

rahulbot commented 8 months ago

Closing since this has a solution already (in the header)