From ea57ad06356289d3f4cd64636000b8c4706dd179 Mon Sep 17 00:00:00 2001 From: qqmyers Date: Mon, 4 Nov 2024 10:25:00 -0500 Subject: [PATCH] Add audio/mp4 example audio/mp4 is replacing the deprecated audio/x-m4a MIME type - see https://mimetype.io/audio/x-m4a --- 6.1curlcommands.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/6.1curlcommands.md b/6.1curlcommands.md index 11eb4d2..80d0a69 100644 --- a/6.1curlcommands.md +++ b/6.1curlcommands.md @@ -255,6 +255,47 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin ] }' ``` +```bash +curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \ +'{ + "displayName":"Play Audio", + "description":"Listen to an audio file.", + "toolName":"audioPreviewer", + "scope":"file", + "types":["preview"], + "toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/v1.4/AudioPreview.html", + "toolParameters": { + "queryParameters":[ + {"fileid":"{fileId}"}, + {"siteUrl":"{siteUrl}"}, + {"datasetid":"{datasetId}"}, + {"datasetversion":"{datasetVersion}"}, + {"locale":"{localeCode}"} + ] + }, + "contentType":"audio/mp4", + "allowedApiCalls": [ + { + "name": "retrieveFileContents", + "httpMethod": "GET", + "urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=true", + "timeOut": 3600 + }, + { + "name": "downloadFile", + "httpMethod": "GET", + "urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=false", + "timeOut": 3600 + }, + { + "name": "getDatasetVersionMetadata", + "httpMethod": "GET", + "urlTemplate": "/api/v1/datasets/{datasetId}/versions/{datasetVersion}", + "timeOut": 3600 + } + ] +}' +``` ```bash curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \