You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At Scholars Portal, as we were integrating Globus with Dataverse for large file transfer, a new API is created to add metadata of multiple files to the dataset. The existing API $SERVER_URL/api/datasets/:persistentId/add gives us limitation since it adds only one file to the dataset.
Once the files are transferred to S3 bucket, the new API /addfiles is invoked with “jsonData” (an array containing the files information)
Hi Team:
At Scholars Portal, as we were integrating Globus with Dataverse for large file transfer, a new API is created to add metadata of multiple files to the dataset. The existing API $SERVER_URL/api/datasets/:persistentId/add gives us limitation since it adds only one file to the dataset.
Once the files are transferred to S3 bucket, the new API /addfiles is invoked with “jsonData” (an array containing the files information)
jsonData:
[{"description":"","directoryLabel":"","restrict":"false","storageIdentifier":"s3://gcs5-bucket1:179a489cb24-769e2d9456fc123","fileName":"1951b.csv","md5Hash":"0056bf95d5f98ab9a930e38b69c14295","mimeType":"text/comma-separated-values"},{"description":"","directoryLabel":"","restrict":"false","storageIdentifier":"s3://gcs5-bucket1:179a489cb24-ed5edbe7b75fa","fileName":"BooksTDRv2a.pdf","md5Hash":"0cabd29624c9ea80d32c0355418197ba","mimeType":"application/pdf"}]
API call:
curl -X POST -H 'X-Dataverse-key: $API_TOKEN' "$SERVER_URL/api/datasets/:persistentId/addFiles?persistentId=#PERSISTENT_IDENTIFIER" -F 'jsonData=$JSON_DATA'
I will submit pull request for this issue.
The text was updated successfully, but these errors were encountered: