From 1793b33534a9430ecb7dfd6197738b4a9a9a77aa Mon Sep 17 00:00:00 2001 From: sirineREKIK Date: Fri, 7 Jul 2023 09:18:22 +0200 Subject: [PATCH] add key in header api --- doc/sphinx-guides/source/api/native-api.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst index 6b1bc72fea1..11fb7c49c1c 100644 --- a/doc/sphinx-guides/source/api/native-api.rst +++ b/doc/sphinx-guides/source/api/native-api.rst @@ -4549,12 +4549,10 @@ A curl example listing objects export PUBLISHED_STATES=Unpublished export PER_PAGE=10 - curl "$SERVER_URL/api/mydata/retrieve?key=$API_TOKEN&role_ids=$ROLE_IDS&dvobject_types=$DVOBJECT_TYPES&published_states=$PUBLISHED_STATES&per_page=$PER_PAGE" + curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/mydata/retrieve?role_ids=$ROLE_IDS&dvobject_types=$DVOBJECT_TYPES&published_states=$PUBLISHED_STATES&per_page=$PER_PAGE" Parameters: -``key`` Is the user token, for this API is must not be passed in the header. - ``role_id`` Roles are customizable. Standard roles include: - ``1`` = Admin