From 510acc62b94acea1678a7e1d104366d1675976a4 Mon Sep 17 00:00:00 2001 From: Sam Arbid Date: Fri, 29 Nov 2024 21:43:47 +0100 Subject: [PATCH] rest: add note on content type * Highlighting the introduction of a new content type to make it clearer and reduce any potential confusion for users. * https://github.com/zenodo/zenodo-rdm/issues/1078#issuecomment-2507660809 * https://github.com/zenodo/developers.zenodo.org/issues/62#issuecomment-2165851978 --- docs/reference/rest_api_index.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/reference/rest_api_index.md b/docs/reference/rest_api_index.md index ecd78295..839d4ed6 100644 --- a/docs/reference/rest_api_index.md +++ b/docs/reference/rest_api_index.md @@ -28,6 +28,15 @@ curl -k https://127.0.0.1:5000/api/records?access_token=API-TOKEN The `-k` or `--insecure` option here is simply because a certificate is typically not setup locally. In production, your `curl` calls shouldn't need this option because you will be using a valid certificate. +_Introduced in InvenioRDM v12_ +When making requests to the new REST API endpoints introduced in v12, you can set the Content-Type header to: + +```shell +Content-Type: application/vnd.inveniordm.v1+json +``` + +Including Content-Type ensures that the server correctly interprets your request payloads according to the new API specifications introduced in v12. while the `application/json` Content-Type is still supported, it is recommended to use the new Content-Type to ensure compatibility with future versions of InvenioRDM. + ### Scopes !!! warning "Work in progress"