identity.membership.query-by-user ​
Return organizations a specific user belongs to with their role
Get organizations a specific user belongs to, with their role in each.
Inputs:
- user_uuid: User UUID (required)
- organization_uuid: Scope to a single org (optional)
- actor: Caller cognito_sub or uuid (required)
Outputs (terminal state_data):
- organizations: list of org dicts
- user_uuid: UUID
- count: number of orgs returned (page count)
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-identity |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
user_uuid | uuid | Yes | — | User UUID |
organization_uuid | uuid | No | — | Scope to a specific organization by public UUID (returns at most one result) |
actor | string | Yes | — | Caller cognito_sub or uuid |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organizations | list | Yes | — | — |
count | integer | Yes | — | — |
user_uuid | uuid | No | — | — |
organization_uuid | uuid | No | — | — |
actor | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "identity.membership.query-by-user",
"initial_data": {
"user_uuid": "value",
"actor": "value"
}
}