OpenapiO11y
Tells a sign-in page what an email address can do: which orgs the address…
Tells a sign-in page what an email address can do: which orgs the address belongs to and, per org, which password and SSO routes are open to it.
GET /v1/o11y/sessions/context
| Address | https://api.hanzo.ai/v1/o11y/sessions/context |
| Method | GET |
| Operation | GetSessionContext |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Tells a sign-in page what an email address can do: which orgs the address belongs to and, per org, which password and SSO routes are open to it. Unauthenticated: it runs before any session exists.
Request
2 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
email | query | string | — | Email is the address about to sign in. |
ref | query | string | — | Ref is the page the sign-in started from, carried into SSO redirects. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | o11y.O11ySessionContextOut | ok |
200 body — 23 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
data | body | o11y.O11ySessionContext | — | |
data.exists | body | boolean | — | Exists says whether any account carries the address. |
data.orgs | body | o11y.O11ySessionOrg[] | — | Orgs are the orgs the address belongs to, each with its sign-in routes. |
data.orgs[].authNSupport | body | o11y.O11yAuthNSupport | — | |
data.orgs[].authNSupport.callback | body | o11y.O11yCallbackAuthN[] | — | Callback are the SSO routes; each is begun by visiting its URL. |
data.orgs[].authNSupport.callback[].provider | body | string | — | Provider is the route's provider — google_auth, saml or oidc. |
data.orgs[].authNSupport.callback[].url | body | string | — | URL is where the browser goes to begin the flow. |
data.orgs[].authNSupport.password | body | o11y.O11yPasswordAuthN[] | — | Password are the password routes. |
data.orgs[].authNSupport.password[].provider | body | string | — | Provider is the route's provider, e.g. |
data.orgs[].id | body | string | — | ID is the org id. |
data.orgs[].name | body | string | — | Name is the org's display name. |
data.orgs[].warning | body | o11y.O11yErrorDetail | — | |
data.orgs[].warning.code | body | string | — | Code is the machine-readable code. |
data.orgs[].warning.errors | body | o11y.O11yErrorItem[] | — | Errors are further details, one message and its suggestions each. |
data.orgs[].warning.errors[].message | body | string | — | Message is the detail. |
data.orgs[].warning.errors[].suggestions | body | string[] | — | Suggestions say what to try about this detail. |
data.orgs[].warning.message | body | string | — | Message is the human-readable reason. |
data.orgs[].warning.retry | body | o11y.O11yRetry | — | |
data.orgs[].warning.retry.delay | body | integer | — | Delay is how long to wait before retrying, in nanoseconds. |
data.orgs[].warning.suggestions | body | string[] | — | Suggestions say what to try instead. |
data.orgs[].warning.type | body | string | — | Type is the error's category, e.g. |
data.orgs[].warning.url | body | string | — | Url points at documentation for the error, when there is any. |
status | body | string | — | Status is "success". |
Failure carries the platform error shape — see Errors.
Examples
hanzo o11y sessions contextimport { Configuration, O11yApi } from 'hanzoai';
const api = new O11yApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getSessionContext();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import O11yApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = O11yApi(client).get_session_context()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.O11yAPI.GetSessionContext(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, o11y_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = o11y_api::get_session_context(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.O11yApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new O11yApi(client).getSessionContext();curl https://api.hanzo.ai/v1/o11y/sessions/context \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches o11y through the o11y tool, which names its 340 operations with its own verbs — this one among them, under a name only the door declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "get_o11y_alert_last"
}
}
}'How is this guide?