Tomasz,
For all of the parameters available, what you’re setting up in the json is whether your tool gets that parameter and what it is called in the URL sent to run your tool. For example,
For the previewers at https://github.com/QualitativeDataRepository/dataverse-previewers, I have the following json (escaped for use in a curl command):
{ \"queryParameters\":[ {\"fileid\":\"{fileId}\"}, {\"siteUrl\":\"{siteUrl}\"}, {\"key\":\"{apiToken}\"}, {\"datasetid\":\"{datasetId}\"}, {\"datasetversion\":\"{datasetVersion}\"} ] }
This results in my tool being called with the URL: https://qualitativedatarepository.github.io/dataverse-previewers/previewers/ImagePreview.html?fileid=2231&siteUrl=https://dv.dev-aws.qdr.org&key=1c5ac34d-43a5-20c3-94cd-9f0af4f56ad12&datasetid=2228&datasetversion=:draft
The things to note are that the ‘fileId’ (how Dataverse names it) is sent to my tool as ‘fileid’ (lower case) and ‘apiToken’ is sent as ‘key’, etc.. This gives you some ability to map the Dataverse terms to ones your tool uses (although your tool is going to have to know the Dataverse API to retrieve the file or metadata anyway, so being able to rename the parameters you get sent is not that helpful).
FWIW: The new dataset and datasetversion options allow you to call the datasetversion API which will give you a json output of all the file metadata which includes things like the file names and description (both of which can vary by dataset version) and creation date (new in the next version of Dataverse).
-- Jim
--
You received this message because you are subscribed to the Google Groups "Dataverse Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dataverse-de...@googlegroups.com.
To post to this group, send email to
datave...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dataverse-dev/3d08538e-dee1-416c-8026-0637885075e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I should add that apiTokens are sensitive and I have generated a useless one in the example below. One should not send real apiTokens in emails…
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-dev/BN8PR04MB5985184A6F86DF5A6CB6FE2DBF2E0%40BN8PR04MB5985.namprd04.prod.outlook.com.
That was a quick and exhaustive response! Thanks a lot!
I was wrongly assuming the direction in which the parameters are passed. Now it makes sense.
Everything is clear now.
Thanks!
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-dev/BN8PR04MB598515E3C916C4990FA00511BF2E0%40BN8PR04MB5985.namprd04.prod.outlook.com.