components: schemas: AccessGrant: additionalProperties: false description: An access grant with additional info about the dataset. properties: created: description: Date of creation of this grant format: date-time title: Created type: string dac_alias: description: The alias of the Data Access Committee title: Dac Alias type: string dac_email: description: The email address of the Data Access Committee format: email title: Dac Email type: string dataset_id: description: ID of the dataset this grant is for pattern: ^[A-Z]{1,6}[0-9]{3,18}$ title: Dataset Id type: string dataset_title: description: Title of the dataset title: Dataset Title type: string id: description: Internal grant ID (same as claim ID) format: uuid4 title: Id type: string iva_id: anyOf: - format: uuid4 type: string - type: 'null' description: ID of an IVA associated with this grant title: Iva Id user_email: description: The email address of the user format: email title: User Email type: string user_id: description: Internal user ID format: uuid4 title: User Id type: string user_name: description: Full name of the user title: User Name type: string user_title: anyOf: - type: string - type: 'null' description: Academic title of the user title: User Title valid_from: description: Start date of validity format: date-time title: Valid From type: string valid_until: description: End date of validity format: date-time title: Valid Until type: string required: - id - user_id - dataset_id - created - valid_from - valid_until - user_name - user_email - dataset_title - dac_alias - dac_email title: AccessGrant type: object AccessRequest: additionalProperties: false description: All data that describes an access request. properties: access_ends: description: Requested end date of access format: date-time title: Access Ends type: string access_starts: description: Requested start date of access format: date-time title: Access Starts type: string changed_by: anyOf: - format: uuid4 type: string - type: 'null' description: The ID of the data steward who made the status change title: Changed By dac_alias: description: The alias of the Data Access Committee title: Dac Alias type: string dac_email: description: The email address of the Data Access Committee format: email title: Dac Email type: string dataset_description: anyOf: - type: string - type: 'null' description: Description of the dataset title: Dataset Description dataset_id: description: ID of the dataset for which access is requested pattern: ^[A-Z]{1,6}[0-9]{3,18}$ title: Dataset Id type: string dataset_title: description: Title of the dataset title: Dataset Title type: string email: description: Contact e-mail address of the requester format: email title: Email type: string full_user_name: description: The requester's full name including academic title title: Full User Name type: string id: description: ID of the access request format: uuid4 title: Id type: string internal_note: anyOf: - type: string - type: 'null' description: A note about the access request only visible to Data Stewards title: Internal Note iva_id: anyOf: - format: uuid4 type: string - type: 'null' description: ID of the IVA to be used for this request, but this can also be specified later title: Iva Id note_to_requester: anyOf: - type: string - type: 'null' description: A note about the access request that is visible to the requester title: Note To Requester request_created: description: Creation date of the access request format: date-time title: Request Created type: string request_text: description: Text note submitted with the request title: Request Text type: string status: $ref: '#/components/schemas/AccessRequestStatus' default: pending description: The status of this access request status_changed: anyOf: - format: date-time type: string - type: 'null' description: Last change date of the status of this request title: Status Changed ticket_id: anyOf: - type: string - type: 'null' description: The ID of the ticket associated with the access request title: Ticket Id user_id: description: ID of the user who requests access format: uuid4 title: User Id type: string required: - user_id - dataset_id - email - request_text - access_starts - access_ends - dataset_title - dac_alias - dac_email - full_user_name - request_created title: AccessRequest type: object AccessRequestCreationData: additionalProperties: false description: All data necessary to create an access request. properties: access_ends: description: Requested end date of access format: date-time title: Access Ends type: string access_starts: description: Requested start date of access format: date-time title: Access Starts type: string dataset_id: description: ID of the dataset for which access is requested pattern: ^[A-Z]{1,6}[0-9]{3,18}$ title: Dataset Id type: string email: description: Contact e-mail address of the requester format: email title: Email type: string iva_id: anyOf: - format: uuid4 type: string - type: 'null' description: ID of the IVA to be used for this request, but this can also be specified later title: Iva Id request_text: description: Text note submitted with the request title: Request Text type: string user_id: description: ID of the user who requests access format: uuid4 title: User Id type: string required: - user_id - dataset_id - email - request_text - access_starts - access_ends title: AccessRequestCreationData type: object AccessRequestPatchData: additionalProperties: false description: All data that describes an access request patch. properties: access_ends: anyOf: - format: date-time type: string - type: 'null' description: Modified end date of access title: Access Ends access_starts: anyOf: - format: date-time type: string - type: 'null' description: Modified start date of access title: Access Starts internal_note: anyOf: - type: string - type: 'null' description: A note about the access request only visible to Data Stewards title: Internal Note iva_id: anyOf: - format: uuid4 type: string - type: 'null' description: ID of the IVA to be used for this request title: Iva Id note_to_requester: anyOf: - type: string - type: 'null' description: A note about the access request that is visible to the requester title: Note To Requester status: anyOf: - $ref: '#/components/schemas/AccessRequestStatus' - type: 'null' description: The new status of this access request ticket_id: anyOf: - type: string - type: 'null' description: The ID of the ticket associated with the access request title: Ticket Id title: AccessRequestPatchData type: object AccessRequestStatus: description: The status of an access request. enum: - allowed - denied - pending title: AccessRequestStatus type: string securitySchemes: HTTPBearer: scheme: bearer type: http info: description: A service managing access requests for the GHGA Data Portal title: Access Request Service version: 8.0.3 openapi: 3.1.0 paths: /access-grants: get: description: Endpoint to get the list of all data access grants operationId: get_access_grants parameters: - description: The internal ID of the user in: query name: user_id required: false schema: anyOf: - format: uuid4 type: string - type: 'null' description: The internal ID of the user title: User Id - description: The ID of the IVA in: query name: iva_id required: false schema: anyOf: - format: uuid4 type: string - type: 'null' description: The ID of the IVA title: Iva Id - description: The ID of the dataset in: query name: dataset_id required: false schema: anyOf: - type: string - type: 'null' description: The ID of the dataset title: Dataset Id - description: Whether the grant is currently valid in: query name: valid required: false schema: anyOf: - type: boolean - type: 'null' description: Whether the grant is currently valid title: Valid responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/AccessGrant' title: Response 200 Get Access Grants type: array description: Access grants have been fetched. '401': description: Not authenticated. '403': description: Not authorized to get access grants. '422': description: Validation error in submitted parameters. security: - HTTPBearer: [] summary: Get data access grants tags: - AccessGrants /access-grants/{grant_id}: delete: description: Endpoint to revoke an existing data access grant. operationId: revoke_access_grant parameters: - description: The ID of the data access grant to revoke in: path name: grant_id required: true schema: description: The ID of the data access grant to revoke format: uuid4 title: Grant Id type: string responses: '204': description: The data access grant has been revoked. '401': description: Not authenticated. '403': description: Not authorized to revoke a data access grant. '404': description: The data access grant was not found. '422': description: Validation error in submitted data. security: - HTTPBearer: [] summary: Revoke a data access grant tags: - AccessGrants /access-requests: get: description: Endpoint used to get existing access requests operationId: get_access_requests parameters: - description: The internal ID of the user in: query name: user_id required: false schema: anyOf: - format: uuid4 type: string - type: 'null' description: The internal ID of the user title: User Id - description: The ID of the dataset in: query name: dataset_id required: false schema: anyOf: - type: string - type: 'null' description: The ID of the dataset title: Dataset Id - description: The status of the access request in: query name: status required: false schema: anyOf: - $ref: '#/components/schemas/AccessRequestStatus' - type: 'null' description: The status of the access request title: Status responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/AccessRequest' title: Response 200 Get Access Requests type: array description: Access requests have been fetched. '401': description: Not authenticated. '403': description: Not authorized to get access requests. '422': description: Validation error in submitted parameters. security: - HTTPBearer: [] summary: Get access requests tags: - AccessRequests post: description: Endpoint used to create a new access request operationId: create_access_request requestBody: content: application/json: schema: $ref: '#/components/schemas/AccessRequestCreationData' required: true responses: '201': content: application/json: schema: title: Response 201 Create Access Request type: string description: Access request was successfully created '401': description: Not authenticated. '403': description: Not authorized to create an access request. '404': description: Dataset not found '422': description: Validation error in submitted data. security: - HTTPBearer: [] summary: Create an access request tags: - AccessRequests /access-requests/{access_request_id}: get: description: Endpoint used to get an existing access request operationId: get_access_request parameters: - description: ID of the access request in: path name: access_request_id required: true schema: description: ID of the access request format: uuid4 title: Access Request Id type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/AccessRequest' description: Access request has been fetched. '401': description: Not authenticated. '403': description: Not authorized to get access request. '404': description: Access request does not exist. '422': description: Validation error in submitted data. security: - HTTPBearer: [] summary: Get access request tags: - AccessRequests patch: description: Endpoint used to set the status or modify other fields of an access request operationId: patch_access_request parameters: - description: ID of the access request in: path name: access_request_id required: true schema: description: ID of the access request format: uuid4 title: Access Request Id type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/AccessRequestPatchData' required: true responses: '204': description: Access request was successfully changed '401': description: Not authenticated. '403': description: Not authorized to change access request. '404': description: Access request does not exist. '422': description: Validation error in submitted data. security: - HTTPBearer: [] summary: Set status or modify other fields of an access request tags: - AccessRequests /health: get: description: Used to test if this service is alive operationId: health_health_get responses: '200': content: application/json: schema: {} description: Successful Response summary: health tags: - AccessRequests tags: - name: AccessRequests