diff --git a/src/developer/web-api/data-exchange.md b/src/developer/web-api/data-exchange.md index 7e39c51f2..f145d9b2a 100644 --- a/src/developer/web-api/data-exchange.md +++ b/src/developer/web-api/data-exchange.md @@ -284,7 +284,7 @@ DELETE /api/aggregateDataExchanges/{id} ##### Response ``` -204 No Content +200 OK ``` ```json diff --git a/src/developer/web-api/metadata.md b/src/developer/web-api/metadata.md index 48c229612..3b5665821 100644 --- a/src/developer/web-api/metadata.md +++ b/src/developer/web-api/metadata.md @@ -237,7 +237,7 @@ translations for the specific object and not just for a single locale (if not you will potentially overwrite existing locales for other locales). -The status code will be `204 No Content` if the data value was successfully saved or updated, or `404 Not Found` if there was a validation error (e.g. more than one `SHORT_NAME` for the same `locale`). +The status code will be `204 No Content` if the translations were successfully saved or updated, or `409 Conflict` if there was a validation error (e.g. more than one `SHORT_NAME` for the same `locale`). ### Web API versions { #webapi_api_versions } @@ -638,7 +638,23 @@ request to the endpoint + id: curl -X DELETE -u user:password "http://server/api/constants/ID" ``` -A successful delete should return HTTP status 204 (no content). +A successful delete returns HTTP status `200 OK` with a `WebMessage` +response body wrapping an `ObjectReport` for the deleted object, for +example: + +```json +{ + "httpStatus": "OK", + "httpStatusCode": 200, + "status": "OK", + "response": { + "responseType": "ObjectReport", + "uid": "abc123", + "klass": "org.hisp.dhis.constant.Constant", + "errorReports": [] + } +} +``` ### Adding and removing objects in collections { #webapi_adding_removing_objects_collections }