IQSS / dataverse-docker

Dataverse 6.2 on Docker with integrated services called "Archive in a box" and could be used both as demo and production system and easily integrated with other services.
57 stars 45 forks source link

Curl command yields status:"error", message:"Endpoint available from localhost only #29

Open mshariful opened 5 years ago

mshariful commented 5 years ago

Hello, I tried to execute this curl command

sudo curl -X POST -H 'Content-type: application/json' http://localhost:8085/api/admin/externalTools -d \ "{ "displayName":"View Image", "description":"Preview an image file.", "scope":"file", "type":"explore", "toolUrl":"https://qualitativedatarepository.github.io/dataverse-previewers/previewers/ImagePreview.html\", "toolParameters": { "queryParameters":[ {"fileid":"{fileId}"}, {"siteUrl":"{siteUrl}"}, {"key":"{apiToken}"}, {"datasetid":"{datasetId}"}, {"datasetversion":"{datasetVersion}"} ] }, "contentType":"image/png" }"

but I get this message: { status:"error", message:"Endpoint available from localhost only. Please contact the dataverse administrator"}

I have installed Dataverse using "DataverseEU Docker module". It is running on a linux (Ubuntu) at http://localhost:8085/dataverse/root

Could you please suggest how to fix it?

Thank you very much.

Regards, Sharif

xoroz commented 4 years ago

I think you should unblock the API for external access. Maybe try to run from inside the dataverse container the commad:

curl -X PUT -d allow http://localhost:8080/api/admin/settings/:BlockedApiPolicy