Skip to content

Commit 0d1b4cd

Browse files
committed
guestbook response can be required for file download
1 parent 467b09c commit 0d1b4cd

2 files changed

Lines changed: 32 additions & 25 deletions

File tree

doc/release-notes/12001-api-support-termofuse-guestbook.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

doc/release-notes/6.10-release-notes.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ See the note above about support for REFI-QDA files. Screenshots of the previewe
148148

149149
## API Updates
150150

151+
- A guestbook response can be passed to file access (file download) APIs when required. This is explained in greater detail under "backward incompatible changes" below. See the [guides](https://guides.dataverse.org/en/6.10/api/dataaccess.html#basic-file-access), #12001, and #12110.
152+
- CRUD endpoints for guestbooks were added. (Note: There is no update or delete at this time. You can disable a guestbook and create a new one.) See the [guides](https://guides.dataverse.org/en/6.10/api/native-api.html#guestbooks), #12001, and #12110.
153+
- Create a guestbook
154+
- Get a guestbook
155+
- Get a list of guestbooks linked to a collection (dataverse)
156+
- Enable/disable a guestbook
151157
- The MyData API now supports the `metadata_fields`, `sort`, `order`, `show_collections` and `fq` parameters, which enhances its functionality and brings it in line with the Search API. See [the guides](https://guides.dataverse.org/en/6.10/api/native-api.html#mydata) and #12009.
152158
- This release removes an undocumented restriction on the API calls to get, set, and delete [archival status](https://guides.dataverse.org/en/6.10/api/native-api.html#get-the-archival-status-of-a-dataset-by-version). They did not work on deaccessioned dataset versions and now do. See #12065.
153159
- Dataset templates can be listed and deleted for a given collection (dataverse). See [the guides](https://guides.dataverse.org/en/6.10/api/native-api.html#list-single-template-by-its-identifier), #11918, and #11969. The default template can also be set. See [the guides](https://guides.dataverse.org/en/6.10/api/native-api.html#set-a-default-template-for-a-collection), #11914 and #11989.
@@ -164,6 +170,32 @@ This release contains important security updates. If you are not receiving secur
164170

165171
Generally speaking, see the [API Changelog](https://guides.dataverse.org/en/latest/api/changelog.html) for a list of backward-incompatible API changes.
166172

173+
### A Guestbook Response Can Be Required for File Access (File Download) APIs
174+
175+
The following File Access (File Download) APIs will now return `400` (`Bad Request`) if a required guestbook response is not supplied.
176+
177+
GET APIs
178+
179+
- **/api/access/datafile/{fileId:.+}**
180+
- **/api/access/datafiles/{fileIds}**
181+
- **/api/access/dataset/{id}**
182+
- **/api/access/dataset/{id}/versions/{versionId}**
183+
184+
POST APIs
185+
186+
- **/api/access/datafiles**
187+
- **/api/access/datafile/bundle/{fileId}**
188+
189+
PUT APIs (when `dataverse.files.guestbook-at-request=true`)
190+
191+
- **/api/access/datafile/{id}/requestAccess**
192+
193+
To construct the JSON to send as a guestbook response you must first retrieve the guestbook for the dataset whose files you are trying to access. The guestbook may include custom questions. Call `GET /api/guestbooks/{id}` with the `guestbookId` from the dataset (the `guestbookId` should be included in the `400` error mentioned above).
194+
195+
Using the guestbook and custom questions, build a guestbook response in JSON with `"guestbookResponse":{}` and send it in the body of a POST call. (You can find a JSON example in the [guides](https://guides.dataverse.org/en/6.10/api/dataaccess.html#basic-file-access) for the general format.)
196+
197+
This procedure can also be found in the API Guide under [Data Access API](https://guides.dataverse.org/en/6.10/api/dataaccess.html#basic-file-access) and #12110.
198+
167199
### Archival Zip Filename Change
168200

169201
The filename of the archival zipped bag produced by the `LocalSubmitToArchiveCommand` archiver now has a "." character before the "v" (for version number) to mirror the filename used by other archivers. For example, the filename will look like

0 commit comments

Comments
 (0)