- A Dataverse user takes an action on a file, such as restricting it, that requires the deletion of any existing WorldMap layers for that file
- Delete path: Dataverse -> Geoconnect via API -> WorldMap via API -> layer deleted
- This differs from other cases in that the Geoconnect UI is not used
- Geoconnect holds WorldMap credentials which allow it access to the WorldMap API
-
Currently Dataverses installations have access to the Geoconnect API by being listed as "Registered Dataverses" on Geoconnect
- This checks that an incoming url (e.g. https://dataverse.havard.edu) matches what's in the "Registered" list
-
Dataverse's initial connection to Geoconnect involves passing two items:
- (1) A Dataverse-created token linked to a specific Datafile id
- The token has a 30 minute expiration window
- (2) Callback url to Dataverse that allows retrieval of the file metadata or the file itself.
- (1) A Dataverse-created token linked to a specific Datafile id
-
For this delete functionality, the following workflow is one possiblity:
- (1) Dataverse connects to the Geoconnect "delete" API sending a (A) token and (B) callback url
- New Geoconnect API endpoint--or existing endpoint with "delete" action
- (2) Geoconnect uses the token and a callback url to retrieve the Datafile id and Dataverse installation info from Dataverse
- Update existing Dataverse API endpoint. (add "datafile_is_restricted" attribute)
- DV retrieves datafile information related to token, makes sure it's restricted, and returns 'ok' with datafile id back to Geoconnect
- Update existing Dataverse API endpoint. (add "datafile_is_restricted" attribute)
- (3) Once Geoconnect receives the datafile id, Geoconnectwill attempt to delete the file form WorldMap
- Geoconnect attempts deletion with existing WorldMap endpoint
- (4) The results of the delete attempt will be sent back to to Dataverse using the token
- Existing Dataverse endpont: Attempt to delete the map layer metadata associated with the datafile
- (1) Dataverse connects to the Geoconnect "delete" API sending a (A) token and (B) callback url