UserAccount¶
A UserAccount is the account of a person who signs in to your application. It is created
automatically the first time the person exchanges an ID token for an access token, so you rarely create one
yourself. Its tags are what your ABAC policy decides on: give users tags such as
department: marketing or role: buyer.
Set disabled to stop an account from getting new tokens. The tag security.role with value
organization-account-administrator makes the user an administrator of your Organization Account; see
Access control.
A user's personal data, such as email address and name, is kept in the account's Person,
which person links to; the account itself holds none. identities are the sign-in identities the account signs in
with, added by signing in. An email belongs to one account of your Organization Account at most.
To find the account of an email, look up its Person with GET /persons?email=, then the account with a search on
person.keyword (GET /useraccounts?query={"query": {"term": {"person.keyword": "<Person url>"}}}). To create an
account yourself, create its Person first, then POST /useraccounts with person, iss and sub. Linking an account
to a Person needs the right to update that Person. It is refused with 409 when the Person is erased, already has an
account, or its email belongs to another account's Person.
Fields¶
Required: id, disabled, tags.
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | The object's id. Assigned by ObjectsGrid when the object is created. |
person |
URL | URL of the Person this account belongs to, which holds the account's personal data (name, email, address). Created with the account; empty once the person is erased. | |
identities |
list of object | The sign-in identities the account signs in with: the iss and sub claims of ID tokens. Added by signing in, or by the account itself with POST /useraccounts/{id}/identities (a second provider, such as Apple next to Google); an update may only remove them all, with [], as an erasure does. | |
identities[].iss |
string | Yes | |
identities[].sub |
string | Yes | |
disabled |
boolean | Yes | Is the UserAccount disabled |
tags |
list of Tag | Yes | Tags your ABAC policy decides on. Created empty when not sent, kept by a PUT that leaves them out, cleared by null or []. |
REST API¶
Base URL https://apis.objectsgrid.com. Every request sends the X-ObjectsGrid-AccessPoint and Authorization: Bearer <access token> headers; see the REST API guide.
| Operation | Request |
|---|---|
| Create | POST /useraccounts |
| List and search | GET /useraccounts |
| Retrieve | GET /useraccounts/{id} |
| Replace | PUT /useraccounts/{id} |
| Update some fields | PATCH /useraccounts/{id} |
| Delete | DELETE /useraccounts/{id} |
| Add a way to sign in to your user account | POST /useraccounts/{id}/identities |
The OpenAPI contract, with every parameter and response: UserAccounts (JSON).