Show your application's own events, jobs and users
Operators of your application want to see, inside it, what it published, what was delivered on its behalf and who its users are, without access to the platform console. The platform offers application-scoped reads for this: your backend calls them as the application’s service account and gets only the application’s own data.
flowchart LR U[Your admin user] -->|session| App[Your application backend] App -->|checks the user's admin permission| App App -->|service-account token| FC[Platform /api] FC -->|only this application's rows| App
Two checks happen, in this order: your application decides whether the signed-in person may see
the admin pages (a permission of yours, such as orders:admin:page:view), then the platform
confines the service account to its application. Never pass a user’s token through: it cannot call
the API, and should not.
What the service account can read
Section titled “What the service account can read”| Data | Routes | Permission (in the built-in application-service role) |
|---|---|---|
| Events | GET /api/events, GET /api/events/{id} |
event:view |
| Dispatch jobs and attempts | GET /api/dispatch-jobs, /{id}, /{id}/attempts, /event/{eventId} |
dispatch-job:view |
| Users | GET /api/applications/{appCode}/users, /{id} |
user:view |
| Invitations | GET /api/applications/{appCode}/invitations |
invitation:view |
Confinement:
- Events and jobs are filtered to rows whose application (the first segment of the event type or job
code) is one the credential is bound to. Your own
applications,typesorcodesfilters can only narrow within that. - An application’s users are the CLIENT users homed at a client the application is enabled for
who hold at least one of its roles; their
roleslist shows only your application’s roles. - Another application’s code, or a record outside the application, answers
404exactly like a missing one, so the answers never reveal what else exists. - A credential bound to no application gets
403(“this credential is not bound to an application”), not an empty page.
If the role was extended after your token was minted, fetch a new token.
Read them
Section titled “Read them”var events = client.events().list(EventsResource.Filters.page(50, 0)); // newest firstvar jobs = client.dispatchJobs().list(DispatchJobsResource.Filters.page(50, 0));var attempts = client.dispatchJobs().attempts(jobs.getFirst().getId());
var users = client.applicationUsers().list("orders", ApplicationUsersResource.Filters.page(0, 50));var pending = client.applicationUsers().invitations("orders", "PENDING", 0, 50);import { listDispatchJobAttempts, listDispatchJobs, listEvents } from "@flowcatalyst/sdk";
const events = await client.request((c, headers) => listEvents({ client: c, headers, query: { types: ["orders:sales:order:placed"], size: 50 } }));
const failed = await client.request((c, headers) => listDispatchJobs({ client: c, headers, query: { status: "FAILED", since: weekAgo, until: now } }));
const attempts = await client.request((c, headers) => listDispatchJobAttempts({ client: c, headers, path: { id: jobId } }));$api = FlowCatalyst::generated();
$events = $api->listEvents(['size' => 50]);$failed = $api->listDispatchJobs(['status' => 'FAILED', 'since' => $weekAgo, 'until' => $now]);$attempts = $api->listDispatchJobAttempts($jobId);$users = $api->listApplicationUsers('orders', ['pageSize' => 50]);The Go client has no events or dispatch-job read resource yet; use its authenticated Get:
var page map[string]anyq := url.Values{"status": {"FAILED"}, "since": {weekAgo}, "until": {now}}err := c.Get(ctx, "/api/dispatch-jobs?"+q.Encode(), &page)Things to know when building the pages
Section titled “Things to know when building the pages”- Dispatch-job lists are time-windowed. Send
sinceanduntil(RFC 3339). Without them the last 24 hours are read; a window wider than 31 days is refused (WINDOW_TOO_LARGE). Single-job and per-event lookups are not windowed. See dispatch jobs. - Paging. Events and jobs page with
limit(orsize, at most 1000) andoffset, newest first. Users and invitations page withpage(from 0) andpageSize(default 50, at most 200). - Filters. Jobs filter by
status/statuses,code/codes,messageGroup,subscriptionId,clientIdand more; events bytype/types,subject,correlationId,clientId. The HTTP API reference has the full lists. - Reads only. Requeueing, redriving, cancelling or editing jobs needs operator permissions the application’s service account does not have; those stay in the console (dispatch operations). User writes (invite, resend, revoke) are covered in create users and invitations.
- Multi-tenant applications. Rows carry their client (
clientId); show each tenant’s administrators only their own client’s rows. The platform confines by application, not by which of your users is looking. - Users never include password hashes, tokens, links or second-factor state.