From 308faa74f1dca700b122ed9c8dbbe7368170fca7 Mon Sep 17 00:00:00 2001 From: sunetfreitag <71124321+sunetfreitag@users.noreply.github.com> Date: Mon, 10 Nov 2025 15:10:52 +0000 Subject: [PATCH 1/2] Add Accept header to curl example in ocs-api-overview.rst The return type of ocs calls can easily be changed by adding an Accept header to the request. Since some ocs calls return xml as their default, while others return json, it might be beneficial to the reader to state this early in the documentation. Signed-off-by: sunetfreitag <71124321+sunetfreitag@users.noreply.github.com> --- developer_manual/client_apis/OCS/ocs-api-overview.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/developer_manual/client_apis/OCS/ocs-api-overview.rst b/developer_manual/client_apis/OCS/ocs-api-overview.rst index 44d6abded3d..0ed1b06e1d4 100644 --- a/developer_manual/client_apis/OCS/ocs-api-overview.rst +++ b/developer_manual/client_apis/OCS/ocs-api-overview.rst @@ -37,6 +37,13 @@ For example: you can perform a :code:`GET` request to get information about a us curl -u username:password -X GET 'https://cloud.example.com/ocs/v1.php/...' -H "OCS-APIRequest: true" +You can change the response type of your request by adding an Accept header. For example, if you prefer JSON respones: + +.. code-block:: bash + + curl -u username:password -X GET 'https://cloud.example.com/ocs/v1.php/...' -H "Accept: application/json" -H "OCS-APIRequest: true" + +Adding the Accept header also ensures consistency of your responses, since some legacy OCS requests return XML as their default response, while newer requests return JSON. User metadata ------------- From b8024b128283dacf8223b1bd36dec8186817348c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Wed, 29 Apr 2026 08:35:00 +0200 Subject: [PATCH 2/2] fix(developer): `respones` typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- developer_manual/client_apis/OCS/ocs-api-overview.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer_manual/client_apis/OCS/ocs-api-overview.rst b/developer_manual/client_apis/OCS/ocs-api-overview.rst index 0ed1b06e1d4..b15c08cf71b 100644 --- a/developer_manual/client_apis/OCS/ocs-api-overview.rst +++ b/developer_manual/client_apis/OCS/ocs-api-overview.rst @@ -37,7 +37,7 @@ For example: you can perform a :code:`GET` request to get information about a us curl -u username:password -X GET 'https://cloud.example.com/ocs/v1.php/...' -H "OCS-APIRequest: true" -You can change the response type of your request by adding an Accept header. For example, if you prefer JSON respones: +You can change the response type of your request by adding an Accept header. For example, if you prefer JSON responses: .. code-block:: bash