Method: consentStores.evaluateUserConsents

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

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

Note: User data mappings are indexed asynchronously, which can cause a slight delay between the time mappings are created or updated and when they are included in consentStores.evaluateUserConsents results.

HTTP request

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

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
consentStore

string

Required. 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,

  // Union field consent_selection can be only one of the following:
  "consentList": {
    object(ConsentList)
  }
  // End of list of possible types for union field consent_selection.
}
Fields
userId

string

Required. User ID to evaluate consents for.

resourceAttributes

map (key: string, value: string)

Optional. The values of resource attributes associated with the resources being requested. If no values are specified, then all resources 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)

Required. 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)

Optional. The view for EvaluateUserConsentsResponse. If unspecified, defaults to BASIC and returns consented as TRUE or FALSE.

pageSize

integer

Optional. Limit on the number of User data mappings to return in a single response. If not specified, 100 is used. May not be larger than 1000.

pageToken

string

Optional. Token to retrieve the next page of results, or empty to get the first page.

consentList

object(ConsentList)

Optional. Specific Consents to evaluate the access request against. These Consents must have the same userId as the User data mappings being evalauted, must exist in the current consentStore, and must have a state of either ACTIVE or DRAFT. A maximum of 100 Consents can be provided here. If unspecified, all ACTIVE unexpired Consents in the current consentStore will be evaluated.

Response body

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

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 dataId and consented fields are 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 evaluated resource.

consented

boolean

Whether the resource 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" }.