Skip to content

Commit

Permalink
rest: add note on content type
Browse files Browse the repository at this point in the history
* Highlighting the introduction of a new content type to make it clearer and reduce any potential confusion for users.

* zenodo/zenodo-rdm#1078 (comment)
* zenodo/developers.zenodo.org#62 (comment)
  • Loading branch information
Samk13 committed Nov 29, 2024
1 parent 109807b commit 510acc6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/reference/rest_api_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 510acc6

Please sign in to comment.