Resource
Requisition
A requisition for data acrossEventGroups from a single DataProvider. Output-only.
A Requisition is created on behalf of a MeasurementConsumer to instruct a DataProvider to collect and upload data necessary to compute a Measurement result.
Resource name patterns:
dataProviders/{data_provider}/requisitions/{requisition}(canonical)measurementConsumers/{measurement_consumer}/measurements/{measurement}/requisitions/{requisition}
Resource name identifier.
Resource name of
Measurement that this Requisition is associated with. Required, immutable.Denormalized dereferenced
measurement_consumer_certificate field from measurement. Output only, immutable.Denormalized
measurement_spec field from measurement. Output only, immutable.Denormalized
protocol_config field from measurement. Output only, immutable.Denormalized
data_provider_certificate field from the corresponding DataProviderEntry in measurement. Output only, immutable.Denormalized
data_provider_public_key field from the corresponding DataProviderEntry in measurement. Output only, immutable.Denormalized
encrypted_requisition_spec field from the corresponding DataProviderEntry in measurement. Output only, immutable.Map of
Duchy name to parameters for that Duchy. Immutable.The state of this
Requisition. Output only.Possible values:STATE_UNSPECIFIED- Default value if state is omitted. Should never be used.UNFULFILLED- TheRequisitionhas not yet been fulfilledFULFILLED- TheRequisitionhas been fulfilled (terminal state)REFUSED- TheRequisitionhas been refused by theDataProvider(terminal state, causes measurement to fail)WITHDRAWN- TheRequisitionhas been withdrawn (terminal state)
The
nonce value from encrypted_requisition_spec. Output only. Set when state is FULFILLED.The refusal that put this
Requisition into the REFUSED state. Must be set when state is REFUSED.Context information related to the fulfillment of the
Requisition. May only be set when state is FULFILLED.Denormalized
state field from measurement. Output only.When the
Requisition was last updated. Output only.Current etag of the
Requisition. Output only.DuchyEntry
Entry in theduchies map.
Key of the map entry, which is a
Duchy resource name.Value of a map entry.
Refusal
Refusal of aRequisition.
Justification for refusing to fulfill this
Requisition.Possible values:JUSTIFICATION_UNSPECIFIED- Default value. Should never be used.CONSENT_SIGNAL_INVALID- At least one cryptographic consent signal (digital signature or encrypted value) is invalidSPEC_INVALID- The specification/configuration for theRequisitionis invalidINSUFFICIENT_PRIVACY_BUDGET- There is insufficient remaining privacy budget to fulfill theRequisitionUNFULFILLABLE- TheRequisitioncannot be fulfilled for a reason not indicated by another justificationDECLINED- TheDataProviderhas declined to fulfill thisRequisition
Human-readable string adding more context to the provided
Justification. This should NOT include sensitive information.Example: “Data Provider X does not support Virtual ID model line Y”.FulfillmentContext
Context information related to the fulfillment of aRequisition.
Build label from the fulfilling
DataProvider.Human-readable warnings about the fulfillment. This must not include sensitive data.
Methods
ListRequisitions
Returns theRequisitions for the specified EventGroup.
Request
Resource key of the parent
DataProvider or Measurement.Results in a PERMISSION_DENIED error if any key segment does not match for the authenticated user.Formats:dataProviders/{data_provider}measurementConsumers/{measurement_consumer}/measurements/{measurement}
The maximum number of resources to return. The service may return fewer than this value.If unspecified, at most 10 resources will be returned. The maximum value is 500; values above this will be coerced to the maximum.
A token from a previous call, specified to retrieve the next page. See https://aip.dev/158.
Filter criteria. Repeated fields are treated as logical ORs, and multiple fields specified as logical ANDs.
The
Requisition resources.A token that can be specified in a subsequent call to retrieve the next page. See https://aip.dev/158.
GetRequisition
Returns theRequisition with the specified resource key.
Request
Resource name of the Requisition.Format:
dataProviders/{data_provider}/requisitions/{requisition}Requisition resource.
Example
RefuseRequisition
Transitions aRequisition to the REFUSED state.
This is a terminal state for the Requisition, resulting in the permanent failure of the parent Measurement. Consequently, this should only be called for permanent failures and not transient errors.
This is a state transition method (https://aip.dev/216).
Request
Resource name of the
Requisition to mark as UNFILLABLE.Format: dataProviders/{data_provider}/requisitions/{requisition}Details about the refusal.
Etag of the requisition. If specified and the value does not match the current etag, the operation will not occur and will result in an
ABORTED status.Requisition resource with state set to REFUSED.
Example
- Refusing a requisition causes the parent measurement to fail permanently.
- Only use for permanent failures (e.g., invalid spec, insufficient privacy budget).
- For transient errors, retry instead of refusing.
- The etag parameter provides optimistic concurrency control.
FulfillDirectRequisition
Fulfills aRequisition using the Direct protocol.
This may only be called if Requisition.protocol_config indicates that the protocol may be used. See the RequisitionFulfillment service to fulfill using a different protocol.
Request
Resource name of the
Requisition.Format: dataProviders/{data_provider}/requisitions/{requisition}Encrypted
SignedMessage containing a Measurement.Result.The encryption uses the measurement_public_key from measurement_spec as the recipient’s public key.The versions of the SignedMessage and Measurement.Result message types must match the API version of this request message.The
nonce value from the encrypted_requisition_spec.Resource name of the
Certificate belonging to the DataProvider that can be used to verify the result.If unspecified, the data_provider_certificate from the Requisition will be used.Context information related to the fulfillment of the
Requisition.Etag of the requisition. If specified and the value does not match the current etag, the operation will not occur and will result in an
ABORTED status.Resulting state of the
Requisition. Output only.- The Direct protocol is used for simple, direct data provision.
- The result must be encrypted with the measurement consumer’s public key.
- The nonce must match the one from the encrypted requisition spec.
- The etag parameter provides optimistic concurrency control.
State Transitions
Requisitions follow this state transition workflow:State Descriptions
- UNFULFILLED: The requisition has been created but not yet fulfilled by the data provider.
- FULFILLED: The data provider has successfully fulfilled the requisition by providing the requested data.
- REFUSED: The data provider refused to fulfill the requisition (causes measurement to fail).
- WITHDRAWN: The requisition was withdrawn (e.g., measurement was cancelled).
Refusal Justifications
CONSENT_SIGNAL_INVALID
Use when:- A digital signature cannot be verified using the specified certificate
- An encrypted value cannot be decrypted using the specified key
- Cryptographic validation fails
SPEC_INVALID
Use when:- The encrypted requisition spec contains invalid data
- The time interval is invalid (e.g., end_time before start_time)
- Configuration is not supported by the DataProvider
INSUFFICIENT_PRIVACY_BUDGET
Use when:- The requisition would exceed available privacy budget
- Differential privacy constraints prevent fulfillment
- Privacy parameters are exhausted
UNFULFILLABLE
Use when:- Data corruption prevents fulfillment
- Internal DataProvider failure occurs
- The requisition should be fulfillable but cannot be for technical reasons
DECLINED
Use when:- DataProvider policy prevents fulfillment
- Business reasons prevent fulfillment
- Reasons not expressible through other justifications
Workflow
DataProvider Perspective
- List Requisitions: Poll for new UNFULFILLED requisitions using
ListRequisitions. - Decrypt Spec: Decrypt the
encrypted_requisition_specusing your private key. - Validate Request: Check signatures, validate spec, check privacy budget.
- Collect Data: Gather the requested data from your EventGroups.
- Compute Result: Calculate the measurement result according to the spec.
- Encrypt Result: Encrypt the result using the measurement consumer’s public key.
- Fulfill or Refuse:
- Success: Call
FulfillDirectRequisitionwith the encrypted result - Failure: Call
RefuseRequisitionwith appropriate justification
- Success: Call
MeasurementConsumer Perspective
- Create Measurement: Creating a measurement automatically creates requisitions.
- Monitor Progress: Poll measurement state or list requisitions to track fulfillment.
- Handle Failures: If a requisition is refused, the measurement will fail with details.
- Retrieve Results: When all requisitions are fulfilled and computation completes, decrypt results.
