List sign-in audit events
const url = 'https://example.com/v1/audit/sign-ins?limit=25&kind=signed-in&order=asc';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v1/audit/sign-ins?limit=25&kind=signed-in&order=asc' \ --header 'Authorization: Bearer <token>'The tenant’s sign-in history: who signed in and out, how (method), when and from where (clientAddress), what was refused and why, and emailed links sent or capped. ?userId= narrows to one person’s own sign-ins and sign-outs. Oldest first; ?order=desc for newest first. A tenant admin’s to read (403 permission-denied otherwise). Only mounted when CreateAppInput.auditEvents is wired.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”1..100. Default 25.
Where the previous page ended: its nextCursor, as it came. A runtime that seals cursors takes one only for the same list, filters and caller, within a day; otherwise 400 bad-input, and the list starts again without it. Absent → first page.
One person’s own sign-ins and sign-outs.
One kind of event.
Inclusive lower bound on timestamp.
Inclusive upper bound on timestamp.
asc (the default): oldest first. desc: newest first. nextCursor continues in the same order.
Responses
Section titled “Responses”A page of sign-in audit events.
object
One sign-in audit event, flattened: who signed in or out, how, from where, and what was refused.
object
signed-in / signed-out; sign-in-refused (with reason); sign-in-link-sent / sign-in-link-capped (an emailed link, for userId; reason is the limit that held); sessions-revoked (“sign out everywhere”, or removing a person); sessions-ended (a changed boot token).
succeeded or denied.
The person: who signed in or out, or whom a link was for. Absent on a refusal.
How: api-token, email-link, google, microsoft, github, or a workspace identity provider’s id.
The client’s address, as the runtime trusts it.
Why a sign-in was refused, or which limit held.
Example
{ "data": [ { "kind": "signed-in" } ]}Malformed cursor, kind, from, to, or order.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Not a tenant admin (permission-denied).
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}