Method: consentStores.checkDataAccess

Full name: projects.locations.datasets.consentStores.checkDataAccess

Checks if a particular dataId of a User data mapping in the given Consent store is consented for a given use.

HTTP request

POST https://healthcare.googleapis.com/v1beta1/{consentStore=projects/*/locations/*/datasets/*/consentStores/*}:checkDataAccess

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
consentStore

string

Name of the Consent store where the requested dataId is stored, of the form projects/{projectId}/locations/{locationId}/datasets/{datasetId}/consentStores/{consentStoreId}.

Authorization requires the following IAM permission on the specified resource consentStore:

  • healthcare.consentStores.checkDataAccess

Request body

The request body contains data with the following structure:

JSON representation
{
  "dataId": string,
  "requestAttributes": {
    string: string,
    ...
  },
  "responseView": enum(ResponseView),
  "consentList": {
    object(ConsentList)
  }
}
Fields
dataId

string

The unique identifier of the data to check access for. It must exist in the given consentStore.

requestAttributes

map (key: string, value: string)

The values of request attributes associated with this access request.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

responseView

enum(ResponseView)

The view for CheckDataAccessResponse.

consentList

object(ConsentList)

The Consents to evaluate the access request against. They must have the same userId as the data to check access for, exist in the current consentStore, and can have a state of either ACTIVE or DRAFT. A maximum of 100 consents can be provided here.

Response body

If successful, the response body contains data with the following structure:

Checks if a particular dataId of a User data mapping in the given Consent store is consented for a given use.

JSON representation
{
  "consented": boolean,
  "consentDetails": {
    string: {
      object(ConsentEvaluation)
    },
    ...
  }
}
Fields
consented

boolean

Whether the requested data is consented for the given use.

consentDetails

map (key: string, value: object(ConsentEvaluation))

The resource names of all evaluated Consents mapped to their evaluation.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-healthcare
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ResponseView

The supported views for CheckDataAccessResponse.

Enums
RESPONSE_VIEW_UNSPECIFIED No response view specified. The API will default to the BASIC view.
BASIC Only the consented field is populated in CheckDataAccessResponse.
FULL All fields within CheckDataAccessResponse are populated. When set to FULL, all ACTIVE consents are evaluated even if a matching policy is found during evaluation.