-
Notifications
You must be signed in to change notification settings - Fork 536
Feature Request: API to support Download Terms of Use and Guestbook #12110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
eb64cde
1c93ba6
789ed94
7113b48
38d67d4
1a1fead
6d16aae
411befd
4833dd8
bbea198
2e9dd37
1a73f06
b52b856
6bbda52
969536a
2b9c718
b73b21e
a630c9c
9d68d33
79c3eaa
b089324
7ab9c0a
b6ec2ea
13396f1
6604ce5
edf0a6e
e7bf66c
f47d9f6
7c71e99
3466d4e
e3da730
f9f2a21
2dd0034
649d7c5
51facb9
04e23a5
ad22235
2c5985d
cedd4c2
917b3fa
dc9f8bc
d6aa29a
72fce96
cf2937b
2c6d86d
a9985d3
a0ffae9
35c2f75
762642d
c9831ad
bc06e3b
0f8bd28
60371d0
fc0f003
726603f
5982c56
00962b0
179d0ea
8e63f15
faefe7f
90fd76d
efef793
f320a39
135542f
42f9fcf
cf13f59
910848a
162a40f
561f24b
c095efc
b4fe522
1addebd
f6d5e8d
98e4820
ac3fd32
8e8966d
30be73c
0c7d3a6
149ebde
05a961e
879c465
35a1eb2
b96efcf
d9b59ca
63db903
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| ## Feature Request: API to support Download Terms of Use and Guestbook | ||
|
|
||
| ## New Endpoints to download a file or files that required a Guestbook Response: POST | ||
| A post to these endpoints with the body containing a JSON Guestbook Response will save the response and return a signed URL to download the file(s) | ||
|
|
||
| `/api/access/datafile/{fileId:.+}` | ||
| `/api/access/datafiles/{fileIds}` | ||
| `/api/access/dataset/{id}` | ||
| `/api/access/dataset/{id}/versions/{versionId}` | ||
|
|
||
| A post to these endpoints with the body containing a JSON Guestbook Response will save the response before continuing the download. | ||
| No signed URL option exists. | ||
| `/api/access/datafiles` | ||
| `/api/access/datafile/bundle/{fileId}` POST returns BundleDownloadInstance after processing Guestbook Responses from body. | ||
|
|
||
| ## New CRUD Endpoints for Guestbook: | ||
| Create a Guestbook: POST `/api/guestbooks/{dataverseIdentifier}` | ||
| Get a Guestbook: GET `/api/guestbooks/{id}` | ||
| Get a list of Guestbooks linked to a Dataverse Collection: GET `/api/guestbooks/{dataverseIdentifier}/list` | ||
| Enable/Disable a Guestbook: PUT `/api/guestbooks/{dataverseIdentifier}/{id}/enabled` Body: `true` or `false` | ||
| Note: There is no Update or Delete at this time. You can disable a Guestbook and create a new one. | ||
|
|
||
| ## For Guestbook At Request: | ||
| When JVM setting -Ddataverse.files.guestbook-at-request=true is used a request for access may require a Guestbook Response. | ||
| PUT `/api/access/datafile/{id}/requestAccess` will now take a JSON Guestbook Response in the body. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| {"guestbookResponse": { | ||
| "answers": [ | ||
| { | ||
| "id": @QID1, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is invalid JSON: jq: parse error: Invalid numeric literal at line 4, column 24 You have to put the value in quotes.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is a template that get replaced with a long value so quotes are not needed
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting. I don't love it (seems like a code smell), but thanks for explaining.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Every time you run the test the IDs change so they need to be injected
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure. I get it. I dunno, maybe you could rename it to guestbook-test-response-template.json or something. Obviously, if we could put comments in JSON, this would be a good place for them! 😄 No need to make any changes now. (We're on a time crunch to get 6.10 out.) Maybe the next time we crack open this code. |
||
| "value": "Good" | ||
| }, | ||
| { | ||
| "id": @QID2, | ||
| "value": ["Multi","Line"] | ||
| }, | ||
| { | ||
| "id": @QID3, | ||
| "value": "Yellow" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| { | ||
| "name": "my test guestbook", | ||
| "enabled": true, | ||
| "emailRequired": true, | ||
| "nameRequired": true, | ||
| "institutionRequired": false, | ||
| "positionRequired": false, | ||
| "customQuestions": [ | ||
| { | ||
| "question": "how's your day", | ||
| "required": true, | ||
| "displayOrder": 0, | ||
| "type": "text", | ||
| "hidden": false | ||
| }, | ||
| { | ||
| "question": "Describe yourself", | ||
| "required": false, | ||
| "displayOrder": 1, | ||
| "type": "textarea", | ||
| "hidden": false | ||
| }, | ||
| { | ||
| "question": "What color car do you drive", | ||
| "required": true, | ||
| "displayOrder": 2, | ||
| "type": "options", | ||
| "hidden": false, | ||
| "optionValues": [ | ||
| { | ||
| "value": "Red", | ||
| "displayOrder": 0 | ||
| }, | ||
| { | ||
| "value": "White", | ||
| "displayOrder": 1 | ||
| }, | ||
| { | ||
| "value": "Yellow", | ||
| "displayOrder": 2 | ||
| }, | ||
| { | ||
| "value": "Purple", | ||
| "displayOrder": 3 | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.