GlobalDataverseCommunityConsortium / dataverse-previewers

A collection of Datafile Previewers that can be configured to work with Dataverse
MIT License
13 stars 38 forks source link

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

Closed mshariful closed 4 years ago

mshariful commented 4 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

pdurbin commented 4 years ago

@mshariful weird. Can you "ssh" into the Docker container and try the same command on port 8080? (I would try listing the tools first.) That should be the port on which Dataverse is running. If you want, you can join us in http://chat.dataverse.org and we can try to help.

pdurbin commented 4 years ago

@mshariful thanks for talking this out in IRC today. I'm glad you're all set. When you have a moment, can you please open an issue at https://github.com/IQSS/dataverse-docker about this and then close this issue? (And link to the new issue here, please.) Thanks!

qqmyers commented 4 years ago

as notes, this is a Dataverse rather than previewer issue, so closing the entry here.

pdurbin commented 4 years ago

@qqmyers thanks. I just checked dataverse-docker and I don't see an issue so heads up to @4tikhonov about this.

pdurbin commented 4 years ago

@mshariful thanks for creating https://github.com/IQSS/dataverse-docker/issues/29 🎉