Resource
Account
An API user account resource. Resource Pattern:accounts/{account}
Resource name.
Resource name of the Account that created this one. Output-only. Immutable.Reference:
halo.wfanet.org/AccountActivation state of this Account. Output-only.Possible values:
ACTIVATION_STATE_UNSPECIFIED- Default valueUNACTIVATED- Account has not yet been activatedACTIVATED- Account has been activated (terminal state)
Parameters for activation of this Account.Only set when
activation_state is UNACTIVATED in FULL view.OpenID Connect identity of the user for this Account. Output-only.This must be set when
activation_state is ACTIVATED. The value is unique across all Account resources.Views
Accounts support different view levels:VIEW_UNSPECIFIED- Defaults to BASICBASIC- Basic account informationFULL- Complete account details including activation parameters
Methods
CreateAccount
Creates (registers) an Account. Thecreator will be derived from the authenticated caller. Results in PERMISSION_DENIED if the authenticated caller does not own the owned_measurement_consumer in activation_params.
Returns the FULL view of the created Account.
The Account to create. The
name field will be ignored, and the system will assign an ID.The created Account resource in FULL view.
Example Request
Error Conditions
PERMISSION_DENIED- Caller does not own theowned_measurement_consumerspecified in activation parametersINVALID_ARGUMENT- Invalid account data provided
ActivateAccount
Activates an account by transitioning itsactivation_state to ACTIVATED.
The identity will be derived from the authenticated caller.
Resource name of the Account to activate.Format:
accounts/{account}Activation token obtained from the Account’s activation_params.
The activated Account resource.
Example Request
Error Conditions
NOT_FOUND- Account not foundINVALID_ARGUMENT- Invalid activation tokenFAILED_PRECONDITION- Account already activated
ReplaceAccountIdentity
Replaces theidentity of an Account.
Results in PERMISSION_DENIED if the authenticated caller does not match the current identity.
Resource name of the Account.Format:
accounts/{account}Replacement credentials for an OpenID Connect identity.
The updated Account resource.
Example Request
Error Conditions
PERMISSION_DENIED- Caller does not match current identityNOT_FOUND- Account not foundINVALID_ARGUMENT- Invalid credentials provided
Authenticate
Authenticates the user using an OpenID Connect (OIDC) provider.OpenID Connect issuer identifier.For Self-Issued OpenID Providers, this will be
https://self-issued.me.URI for id_token authentication request to OpenID Provider.
Example Request
Example Response
Usage Examples
Creating and Activating an Account
- Create the account:
- Activate with token:
