gdcc / dvwebloader

A web tool for uploading folders of files to a Dataverse dataset
Apache License 2.0
1 stars 6 forks source link

ERROR","message":"Invalid token=STRING ... Expected tokens are: [COMMA]" #4

Closed jmjamison closed 1 year ago

jmjamison commented 1 year ago

Apologies in advance - this is probably my error error, not sure what I'm doing incorrectly. I'm running the curl command and get the error: {"status":"ERROR","message":"Invalid token=STRING at (line no=7, column no=9, offset=194). Expected tokens are: [COMMA]"}[ec2-user

This is what I have for the curl command:

curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
'{
  "displayName": "Dataverse WebLoader",
  "description": "Upload all  the files in a local directory!",
  "toolName": "dvwebloader",
  "scope": "dataset",
  "contentType":"text/plain"
  "types": [
    "explore"
  ],
  "toolUrl": "https://gdcc.github.io/dvwebloader/src/dvwebloader.html",
  "toolParameters": {
    "queryParameters": [
      {
        "siteUrl": "https://dataverse.ucla.edu"
      },
      {
        "datasetPid": "doi:10.25346/S6/EZYHS4"
      },
      {
        "key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"    
      }
    ]
  }
}'

Thank you, jamie

qqmyers commented 1 year ago

There was a comma missing after "text/plain" - the example in the readme is now fixed.

qqmyers commented 1 year ago

There’s a missing comma after "contentType":"text/plain"

From: jamie jamison @.> Sent: Tuesday, October 4, 2022 3:44 PM To: gdcc/dvwebloader @.> Cc: Subscribed @.***> Subject: [gdcc/dvwebloader] ERROR","message":"Invalid token=STRING ... Expected tokens are: [COMMA]" (Issue #4)

Apologies in advance - this is probably my error error, not sure what I'm doing incorrectly. I'm running the curl command and get the error: {"status":"ERROR","message":"Invalid token=STRING at (line no=7, column no=9, offset=194). Expected tokens are: [COMMA]"}[ec2-user

This is what I have for the curl command: curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d '{ "displayName": "Dataverse WebLoader", "description": "Upload all the files in a local directory!", "toolName": "dvwebloader", "scope": "dataset", "contentType":"text/plain" "types": [ "explore" ], "toolUrl": "https://gdcc.github.io/dvwebloader/src/dvwebloader.html", "toolParameters": { "queryParameters": [ { "siteUrl": "https://dataverse.ucla.edu" }, { "datasetPid": "doi:10.25346/S6/EZYHS4" }, { "key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } ] } }'

Thank you, jamie

— Reply to this email directly, view it on GitHubhttps://github.com/gdcc/dvwebloader/issues/4, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABTLRT4DEGNQPZ7UMEID5HDWBSCHJANCNFSM6AAAAAAQ44NA2I. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>