Closed taywll252 closed 2 years ago
The url is invalid. The url is made up of the host, path and query string. The query string starts with ?
and each part is separated with &
. In your example you have two ?
in the query. The correct syntax is: /api/datasets/{id}/downloadFolder?folderId={id}&key={apiKey}
@robkooper Thanks for the quick reply. I see that obvious mistake in path syntax now. I was thrown off by the error message pointing to the "folder ID" parameter as the issue and seeing that key=
is deprecated. Thankfully just an easy fix on my side.
Describe the bug I was attempting to use the
api/datasets/{id}/downloadFolder
endpoint. I used the URL path:/api/datasets/{id}/downloadFolder?folderId={id}?key={apiKey}
I received a
"status":"bad request"
and"message":"Cannot parse parameter folderId"
in return.The request worked when I opted to use the
X-API-Key
in theheader
instead of the?key=
query parameter.I noticed in the documentation that the
?key=
parameter is deprecated in favor of using the header. However, the message says thefolderId parameter couldn't be parsed
, so something else seems to be going on.To Reproduce Steps to reproduce the behavior:
folder ID
anddataset ID
to download using theapi/datasets/{id}/downloadFolder
endpoint?key=
API key query parameter?key=
query parameter, but theX-API-Key
headerExpected behavior Zip folder of the selected folder ID from the selected dataset ID should be downloaded when using the
?key=
API key query parameter (although deprecated).Screenshots Example request error:
Desktop (please complete the following information):
Additional context Clowder Version: 1.20.1#854 branch:master sha1:86ba0e36a38aed057bd5ca104495c5f3af67613a