/
User Data Access Request History API

User Data Access Request History API

See PLFM-8805 - Getting issue details... STATUS and the design at https://www.figma.com/design/AfH43XxYEHwkyEoO21erKQ/Access-History?node-id=1-5164&t=D0nXMrTryinmxDDj-0.

We currently do not have an existing API to fetch the submissions where a user is an accessor, we do have an API that performs a similar function, but it is targeted to ACT and data access reviewers (e.g. if a user is not in the ACT then it is treated as a reviewer, NOT as a generic user).

Additionally, the UI design calls for additional information that is relative to the caller user (e.g. expiration date of an approval):

user_data_access_list.jpg

Note that in addition to the APIs below we also need to modify the existing https://rest-docs.synapse.org/rest/GET/dataAccessSubmission/submissionId.html API to allow (on top of ACT or reviewers) accessors of a submission.

API

Request

Response

Description

API

Request

Response

Description

POST /dataAccessSubmission/userRequests

UserSubmissionSearchRequest

UserSubmissionSearchResponse

Allows to fetch a page of submissions where the calling user is an accessor. By default sorted by the submission creation date DESC.

It will include for each submission the specific submission approval status and expiration date (if any) for the user.

GET /dataAccessSubmission/{submissionId}/userAccessApprovalStatus

 

UserAcccessApprovalStatus

Allows a user to fetch the approval information (status and expiration date) specific to a submission, as long as the user is an accessor in the submission.

UserSubmissionSearchRequest

{ "description": "A request to search through the user data access submissions", "properties": { "accessRequirementId": { "type": "string", "description": "Filter by the id of the access requirement of the submissions." }, "submissionState": { "description": "Filter by the state of the submissions", "$ref": "org.sagebionetworks.repo.model.dataaccess.SubmissionState" }, "sort": { "type": "array", "items": { "$ref": "org.sagebionetworks.repo.model.dataaccess.UserSubmissionSearchSort" } }, "nextPageToken": { "type": "string", "description": "A token used to get the next page of a request." } } }

UserSubmissionSearchResponse

{ "description": "Response for the request to search through the user data access submissions", "properties": { "results": { "type":"array", "items": { "$ref": "org.sagebionetworks.repo.model.dataaccess.UserSubmissionSearchResult" }, "description":"The matching submissions information corresponding to the search parameters" }, "nextPageToken": { "type": "string", "description": "A token used to get the next page of a particular search query." } } }

UserSubmissionSearchResult

{ "title": "User Data Access Submission Search Result Item", "description": "", "properties": { "id": { "description": "The id of the submission", "type": "string" }, "createdOn": { "type": "string", "format": "date-time" }, "modifiedOn": { "type": "string", "format": "date-time" }, "accessRequirementId": { "description": "The id of the access requirement the submission is for", "type": "string" }, "accessRequirementVersion": { "description": "The version of the requirement that the submission refers to", "type": "string" }, "accessRequirementName": { "description": "The name of the access requirement", "type": "string" }, "submitterId": { "description": "The principal ID of the person who created the submission", "type": "string" }, "state": { "$ref": "org.sagebionetworks.repo.model.dataaccess.SubmissionState" }, "userAccessApprovalStatus": { "description": "The access approval status (including its expiration date) for the user in the context of the submission.", "$ref": "org.sagebionetworks.repo.model.dataaccess.UserAccessApprovalStatus" } } }

UserAccessApprovalStatus

{ "title": "Access approval status and expiration date for a specific accessor user", "description": "", "properties": { "approvalState": { "description": "The current state of the approval (APPROVED/REVOKED) for the calling user if an approval exists", "$ref": "org.sagebionetworks.repo.model.ApprovalState" }, "expiresOn": { "description": "If an APPROVED approval exists, the expiration date for the approval if any.", "type": "string", "format": "date-time" } } }

 

Related content