Method: consentStores.evaluateUserConsents

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

Evaluates the end user's Consents for all matching User data mappings.

Note: User data mappings are indexed asynchronously, so there might be a slight delay between the time a mapping is created or updated and when it is included in the results of consentStores.evaluateUserConsents.

HTTP request

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

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
consentStore

string

Name of the Consent store to retrieve user data mappings from.

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

  • healthcare.consentStores.evaluateUserConsents

Request body

The request body contains data with the following structure:

JSON representation
{
  "userId": string,
  "resourceAttributes": {
    string: string,
    ...
  },
  "requestAttributes": {
    string: string,
    ...
  },
  "responseView": enum(ResponseView),
  "pageSize": integer,
  "pageToken": string,
  "consentList": {
    object(ConsentList)
  }
}
Fields
userId

string

Required. User ID to evaluate consents for.

resourceAttributes

map (key: string, value: string)

The values of resources attributes associated with the type of data being requested. If no values are specified, then all data types are queried.

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

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 EvaluateUserConsentsResponse.

pageSize

integer

Limit on the number of user data mappings to return in a single response. If zero the default page size of 100 is used.

pageToken

string

Token to retrieve the next page of results to get the first page.

consentList

object(ConsentList)

The resource names of the consents to evaluate against. Consents must be in the current consentStore and belong to the current userId. Consents can be either active or draft.

If this field is empty, the default behavior is to use all active consents that belong to userId. A maximum of 100 consents can be provided here.

Response body

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

Evaluate an end user's Consents for all matching User data mappings.

JSON representation
{
  "results": [
    {
      object(Result)
    }
  ],
  "nextPageToken": string
}
Fields
results[]

object(Result)

The consent evaluation result for each dataId.

nextPageToken

string

Token to retrieve the next page of results or empty if there are no more results in the list. This token is valid for 72 hours after it is created.

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 EvaluateUserConsentsResponse.

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

Result

The consent evaluation result for a single dataId.

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

string

The unique identifier of the data the consents were checked for.

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" }.