archivematica / Issues

Issues repository for the Archivematica project
GNU Affero General Public License v3.0
16 stars 1 forks source link

Problem: API Key is not optional for Dataverse storage spaces when it can be made optional for open access Dataverses #264

Open ross-spencer opened 6 years ago

ross-spencer commented 6 years ago

Please describe the problem you'd like to be solved.

Archivematica can connect to any open Dataverse, but setting up a storage space requires an API key. This should be considered an optional field only required when restricted datasets are desired.

Describe the solution you'd like to see implemented.

Make the field optional.

Describe alternatives you've considered.

There isn't a workaround for this at the moment as the API key will be checked by Dataverse if it is there.


For Artefactual use: Please make sure these steps are taken before moving this issue from Review to Verified in Waffle:

ross-spencer commented 6 years ago

Todo: Double check the versions (or at all if this is possible) as for a 4.3 endpoint, https://datasets.socialhistory.org/ I am receiving the following message:

archivematica-storage-service_1  | DEBUG     2018-10-12 20:59:27  locations.models.dataverse:dataverse:_browse_dataverse:140:  URL: https://datasets.socialhistory.org/api/search/, params: {'q': '*', 'sort': 'name', 'start': 0, 'per_page': 50, 'show_entity_ids': True, 'type': 'dataset', 'subtree': None, 'order': 'asc'}
archivematica-storage-service_1  | DEBUG     2018-10-12 20:59:28  locations.models.dataverse:dataverse:_browse_dataverse:142:  Response: <Response [401]>
archivematica-storage-service_1  | WARNING   2018-10-12 20:59:28  locations.models.dataverse:dataverse:_browse_dataverse:148:  <Response [401]>: Response: {"status":"ERROR","message":"Please provide a key query parameter (?key=XXX) or via the HTTP header X-Dataverse-key"}
ross-spencer commented 6 years ago

For the SP demo Dataverse setup as 4.8.6 I see the following successful response without an API key:

archivematica-storage-service_1  | DEBUG     2018-10-12 21:06:24  locations.models.dataverse:dataverse:_browse_dataverse:140:  URL: https://demodv.scholarsportal.info/api/search/, params: {'q': 'sample', 'sort': 'name', 'start': 0, 'per_page': 50, 'show_entity_ids': True, 'type': 'dataset', 'subtree': None, 'order': 'asc'}
archivematica-storage-service_1  | DEBUG     2018-10-12 21:06:25  locations.models.dataverse:dataverse:_browse_dataverse:142:  Response: <Response [200]>

So this may be a configuration option for Dataverse administrators.