@portpowered/reference-data 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/generated/guides.json +5 -5
- package/generated/openapi.json +5 -5
- package/generated/public/docs/for-ai/guides/authentication-and-dcr.md +170 -1
- package/generated/public/docs/for-ai/guides/oauth-consent-and-callback.md +19 -0
- package/generated/public/docs/for-ai/guides/oauth-discovery.md +14 -0
- package/generated/public/docs/for-ai/guides/oauth-token-lifecycle.md +15 -0
- package/generated/public/docs/for-ai/guides/quickstart.md +4 -2
- package/generated/public/docs/for-ai/operations/sendMessage.md +4 -2
- package/generated/public/docs/for-ai/operations/sendMessageLegacyAlias.md +4 -2
- package/generated/public/docs/for-ai/schemas/a-1.md +44 -0
- package/generated/public/docs/for-ai/schemas/a-2.md +9 -0
- package/generated/public/docs/for-ai/schemas/b-1.md +22 -0
- package/generated/public/docs/for-ai/schemas/c-1.md +44 -0
- package/generated/public/docs/for-ai/schemas/c-2.md +44 -0
- package/generated/public/docs/for-ai/schemas/c-3.md +16 -0
- package/generated/public/docs/for-ai/schemas/d-1.md +22 -0
- package/generated/public/docs/for-ai/schemas/e-1.md +44 -0
- package/generated/public/docs/for-ai/schemas/e-2.md +42 -0
- package/generated/public/docs/for-ai/schemas/f-1.md +44 -0
- package/generated/public/docs/for-ai/schemas/f-2.md +8 -0
- package/generated/public/docs/for-ai/schemas/g-1.md +17 -0
- package/generated/public/docs/for-ai/schemas/h-1.md +9 -0
- package/generated/public/docs/for-ai/schemas/i-1.md +13 -0
- package/generated/public/docs/for-ai/schemas/k-1.md +6 -0
- package/generated/public/docs/for-ai/schemas/l-1.md +22 -0
- package/generated/public/docs/for-ai/schemas/m-1.md +44 -0
- package/generated/public/docs/for-ai/schemas/m-2.md +16 -0
- package/generated/public/docs/for-ai/schemas/n-1.md +15 -0
- package/generated/public/docs/for-ai/schemas/o-1.md +20 -0
- package/generated/public/docs/for-ai/schemas/p-1.md +44 -0
- package/generated/public/docs/for-ai/schemas/p-2.md +29 -0
- package/generated/public/docs/for-ai/schemas/q-1.md +8 -0
- package/generated/public/docs/for-ai/schemas/r-1.md +44 -0
- package/generated/public/docs/for-ai/schemas/r-2.md +34 -0
- package/generated/public/docs/for-ai/schemas/s-1.md +44 -0
- package/generated/public/docs/for-ai/schemas/s-2.md +44 -0
- package/generated/public/docs/for-ai/schemas/s-3.md +13 -0
- package/generated/public/docs/for-ai/schemas/t-1.md +29 -0
- package/generated/public/docs/for-ai/schemas/u-1.md +33 -0
- package/generated/public/docs/for-ai/schemas/v-1.md +9 -0
- package/generated/public/docs/for-ai/schemas/w-1.md +23 -0
- package/generated/public/docs/for-ai/schemas.md +37 -728
- package/generated/public/docs/references/manifest.json +403 -76
- package/generated/public/docs/references/openapi.yaml +12 -5
- package/generated/public/docs/references/schemas/CreateMessageResponse.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
author: Port OS Team
|
|
3
|
-
last modified: 2026, october,
|
|
3
|
+
last modified: 2026, october, 9
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Port OS reference data
|
|
@@ -47,6 +47,6 @@ Import `@portpowered/reference-data/capabilities`, `@portpowered/reference-data/
|
|
|
47
47
|
|
|
48
48
|
Individual schemas are exported as `@portpowered/reference-data/resources/<capability>/configuration.json`, `state-<attribute>.json`, and `message-<name>.json`. Consumers can render field tables directly from these resources. Keep the package imports on the server or at build time to avoid shipping the complete catalog in browser JavaScript.
|
|
49
49
|
|
|
50
|
-
REST operation guides link directly to `/docs/references/schemas/<name>.json`, `/docs/references/parameters/<name>.json` and `/docs/references/headers/<name>.json`. Schema files use JSON Schema draft-07 with OpenAPI nullability and exclusive bounds converted; parameter/header files retain their OpenAPI definitions. References and discriminator mappings point to the same public host. `/docs/for-ai/schemas.md`
|
|
50
|
+
REST operation guides link directly to `/docs/references/schemas/<name>.json`, `/docs/references/parameters/<name>.json` and `/docs/references/headers/<name>.json`. Schema files use JSON Schema draft-07 with OpenAPI nullability and exclusive bounds converted; parameter/header files retain their OpenAPI definitions. References and discriminator mappings point to the same public host. `/docs/for-ai/schemas.md` is a small hub linking alphabetical `/docs/for-ai/schemas/<letter>-<page>.md` shards of at most 40 components. `/docs/references/schemas/index.json` retains the complete machine index. Agents can retrieve the components needed for one operation without reading the full OpenAPI bundle. Generation checks compile the complete linked schema graph and validate the API's complete request/response examples through it.
|
|
51
51
|
|
|
52
52
|
Run `npm pack` in this directory to produce a portable bundle. The bundle contains generated JSON, the raw public tree and this README; regeneration belongs to the source repository. The Go module embeds that public tree and exposes it through `Files() fs.FS`. Public URLs are rooted at `/llms.txt`, `/docs/for-ai/` and `/docs/references/`; missing files are absent rather than an app-shell fallback. Run `node scripts/validate-public-assets.mjs` and `go test ./...` before release.
|
package/generated/guides.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
{
|
|
9
9
|
"id": "authentication-and-dcr",
|
|
10
10
|
"title": "Authentication and dynamic client registration",
|
|
11
|
-
"content": "# Authentication and dynamic client registration\n\nAll supported agents use the same OAuth components. REST and MCP select different protected resources; DCR and CIMD select different registration methods. Neither product branding nor registration grants device access.\n\nStart with [Connect any supported agent](/docs/for-ai/guides/connect-agent.md), or follow these components in order:\n\n1. [Discover endpoints and choose REST or MCP](/docs/for-ai/guides/oauth-discovery.md).\n2. [Register with DCR or supported CIMD](/docs/for-ai/guides/oauth-client-registration.md). Remote callbacks require HTTPS; local callback registrations contain only localhost/loopback callbacks. Repeated canonical fingerprints reuse the original public client without expanding scopes.\n3. [Obtain user consent and validate the callback](/docs/for-ai/guides/oauth-consent-and-callback.md). PKCE S256 is required. Pause for the user to sign in and approve access.\n4. [Exchange, refresh and revoke tokens](/docs/for-ai/guides/oauth-token-lifecycle.md). Keep the same canonical resource through authorization, exchange and refresh.\n5. [Verify the connection](/docs/for-ai/guides/first-setup.md), then use [the REST quickstart](/docs/for-ai/guides/quickstart.md) or your client's MCP tools.\n\nRead [authorization rules](/docs/for-ai/guides/authorization-rules.md) for scopes, principal/resource policies, sharing and denial diagnosis. Never ask for a Google password, paste credentials into chat, or approve the agent's own grant. Claimed client names such as Muse and Grok remain unverified.\n",
|
|
11
|
+
"content": "# Authentication and dynamic client registration\n\nAll supported agents use the same OAuth components. REST and MCP select different protected resources; DCR and CIMD select different registration methods. Neither product branding nor registration grants device access.\n\nThe complete walkthrough below is generated from the canonical components linked here. Read it in one document, or reference the individual components from your connector:\n\n1. [Discover endpoints and choose REST or MCP](/docs/for-ai/guides/oauth-discovery.md).\n2. [Register with DCR or supported CIMD](/docs/for-ai/guides/oauth-client-registration.md). Remote callbacks require HTTPS; local callback registrations contain only localhost/loopback callbacks. Repeated canonical fingerprints reuse the original public client without expanding scopes.\n3. [Obtain user consent and validate the callback](/docs/for-ai/guides/oauth-consent-and-callback.md). PKCE S256 is required. Pause for the user to sign in and approve access.\n4. [Exchange, refresh and revoke tokens](/docs/for-ai/guides/oauth-token-lifecycle.md). Keep the same canonical resource through authorization, exchange and refresh.\n5. [Verify the connection](/docs/for-ai/guides/first-setup.md), then use [the REST quickstart](/docs/for-ai/guides/quickstart.md) or your client's MCP tools.\n\nRead [authorization rules](/docs/for-ai/guides/authorization-rules.md) for scopes, principal/resource policies, sharing and denial diagnosis. Never ask for a Google password, paste credentials into chat, or approve the agent's own grant. Claimed client names such as Muse and Grok remain unverified.\n\n## Discover the OAuth server and choose REST or MCP\n\nThis discovery step is shared by every client. The deployed pilot API is https://api.portoperatingsystem.lol. Fetch its /.well-known/oauth-authorization-server document anonymously. Read issuer, authorization_endpoint, token_endpoint, registration_endpoint, revocation_endpoint and scopes_supported. Use the returned endpoints exactly. An alias can advertise a different canonical Cloud Run issuer; do not substitute the alias into token audiences.\n\n| Interface | API destination | OAuth resource |\n| --- | --- | --- |\n| REST | The returned issuer, plus the documented operation path | The exact returned issuer |\n| MCP | The returned issuer plus /mcp, Streamable HTTP | The resource returned by /.well-known/oauth-protected-resource/mcp, normally issuer plus /mcp |\n\nAn MCP connector can start at https://api.portoperatingsystem.lol/mcp and follow its WWW-Authenticate resource_metadata URL. Fetch that public metadata and the authorization server it names. MCP initialization alone does not prove that the account's devices are accessible. Never use a REST token on MCP or an MCP token on REST.\n\nChoose one supported [client registration method](/docs/for-ai/guides/oauth-client-registration.md), then follow the same [consent and callback steps](/docs/for-ai/guides/oauth-consent-and-callback.md). If metadata omits registration_endpoint, new DCR registration is unavailable; do not guess a replacement endpoint or silently switch to another client's credentials.\n\nSee [scopes and resource rules](/docs/for-ai/guides/authorization-rules.md). Authorization-server scopes_supported describes server vocabulary; a particular client's accepted scopes can be narrower.\n\n### Carry discovery values into every request\n\nThis JavaScript fragment initializes a REST connection. Keep `authorizationServer` and `resource` for the consent and token examples; the API alias is only the discovery starting point.\n\n```javascript\nconst response = await fetch('https://api.portoperatingsystem.lol/.well-known/oauth-authorization-server');\nif (!response.ok) throw new Error('OAuth discovery failed');\nconst authorizationServer = await response.json();\nconst resource = authorizationServer.issuer;\nconst apiBase = authorizationServer.issuer;\n```\n\nFor MCP, assign `resource` from the protected-resource metadata's `resource` field instead. Do not replace either value with the hostname you started from. A wrong `resource` can produce an `invalid_request` error callback even when client registration succeeded.\n\nCanonical component: [Discover the OAuth server and choose REST or MCP](/docs/for-ai/guides/oauth-discovery.md).\n\n## Register an OAuth client with DCR or CIMD\n\nStart with [discovery](/docs/for-ai/guides/oauth-discovery.md). DCR and CIMD identify a client; they do not sign in a user or grant device access. Both use the same [PKCE consent and callback flow](/docs/for-ai/guides/oauth-consent-and-callback.md) and [token lifecycle](/docs/for-ai/guides/oauth-token-lifecycle.md).\n\n### DCR: public clients\n\nPOST application/json to the discovered registration_endpoint:\n\n```json\n{\"client_name\":\"My device assistant\",\"redirect_uris\":[\"https://your-client.example/oauth/callback\"],\"token_endpoint_auth_method\":\"none\",\"grant_types\":[\"authorization_code\",\"refresh_token\"],\"response_types\":[\"code\"],\"scope\":\"endpoint:read message:send\"}\n```\n\nUse a callback the client controls. Remote callbacks require HTTPS. Local clients may use exact HTTP callbacks on localhost or literal loopback IPs, such as http://127.0.0.1:8765/callback. All callbacks in a registration must be local or all must be remote; these sets cannot be mixed. No fragments or user information are permitted. Start the local callback listener before authorization. The website's client-management interface enforces this same callback-set policy.\n\nSuccess is 201 with client_id, client_id_issued_at and accepted metadata. Public clients get no client_secret. Supported DCR scopes are endpoint:read, endpoint:write, message:read, message:send, group:read, group:manage, subscription:read and subscription:write. The default is endpoint:read. Request only the task's necessary scopes and check the returned scope. Broader static-client scopes are outside this anonymous profile.\n\nThe registration fingerprint is SHA-256 of compact canonical JSON with sorted object keys and sorted redirect_uris, grant_types and response_types arrays, plus client_name and token_endpoint_auth_method. Defaults are applied before hashing. Array ordering does not create another client. A matching registration returns the original client ID, issue time, scopes and descriptive metadata. It never overwrites the existing client or expands scopes, even if scope or software_id differs in the new request. Fingerprinting is deduplication, not proof of callback ownership or vendor identity.\n\nDefault quotas are 1,000 new registrations per rolling day and 10,000 retained registrations. Reuse does not consume new-registration quota. A quota failure returns 429 with Retry-After. An operator can disable new registrations without retiring existing grants. Read the [registration operation](/docs/for-ai/operations/registerDynamicOAuthClient.md) for exact request, response and error schemas.\n\n### CIMD: allowlisted metadata clients\n\nA supported CIMD client uses its allowlisted HTTPS metadata URL as client_id instead of posting a DCR request. Port OS retrieves and validates that client metadata, including its exact callbacks and public PKCE profile. Arbitrary metadata URLs and redirects from the metadata fetch are not supported. If your metadata URL is not allowlisted, arrange onboarding or use DCR if your client supports it. Do not pretend another client's metadata URL belongs to you.\n\nClient_name, software_id, software_version and client_uri remain unverified claims. No trusted software-statement issuer is configured; software_statement is rejected. A registration called Muse or Grok does not establish a verified vendor integration or gain additional permissions. Static confidential clients retain their separately configured client authentication method.\n\nCanonical component: [Register an OAuth client with DCR or CIMD](/docs/for-ai/guides/oauth-client-registration.md).\n\n## Obtain user consent and validate the OAuth callback\n\nUse the endpoints and resource from [discovery](/docs/for-ai/guides/oauth-discovery.md) and the client ID and exact callback from [registration](/docs/for-ai/guides/oauth-client-registration.md). These steps are identical for DCR and CIMD, REST and MCP; the chosen resource is the transport-specific input.\n\n1. Start the callback handler the client controls. For a loopback callback, bind its listener locally before opening authorization.\n2. Generate a cryptographically random PKCE verifier of 43–128 permitted characters. Compute code_challenge = BASE64URL(SHA256(verifier)), without padding. Generate a separate random state and retain both in this authorization attempt.\n3. Open the discovered authorization_endpoint with the following query parameters. Percent-encode parameter values; do not append raw callback URLs or scopes into an unescaped query.\n\n```text\nclient_id=<registered ID or supported CIMD metadata URL>\nredirect_uri=<exact registered callback>\nresponse_type=code\nscope=<requested subset of the client's accepted scopes>\nresource=<chosen canonical REST or MCP resource>\nstate=<random client state>\ncode_challenge=<S256 challenge>\ncode_challenge_method=S256\n```\n\nFor REST, use the `resource = authorizationServer.issuer` value retained from discovery. Construct the URL rather than writing an alias into a template. This JavaScript fragment assumes `clientId`, `redirectUri` and `acceptedScope` come from your registration response and callback configuration:\n\n```javascript\nconst base64url = bytes => btoa(String.fromCharCode(...bytes))\n .replaceAll('+', '-').replaceAll('/', '_').replace(/=+$/, '');\nconst verifier = base64url(crypto.getRandomValues(new Uint8Array(32)));\nconst state = base64url(crypto.getRandomValues(new Uint8Array(32)));\nconst challenge = base64url(new Uint8Array(await crypto.subtle.digest(\n 'SHA-256', new TextEncoder().encode(verifier))));\nconst authorizationURL = new URL(authorizationServer.authorization_endpoint);\nauthorizationURL.search = new URLSearchParams({\n client_id: clientId, redirect_uri: redirectUri, response_type: 'code',\n scope: acceptedScope, resource, state,\n code_challenge: challenge, code_challenge_method: 'S256',\n}).toString();\n// Retain verifier, state and authorizationServer.issuer privately until callback validation.\n// Open authorizationURL.href in the user's browser; wait for their consent.\n```\n\nThe user signs in on Port OS and reviews the requested permissions. Pause for the user; an agent must not approve its own grant, request passwords or manufacture a production sign-in identity. Local functional tests substitute an existing signed fixture identity at this boundary without changing production sign-in.\n\nAfter approval, Port OS navigates to the exact callback with code, state and iss. Reject a callback whose state or issuer does not match this attempt. Treat an error callback as a denied or failed authorization, not a code. Codes and pending consent expire after ten minutes and are single-use. Do not paste codes or credentials into shared chat or logs. Continue with [code exchange and token lifecycle](/docs/for-ai/guides/oauth-token-lifecycle.md).\n\nCanonical component: [Obtain user consent and validate the OAuth callback](/docs/for-ai/guides/oauth-consent-and-callback.md).\n\n## Exchange, refresh and revoke scoped OAuth tokens\n\nComplete [callback validation](/docs/for-ai/guides/oauth-consent-and-callback.md) first. For a public DCR/CIMD client, POST application/x-www-form-urlencoded to the discovered token_endpoint with:\n\n```text\ngrant_type=authorization_code\nclient_id=<client ID used for authorization>\ncode=<validated callback code>\nredirect_uri=<the same exact callback>\ncode_verifier=<this attempt's original verifier>\nresource=<the same canonical resource used for authorization>\n```\n\nContinue with the same discovery values and verifier from the consent example. `code` below must be from a callback whose `state` and `iss` you validated; abort on any callback `error`:\n\n```javascript\nconst tokenResponse = await fetch(authorizationServer.token_endpoint, {\n method: 'POST',\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n body: new URLSearchParams({\n grant_type: 'authorization_code', client_id: clientId, code,\n redirect_uri: redirectUri, code_verifier: verifier, resource,\n }),\n});\nif (!tokenResponse.ok) throw new Error('OAuth code exchange failed');\nconst tokens = await tokenResponse.json(); // Store securely; do not print tokens.\n```\n\nSave access_token, refresh_token and returned scope in the connector's secure credential store. Public clients have no client secret. Use Authorization: Bearer <access_token> with REST requests or the MCP HTTP connection, according to that token's resource. A refresh token is never an API credential. [Scopes bound access; resource policies still apply](/docs/for-ai/guides/authorization-rules.md).\n\nRefresh with grant_type=refresh_token, client_id, refresh_token and the original resource at token_endpoint. Scope may stay the same or narrow; it cannot expand. Credentials rotate: store the newly returned refresh token atomically and stop using the previous one. A revoked or reused refresh token must not be retried in a loop. Reauthorize when the grant no longer permits the intended operation.\n\nRevoke by POSTing application/x-www-form-urlencoded token=<refresh_token>&client_id=<client_id> to revocation_endpoint. Revoked grants stop authorizing both access and refresh requests. Removing a local configuration file alone is not server-side revocation.\n\nRead [the token operation](/docs/for-ai/operations/generateToken.md), [revocation operation](/docs/for-ai/operations/revokeOAuthGrant.md), and [connection recovery](/docs/for-ai/guides/troubleshooting.md) for schemas and failures. Verify account access using [first setup](/docs/for-ai/guides/first-setup.md), then perform only the customer's intended task. Dispatch acceptance is distinct from observed device state.\n\nCanonical component: [Exchange, refresh and revoke scoped OAuth tokens](/docs/for-ai/guides/oauth-token-lifecycle.md).\n\n## Scopes and authorization rules\n\nAuthentication establishes the principal and client. OAuth scopes bound the user's delegated authority; resource rules decide which selected resources and actions that principal may access. A scope is not an ownership or sharing grant.\n\nFor delegated REST grants, Port OS verifies token signature, expiry, issuer, REST audience, access-token type and active grant, then checks the operation's scope before existing service resource-policy evaluation. MCP tokens have a separate /mcp audience and cannot be reused on REST. A refresh token is never an API bearer credential.\n\n| Task | Scope |\n| --- | --- |\n| Enumerate or query endpoints/routes | endpoint:read |\n| Modify endpoints/routes | endpoint:write |\n| Send a device message | message:send |\n| Read groups and relationships | group:read |\n| Manage group membership | group:manage |\n| Read subscriptions | subscription:read |\n| Create/update/delete subscriptions | subscription:write |\n\nOther operations are outside the anonymous DCR device profile and fail closed. [Operation pages](/docs/for-ai/operations/index.md) expose exact credential alternatives and resource requirements. [Machine-readable authorization metadata](/docs/references/authorization.yaml) links the contract.\n\nThe existing resource engine converts principal, action, resource and entity data into Cedar requests. Default owner rules and applicable sharing/conditional rules are evaluated; only an Allow outcome admits access. The typed operation IDs come from Port OS's policy action catalog, not invented dotted action names. Owning an endpoint does not override a delegated token's missing scope.\n\nA token with endpoint:read can enumerate permitted lights but cannot dispatch a command. Adding message:send permits dispatch only to endpoints that the signed-in principal's rules allow. An authorized light does not imply camera access. A generic power-capable plug is not automatically a light. For a group request, evaluate the selected targets and report denied or unresolved members separately.\n\nAn invalid/expired/revoked token needs renewed authentication. A scope denial requires the user to approve the needed scope. A resource denial requires the owner to grant the appropriate resource/action access. Never fix denial by switching principal, requesting unrestricted credentials or retrying blindly. Provider authentication failures can require account relinking; they are different from Port OS policy denial. Keep inaccessible resource identities out of diagnostics.\n\nSee [troubleshooting](/docs/for-ai/guides/troubleshooting.md).\n\nCanonical component: [Scopes and authorization rules](/docs/for-ai/guides/authorization-rules.md).\n",
|
|
12
12
|
"setupPrompt": null
|
|
13
13
|
},
|
|
14
14
|
{
|
|
@@ -80,19 +80,19 @@
|
|
|
80
80
|
{
|
|
81
81
|
"id": "oauth-consent-and-callback",
|
|
82
82
|
"title": "Obtain user consent and validate the OAuth callback",
|
|
83
|
-
"content": "# Obtain user consent and validate the OAuth callback\n\nUse the endpoints and resource from [discovery](/docs/for-ai/guides/oauth-discovery.md) and the client ID and exact callback from [registration](/docs/for-ai/guides/oauth-client-registration.md). These steps are identical for DCR and CIMD, REST and MCP; the chosen resource is the transport-specific input.\n\n1. Start the callback handler the client controls. For a loopback callback, bind its listener locally before opening authorization.\n2. Generate a cryptographically random PKCE verifier of 43–128 permitted characters. Compute code_challenge = BASE64URL(SHA256(verifier)), without padding. Generate a separate random state and retain both in this authorization attempt.\n3. Open the discovered authorization_endpoint with the following query parameters. Percent-encode parameter values; do not append raw callback URLs or scopes into an unescaped query.\n\n```text\nclient_id=<registered ID or supported CIMD metadata URL>\nredirect_uri=<exact registered callback>\nresponse_type=code\nscope=<requested subset of the client's accepted scopes>\nresource=<chosen canonical REST or MCP resource>\nstate=<random client state>\ncode_challenge=<S256 challenge>\ncode_challenge_method=S256\n```\n\nThe user signs in on Port OS and reviews the requested permissions. Pause for the user; an agent must not approve its own grant, request passwords or manufacture a production sign-in identity. Local functional tests substitute an existing signed fixture identity at this boundary without changing production sign-in.\n\nAfter approval, Port OS navigates to the exact callback with code, state and iss. Reject a callback whose state or issuer does not match this attempt. Treat an error callback as a denied or failed authorization, not a code. Codes and pending consent expire after ten minutes and are single-use. Do not paste codes or credentials into shared chat or logs. Continue with [code exchange and token lifecycle](/docs/for-ai/guides/oauth-token-lifecycle.md).\n",
|
|
83
|
+
"content": "# Obtain user consent and validate the OAuth callback\n\nUse the endpoints and resource from [discovery](/docs/for-ai/guides/oauth-discovery.md) and the client ID and exact callback from [registration](/docs/for-ai/guides/oauth-client-registration.md). These steps are identical for DCR and CIMD, REST and MCP; the chosen resource is the transport-specific input.\n\n1. Start the callback handler the client controls. For a loopback callback, bind its listener locally before opening authorization.\n2. Generate a cryptographically random PKCE verifier of 43–128 permitted characters. Compute code_challenge = BASE64URL(SHA256(verifier)), without padding. Generate a separate random state and retain both in this authorization attempt.\n3. Open the discovered authorization_endpoint with the following query parameters. Percent-encode parameter values; do not append raw callback URLs or scopes into an unescaped query.\n\n```text\nclient_id=<registered ID or supported CIMD metadata URL>\nredirect_uri=<exact registered callback>\nresponse_type=code\nscope=<requested subset of the client's accepted scopes>\nresource=<chosen canonical REST or MCP resource>\nstate=<random client state>\ncode_challenge=<S256 challenge>\ncode_challenge_method=S256\n```\n\nFor REST, use the `resource = authorizationServer.issuer` value retained from discovery. Construct the URL rather than writing an alias into a template. This JavaScript fragment assumes `clientId`, `redirectUri` and `acceptedScope` come from your registration response and callback configuration:\n\n```javascript\nconst base64url = bytes => btoa(String.fromCharCode(...bytes))\n .replaceAll('+', '-').replaceAll('/', '_').replace(/=+$/, '');\nconst verifier = base64url(crypto.getRandomValues(new Uint8Array(32)));\nconst state = base64url(crypto.getRandomValues(new Uint8Array(32)));\nconst challenge = base64url(new Uint8Array(await crypto.subtle.digest(\n 'SHA-256', new TextEncoder().encode(verifier))));\nconst authorizationURL = new URL(authorizationServer.authorization_endpoint);\nauthorizationURL.search = new URLSearchParams({\n client_id: clientId, redirect_uri: redirectUri, response_type: 'code',\n scope: acceptedScope, resource, state,\n code_challenge: challenge, code_challenge_method: 'S256',\n}).toString();\n// Retain verifier, state and authorizationServer.issuer privately until callback validation.\n// Open authorizationURL.href in the user's browser; wait for their consent.\n```\n\nThe user signs in on Port OS and reviews the requested permissions. Pause for the user; an agent must not approve its own grant, request passwords or manufacture a production sign-in identity. Local functional tests substitute an existing signed fixture identity at this boundary without changing production sign-in.\n\nAfter approval, Port OS navigates to the exact callback with code, state and iss. Reject a callback whose state or issuer does not match this attempt. Treat an error callback as a denied or failed authorization, not a code. Codes and pending consent expire after ten minutes and are single-use. Do not paste codes or credentials into shared chat or logs. Continue with [code exchange and token lifecycle](/docs/for-ai/guides/oauth-token-lifecycle.md).\n",
|
|
84
84
|
"setupPrompt": null
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
"id": "oauth-discovery",
|
|
88
88
|
"title": "Discover the OAuth server and choose REST or MCP",
|
|
89
|
-
"content": "# Discover the OAuth server and choose REST or MCP\n\nThis discovery step is shared by every client. The deployed pilot API is https://api.portoperatingsystem.lol. Fetch its /.well-known/oauth-authorization-server document anonymously. Read issuer, authorization_endpoint, token_endpoint, registration_endpoint, revocation_endpoint and scopes_supported. Use the returned endpoints exactly. An alias can advertise a different canonical Cloud Run issuer; do not substitute the alias into token audiences.\n\n| Interface | API destination | OAuth resource |\n| --- | --- | --- |\n| REST | The returned issuer, plus the documented operation path | The exact returned issuer |\n| MCP | The returned issuer plus /mcp, Streamable HTTP | The resource returned by /.well-known/oauth-protected-resource/mcp, normally issuer plus /mcp |\n\nAn MCP connector can start at https://api.portoperatingsystem.lol/mcp and follow its WWW-Authenticate resource_metadata URL. Fetch that public metadata and the authorization server it names. MCP initialization alone does not prove that the account's devices are accessible. Never use a REST token on MCP or an MCP token on REST.\n\nChoose one supported [client registration method](/docs/for-ai/guides/oauth-client-registration.md), then follow the same [consent and callback steps](/docs/for-ai/guides/oauth-consent-and-callback.md). If metadata omits registration_endpoint, new DCR registration is unavailable; do not guess a replacement endpoint or silently switch to another client's credentials.\n\nSee [scopes and resource rules](/docs/for-ai/guides/authorization-rules.md). Authorization-server scopes_supported describes server vocabulary; a particular client's accepted scopes can be narrower.\n",
|
|
89
|
+
"content": "# Discover the OAuth server and choose REST or MCP\n\nThis discovery step is shared by every client. The deployed pilot API is https://api.portoperatingsystem.lol. Fetch its /.well-known/oauth-authorization-server document anonymously. Read issuer, authorization_endpoint, token_endpoint, registration_endpoint, revocation_endpoint and scopes_supported. Use the returned endpoints exactly. An alias can advertise a different canonical Cloud Run issuer; do not substitute the alias into token audiences.\n\n| Interface | API destination | OAuth resource |\n| --- | --- | --- |\n| REST | The returned issuer, plus the documented operation path | The exact returned issuer |\n| MCP | The returned issuer plus /mcp, Streamable HTTP | The resource returned by /.well-known/oauth-protected-resource/mcp, normally issuer plus /mcp |\n\nAn MCP connector can start at https://api.portoperatingsystem.lol/mcp and follow its WWW-Authenticate resource_metadata URL. Fetch that public metadata and the authorization server it names. MCP initialization alone does not prove that the account's devices are accessible. Never use a REST token on MCP or an MCP token on REST.\n\nChoose one supported [client registration method](/docs/for-ai/guides/oauth-client-registration.md), then follow the same [consent and callback steps](/docs/for-ai/guides/oauth-consent-and-callback.md). If metadata omits registration_endpoint, new DCR registration is unavailable; do not guess a replacement endpoint or silently switch to another client's credentials.\n\nSee [scopes and resource rules](/docs/for-ai/guides/authorization-rules.md). Authorization-server scopes_supported describes server vocabulary; a particular client's accepted scopes can be narrower.\n\n## Carry discovery values into every request\n\nThis JavaScript fragment initializes a REST connection. Keep `authorizationServer` and `resource` for the consent and token examples; the API alias is only the discovery starting point.\n\n```javascript\nconst response = await fetch('https://api.portoperatingsystem.lol/.well-known/oauth-authorization-server');\nif (!response.ok) throw new Error('OAuth discovery failed');\nconst authorizationServer = await response.json();\nconst resource = authorizationServer.issuer;\nconst apiBase = authorizationServer.issuer;\n```\n\nFor MCP, assign `resource` from the protected-resource metadata's `resource` field instead. Do not replace either value with the hostname you started from. A wrong `resource` can produce an `invalid_request` error callback even when client registration succeeded.\n",
|
|
90
90
|
"setupPrompt": null
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
"id": "oauth-token-lifecycle",
|
|
94
94
|
"title": "Exchange, refresh and revoke scoped OAuth tokens",
|
|
95
|
-
"content": "# Exchange, refresh and revoke scoped OAuth tokens\n\nComplete [callback validation](/docs/for-ai/guides/oauth-consent-and-callback.md) first. For a public DCR/CIMD client, POST application/x-www-form-urlencoded to the discovered token_endpoint with:\n\n```text\ngrant_type=authorization_code\nclient_id=<client ID used for authorization>\ncode=<validated callback code>\nredirect_uri=<the same exact callback>\ncode_verifier=<this attempt's original verifier>\nresource=<the same canonical resource used for authorization>\n```\n\nSave access_token, refresh_token and returned scope in the connector's secure credential store. Public clients have no client secret. Use Authorization: Bearer <access_token> with REST requests or the MCP HTTP connection, according to that token's resource. A refresh token is never an API credential. [Scopes bound access; resource policies still apply](/docs/for-ai/guides/authorization-rules.md).\n\nRefresh with grant_type=refresh_token, client_id, refresh_token and the original resource at token_endpoint. Scope may stay the same or narrow; it cannot expand. Credentials rotate: store the newly returned refresh token atomically and stop using the previous one. A revoked or reused refresh token must not be retried in a loop. Reauthorize when the grant no longer permits the intended operation.\n\nRevoke by POSTing application/x-www-form-urlencoded token=<refresh_token>&client_id=<client_id> to revocation_endpoint. Revoked grants stop authorizing both access and refresh requests. Removing a local configuration file alone is not server-side revocation.\n\nRead [the token operation](/docs/for-ai/operations/generateToken.md), [revocation operation](/docs/for-ai/operations/revokeOAuthGrant.md), and [connection recovery](/docs/for-ai/guides/troubleshooting.md) for schemas and failures. Verify account access using [first setup](/docs/for-ai/guides/first-setup.md), then perform only the customer's intended task. Dispatch acceptance is distinct from observed device state.\n",
|
|
95
|
+
"content": "# Exchange, refresh and revoke scoped OAuth tokens\n\nComplete [callback validation](/docs/for-ai/guides/oauth-consent-and-callback.md) first. For a public DCR/CIMD client, POST application/x-www-form-urlencoded to the discovered token_endpoint with:\n\n```text\ngrant_type=authorization_code\nclient_id=<client ID used for authorization>\ncode=<validated callback code>\nredirect_uri=<the same exact callback>\ncode_verifier=<this attempt's original verifier>\nresource=<the same canonical resource used for authorization>\n```\n\nContinue with the same discovery values and verifier from the consent example. `code` below must be from a callback whose `state` and `iss` you validated; abort on any callback `error`:\n\n```javascript\nconst tokenResponse = await fetch(authorizationServer.token_endpoint, {\n method: 'POST',\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n body: new URLSearchParams({\n grant_type: 'authorization_code', client_id: clientId, code,\n redirect_uri: redirectUri, code_verifier: verifier, resource,\n }),\n});\nif (!tokenResponse.ok) throw new Error('OAuth code exchange failed');\nconst tokens = await tokenResponse.json(); // Store securely; do not print tokens.\n```\n\nSave access_token, refresh_token and returned scope in the connector's secure credential store. Public clients have no client secret. Use Authorization: Bearer <access_token> with REST requests or the MCP HTTP connection, according to that token's resource. A refresh token is never an API credential. [Scopes bound access; resource policies still apply](/docs/for-ai/guides/authorization-rules.md).\n\nRefresh with grant_type=refresh_token, client_id, refresh_token and the original resource at token_endpoint. Scope may stay the same or narrow; it cannot expand. Credentials rotate: store the newly returned refresh token atomically and stop using the previous one. A revoked or reused refresh token must not be retried in a loop. Reauthorize when the grant no longer permits the intended operation.\n\nRevoke by POSTing application/x-www-form-urlencoded token=<refresh_token>&client_id=<client_id> to revocation_endpoint. Revoked grants stop authorizing both access and refresh requests. Removing a local configuration file alone is not server-side revocation.\n\nRead [the token operation](/docs/for-ai/operations/generateToken.md), [revocation operation](/docs/for-ai/operations/revokeOAuthGrant.md), and [connection recovery](/docs/for-ai/guides/troubleshooting.md) for schemas and failures. Verify account access using [first setup](/docs/for-ai/guides/first-setup.md), then perform only the customer's intended task. Dispatch acceptance is distinct from observed device state.\n",
|
|
96
96
|
"setupPrompt": null
|
|
97
97
|
},
|
|
98
98
|
{
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
{
|
|
105
105
|
"id": "quickstart",
|
|
106
106
|
"title": "Verify the connection and control one light",
|
|
107
|
-
"content": "# Verify the connection and control one light\n\nFirst complete [OAuth setup](/docs/for-ai/guides/authentication-and-dcr.md). Keep the discovered API issuer and credentials in client configuration.\n\n1. GET /endpoints?owner=~caller&maxResults=25 with Authorization: Bearer <access_token>. Read [enumerateEndpoints](/docs/for-ai/operations/enumerateEndpoints.md) for the exact pagination and response fields. A filter such as owner is required. Follow the returned continuation metadata until the authorized enumeration is complete. An empty list means valid access with no visible devices; guide the user to [add devices](/docs/for-ai/guides/adding-devices.md).\n2. Select one light by full endpoint ID and group/room context. If the target is ambiguous, ask the user before acting.\n3. Inspect its declared capability namespace and version. A light declaring power 1.0 uses the [power guide](/docs/for-ai/capability-interfaces/power/1.0.md) and [turn-on payload schema](/docs/references/capability-interfaces/power/1.0/messages/turn-on.yaml). For other versions or capabilities, follow [the capability directory](/docs/for-ai/capability-interfaces.md).\n4. With the user's intended action, POST /messages. Read [sendMessage](/docs/for-ai/operations/sendMessage.md) and its linked request schema. Use the endpoint ID and message version you discovered, not the illustrative ID below.\n\n```json\n{\"target\":{\"type\":\"ENDPOINT\",\"id\":\"port1/principals/example/endpoints/example-light\"},\"message\":{\"header\":{\"namespace\":\"port1/systems/zero/capability-interfaces/power\",\"name\":\"turn-on\",\"version\":\"1.0\"},\"body\":{}}}\n```\n\
|
|
107
|
+
"content": "# Verify the connection and control one light\n\nFirst complete [OAuth setup](/docs/for-ai/guides/authentication-and-dcr.md). Keep the discovered API issuer and credentials in client configuration.\n\n1. GET /endpoints?owner=~caller&maxResults=25 with Authorization: Bearer <access_token>. Read [enumerateEndpoints](/docs/for-ai/operations/enumerateEndpoints.md) for the exact pagination and response fields. A filter such as owner is required. Follow the returned continuation metadata until the authorized enumeration is complete. An empty list means valid access with no visible devices; guide the user to [add devices](/docs/for-ai/guides/adding-devices.md).\n2. Select one light by full endpoint ID and group/room context. If the target is ambiguous, ask the user before acting.\n3. Inspect its declared capability namespace and version. A light declaring power 1.0 uses the [power guide](/docs/for-ai/capability-interfaces/power/1.0.md) and [turn-on payload schema](/docs/references/capability-interfaces/power/1.0/messages/turn-on.yaml). For other versions or capabilities, follow [the capability directory](/docs/for-ai/capability-interfaces.md).\n4. With the user's intended action, POST /messages with Authorization: Bearer <access_token> and Content-Type: application/json. Send the request object below as the JSON body, without a surrounding `body` field or a JSON string. Read [sendMessage](/docs/for-ai/operations/sendMessage.md) and its linked request schema. Use the endpoint ID and message version you discovered, not the illustrative ID below.\n\n```json\n{\"target\":{\"type\":\"ENDPOINT\",\"id\":\"port1/principals/example/endpoints/example-light\"},\"message\":{\"header\":{\"namespace\":\"port1/systems/zero/capability-interfaces/power\",\"name\":\"turn-on\",\"version\":\"1.0\"},\"body\":{}}}\n```\n\nHTTP 200 acknowledges acceptance. An asynchronous request can return `{\"messageId\":\"\"}` without a `message`; the empty ID is valid and does not provide a durable receipt or retry deduplication. When a unary response message is present, `messageId` identifies that response. Neither response proves physical state. After a lost response, treat the outcome as unknown and inspect state before deciding whether another action is safe.\n\nDo not cut JSON with head -c. GET /endpoints?id=<URL-encoded-endpoint-id>&expand=interfaces.attributes&forceDeviceAttributeQuery=true to request permitted device-backed state. Inspect attributes and partial errors. Check sampledAt against the command time and the capability version. sampledAt is the source-reported time, not the fetch time; an absent timestamp means freshness is unknown. Use [enumerateEndpoints and its linked components](/docs/for-ai/operations/enumerateEndpoints.md) for exact response shapes. Report returned device state separately from dispatch acceptance. Stale/unavailable state means unknown, and user confirmation may be necessary for a physical device.\n\nFor first setup, test one explicitly selected safe light. Do not turn off all homes as a connectivity check. See [lighting](/docs/for-ai/guides/lighting.md), [first setup](/docs/for-ai/guides/first-setup.md) and [authorization rules](/docs/for-ai/guides/authorization-rules.md).\n",
|
|
108
108
|
"setupPrompt": null
|
|
109
109
|
},
|
|
110
110
|
{
|
package/generated/openapi.json
CHANGED
|
@@ -9826,14 +9826,14 @@
|
|
|
9826
9826
|
},
|
|
9827
9827
|
"responses": {
|
|
9828
9828
|
"200": {
|
|
9829
|
-
"description": "
|
|
9829
|
+
"description": "Request accepted; an asynchronous acknowledgment may have an empty messageId and no message. Verify device state separately.",
|
|
9830
9830
|
"content": {
|
|
9831
9831
|
"application/json": {
|
|
9832
9832
|
"schema": {
|
|
9833
9833
|
"$ref": "#/components/schemas/CreateMessageResponse"
|
|
9834
9834
|
},
|
|
9835
9835
|
"example": {
|
|
9836
|
-
"messageId": "
|
|
9836
|
+
"messageId": ""
|
|
9837
9837
|
}
|
|
9838
9838
|
}
|
|
9839
9839
|
}
|
|
@@ -10106,14 +10106,14 @@
|
|
|
10106
10106
|
},
|
|
10107
10107
|
"responses": {
|
|
10108
10108
|
"200": {
|
|
10109
|
-
"description": "
|
|
10109
|
+
"description": "Request accepted; an asynchronous acknowledgment may have an empty messageId and no message. Verify device state separately.",
|
|
10110
10110
|
"content": {
|
|
10111
10111
|
"application/json": {
|
|
10112
10112
|
"schema": {
|
|
10113
10113
|
"$ref": "#/components/schemas/CreateMessageResponse"
|
|
10114
10114
|
},
|
|
10115
10115
|
"example": {
|
|
10116
|
-
"messageId": "
|
|
10116
|
+
"messageId": ""
|
|
10117
10117
|
}
|
|
10118
10118
|
}
|
|
10119
10119
|
}
|
|
@@ -26762,7 +26762,7 @@
|
|
|
26762
26762
|
"properties": {
|
|
26763
26763
|
"messageId": {
|
|
26764
26764
|
"type": "string",
|
|
26765
|
-
"description": "
|
|
26765
|
+
"description": "Identifies the unary response message when one is returned. An accepted asynchronous request can return an empty string with no message. This field does not provide a durable dispatch receipt, retry deduplication or proof of observed device state."
|
|
26766
26766
|
},
|
|
26767
26767
|
"message": {
|
|
26768
26768
|
"$ref": "#/components/schemas/Message",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
All supported agents use the same OAuth components. REST and MCP select different protected resources; DCR and CIMD select different registration methods. Neither product branding nor registration grants device access.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The complete walkthrough below is generated from the canonical components linked here. Read it in one document, or reference the individual components from your connector:
|
|
6
6
|
|
|
7
7
|
1. [Discover endpoints and choose REST or MCP](/docs/for-ai/guides/oauth-discovery.md).
|
|
8
8
|
2. [Register with DCR or supported CIMD](/docs/for-ai/guides/oauth-client-registration.md). Remote callbacks require HTTPS; local callback registrations contain only localhost/loopback callbacks. Repeated canonical fingerprints reuse the original public client without expanding scopes.
|
|
@@ -11,3 +11,172 @@ Start with [Connect any supported agent](/docs/for-ai/guides/connect-agent.md),
|
|
|
11
11
|
5. [Verify the connection](/docs/for-ai/guides/first-setup.md), then use [the REST quickstart](/docs/for-ai/guides/quickstart.md) or your client's MCP tools.
|
|
12
12
|
|
|
13
13
|
Read [authorization rules](/docs/for-ai/guides/authorization-rules.md) for scopes, principal/resource policies, sharing and denial diagnosis. Never ask for a Google password, paste credentials into chat, or approve the agent's own grant. Claimed client names such as Muse and Grok remain unverified.
|
|
14
|
+
|
|
15
|
+
## Discover the OAuth server and choose REST or MCP
|
|
16
|
+
|
|
17
|
+
This discovery step is shared by every client. The deployed pilot API is https://api.portoperatingsystem.lol. Fetch its /.well-known/oauth-authorization-server document anonymously. Read issuer, authorization_endpoint, token_endpoint, registration_endpoint, revocation_endpoint and scopes_supported. Use the returned endpoints exactly. An alias can advertise a different canonical Cloud Run issuer; do not substitute the alias into token audiences.
|
|
18
|
+
|
|
19
|
+
| Interface | API destination | OAuth resource |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| REST | The returned issuer, plus the documented operation path | The exact returned issuer |
|
|
22
|
+
| MCP | The returned issuer plus /mcp, Streamable HTTP | The resource returned by /.well-known/oauth-protected-resource/mcp, normally issuer plus /mcp |
|
|
23
|
+
|
|
24
|
+
An MCP connector can start at https://api.portoperatingsystem.lol/mcp and follow its WWW-Authenticate resource_metadata URL. Fetch that public metadata and the authorization server it names. MCP initialization alone does not prove that the account's devices are accessible. Never use a REST token on MCP or an MCP token on REST.
|
|
25
|
+
|
|
26
|
+
Choose one supported [client registration method](/docs/for-ai/guides/oauth-client-registration.md), then follow the same [consent and callback steps](/docs/for-ai/guides/oauth-consent-and-callback.md). If metadata omits registration_endpoint, new DCR registration is unavailable; do not guess a replacement endpoint or silently switch to another client's credentials.
|
|
27
|
+
|
|
28
|
+
See [scopes and resource rules](/docs/for-ai/guides/authorization-rules.md). Authorization-server scopes_supported describes server vocabulary; a particular client's accepted scopes can be narrower.
|
|
29
|
+
|
|
30
|
+
### Carry discovery values into every request
|
|
31
|
+
|
|
32
|
+
This JavaScript fragment initializes a REST connection. Keep `authorizationServer` and `resource` for the consent and token examples; the API alias is only the discovery starting point.
|
|
33
|
+
|
|
34
|
+
```javascript
|
|
35
|
+
const response = await fetch('https://api.portoperatingsystem.lol/.well-known/oauth-authorization-server');
|
|
36
|
+
if (!response.ok) throw new Error('OAuth discovery failed');
|
|
37
|
+
const authorizationServer = await response.json();
|
|
38
|
+
const resource = authorizationServer.issuer;
|
|
39
|
+
const apiBase = authorizationServer.issuer;
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
For MCP, assign `resource` from the protected-resource metadata's `resource` field instead. Do not replace either value with the hostname you started from. A wrong `resource` can produce an `invalid_request` error callback even when client registration succeeded.
|
|
43
|
+
|
|
44
|
+
Canonical component: [Discover the OAuth server and choose REST or MCP](/docs/for-ai/guides/oauth-discovery.md).
|
|
45
|
+
|
|
46
|
+
## Register an OAuth client with DCR or CIMD
|
|
47
|
+
|
|
48
|
+
Start with [discovery](/docs/for-ai/guides/oauth-discovery.md). DCR and CIMD identify a client; they do not sign in a user or grant device access. Both use the same [PKCE consent and callback flow](/docs/for-ai/guides/oauth-consent-and-callback.md) and [token lifecycle](/docs/for-ai/guides/oauth-token-lifecycle.md).
|
|
49
|
+
|
|
50
|
+
### DCR: public clients
|
|
51
|
+
|
|
52
|
+
POST application/json to the discovered registration_endpoint:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{"client_name":"My device assistant","redirect_uris":["https://your-client.example/oauth/callback"],"token_endpoint_auth_method":"none","grant_types":["authorization_code","refresh_token"],"response_types":["code"],"scope":"endpoint:read message:send"}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Use a callback the client controls. Remote callbacks require HTTPS. Local clients may use exact HTTP callbacks on localhost or literal loopback IPs, such as http://127.0.0.1:8765/callback. All callbacks in a registration must be local or all must be remote; these sets cannot be mixed. No fragments or user information are permitted. Start the local callback listener before authorization. The website's client-management interface enforces this same callback-set policy.
|
|
59
|
+
|
|
60
|
+
Success is 201 with client_id, client_id_issued_at and accepted metadata. Public clients get no client_secret. Supported DCR scopes are endpoint:read, endpoint:write, message:read, message:send, group:read, group:manage, subscription:read and subscription:write. The default is endpoint:read. Request only the task's necessary scopes and check the returned scope. Broader static-client scopes are outside this anonymous profile.
|
|
61
|
+
|
|
62
|
+
The registration fingerprint is SHA-256 of compact canonical JSON with sorted object keys and sorted redirect_uris, grant_types and response_types arrays, plus client_name and token_endpoint_auth_method. Defaults are applied before hashing. Array ordering does not create another client. A matching registration returns the original client ID, issue time, scopes and descriptive metadata. It never overwrites the existing client or expands scopes, even if scope or software_id differs in the new request. Fingerprinting is deduplication, not proof of callback ownership or vendor identity.
|
|
63
|
+
|
|
64
|
+
Default quotas are 1,000 new registrations per rolling day and 10,000 retained registrations. Reuse does not consume new-registration quota. A quota failure returns 429 with Retry-After. An operator can disable new registrations without retiring existing grants. Read the [registration operation](/docs/for-ai/operations/registerDynamicOAuthClient.md) for exact request, response and error schemas.
|
|
65
|
+
|
|
66
|
+
### CIMD: allowlisted metadata clients
|
|
67
|
+
|
|
68
|
+
A supported CIMD client uses its allowlisted HTTPS metadata URL as client_id instead of posting a DCR request. Port OS retrieves and validates that client metadata, including its exact callbacks and public PKCE profile. Arbitrary metadata URLs and redirects from the metadata fetch are not supported. If your metadata URL is not allowlisted, arrange onboarding or use DCR if your client supports it. Do not pretend another client's metadata URL belongs to you.
|
|
69
|
+
|
|
70
|
+
Client_name, software_id, software_version and client_uri remain unverified claims. No trusted software-statement issuer is configured; software_statement is rejected. A registration called Muse or Grok does not establish a verified vendor integration or gain additional permissions. Static confidential clients retain their separately configured client authentication method.
|
|
71
|
+
|
|
72
|
+
Canonical component: [Register an OAuth client with DCR or CIMD](/docs/for-ai/guides/oauth-client-registration.md).
|
|
73
|
+
|
|
74
|
+
## Obtain user consent and validate the OAuth callback
|
|
75
|
+
|
|
76
|
+
Use the endpoints and resource from [discovery](/docs/for-ai/guides/oauth-discovery.md) and the client ID and exact callback from [registration](/docs/for-ai/guides/oauth-client-registration.md). These steps are identical for DCR and CIMD, REST and MCP; the chosen resource is the transport-specific input.
|
|
77
|
+
|
|
78
|
+
1. Start the callback handler the client controls. For a loopback callback, bind its listener locally before opening authorization.
|
|
79
|
+
2. Generate a cryptographically random PKCE verifier of 43–128 permitted characters. Compute code_challenge = BASE64URL(SHA256(verifier)), without padding. Generate a separate random state and retain both in this authorization attempt.
|
|
80
|
+
3. Open the discovered authorization_endpoint with the following query parameters. Percent-encode parameter values; do not append raw callback URLs or scopes into an unescaped query.
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
client_id=<registered ID or supported CIMD metadata URL>
|
|
84
|
+
redirect_uri=<exact registered callback>
|
|
85
|
+
response_type=code
|
|
86
|
+
scope=<requested subset of the client's accepted scopes>
|
|
87
|
+
resource=<chosen canonical REST or MCP resource>
|
|
88
|
+
state=<random client state>
|
|
89
|
+
code_challenge=<S256 challenge>
|
|
90
|
+
code_challenge_method=S256
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
For REST, use the `resource = authorizationServer.issuer` value retained from discovery. Construct the URL rather than writing an alias into a template. This JavaScript fragment assumes `clientId`, `redirectUri` and `acceptedScope` come from your registration response and callback configuration:
|
|
94
|
+
|
|
95
|
+
```javascript
|
|
96
|
+
const base64url = bytes => btoa(String.fromCharCode(...bytes))
|
|
97
|
+
.replaceAll('+', '-').replaceAll('/', '_').replace(/=+$/, '');
|
|
98
|
+
const verifier = base64url(crypto.getRandomValues(new Uint8Array(32)));
|
|
99
|
+
const state = base64url(crypto.getRandomValues(new Uint8Array(32)));
|
|
100
|
+
const challenge = base64url(new Uint8Array(await crypto.subtle.digest(
|
|
101
|
+
'SHA-256', new TextEncoder().encode(verifier))));
|
|
102
|
+
const authorizationURL = new URL(authorizationServer.authorization_endpoint);
|
|
103
|
+
authorizationURL.search = new URLSearchParams({
|
|
104
|
+
client_id: clientId, redirect_uri: redirectUri, response_type: 'code',
|
|
105
|
+
scope: acceptedScope, resource, state,
|
|
106
|
+
code_challenge: challenge, code_challenge_method: 'S256',
|
|
107
|
+
}).toString();
|
|
108
|
+
// Retain verifier, state and authorizationServer.issuer privately until callback validation.
|
|
109
|
+
// Open authorizationURL.href in the user's browser; wait for their consent.
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The user signs in on Port OS and reviews the requested permissions. Pause for the user; an agent must not approve its own grant, request passwords or manufacture a production sign-in identity. Local functional tests substitute an existing signed fixture identity at this boundary without changing production sign-in.
|
|
113
|
+
|
|
114
|
+
After approval, Port OS navigates to the exact callback with code, state and iss. Reject a callback whose state or issuer does not match this attempt. Treat an error callback as a denied or failed authorization, not a code. Codes and pending consent expire after ten minutes and are single-use. Do not paste codes or credentials into shared chat or logs. Continue with [code exchange and token lifecycle](/docs/for-ai/guides/oauth-token-lifecycle.md).
|
|
115
|
+
|
|
116
|
+
Canonical component: [Obtain user consent and validate the OAuth callback](/docs/for-ai/guides/oauth-consent-and-callback.md).
|
|
117
|
+
|
|
118
|
+
## Exchange, refresh and revoke scoped OAuth tokens
|
|
119
|
+
|
|
120
|
+
Complete [callback validation](/docs/for-ai/guides/oauth-consent-and-callback.md) first. For a public DCR/CIMD client, POST application/x-www-form-urlencoded to the discovered token_endpoint with:
|
|
121
|
+
|
|
122
|
+
```text
|
|
123
|
+
grant_type=authorization_code
|
|
124
|
+
client_id=<client ID used for authorization>
|
|
125
|
+
code=<validated callback code>
|
|
126
|
+
redirect_uri=<the same exact callback>
|
|
127
|
+
code_verifier=<this attempt's original verifier>
|
|
128
|
+
resource=<the same canonical resource used for authorization>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Continue with the same discovery values and verifier from the consent example. `code` below must be from a callback whose `state` and `iss` you validated; abort on any callback `error`:
|
|
132
|
+
|
|
133
|
+
```javascript
|
|
134
|
+
const tokenResponse = await fetch(authorizationServer.token_endpoint, {
|
|
135
|
+
method: 'POST',
|
|
136
|
+
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
137
|
+
body: new URLSearchParams({
|
|
138
|
+
grant_type: 'authorization_code', client_id: clientId, code,
|
|
139
|
+
redirect_uri: redirectUri, code_verifier: verifier, resource,
|
|
140
|
+
}),
|
|
141
|
+
});
|
|
142
|
+
if (!tokenResponse.ok) throw new Error('OAuth code exchange failed');
|
|
143
|
+
const tokens = await tokenResponse.json(); // Store securely; do not print tokens.
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Save access_token, refresh_token and returned scope in the connector's secure credential store. Public clients have no client secret. Use Authorization: Bearer <access_token> with REST requests or the MCP HTTP connection, according to that token's resource. A refresh token is never an API credential. [Scopes bound access; resource policies still apply](/docs/for-ai/guides/authorization-rules.md).
|
|
147
|
+
|
|
148
|
+
Refresh with grant_type=refresh_token, client_id, refresh_token and the original resource at token_endpoint. Scope may stay the same or narrow; it cannot expand. Credentials rotate: store the newly returned refresh token atomically and stop using the previous one. A revoked or reused refresh token must not be retried in a loop. Reauthorize when the grant no longer permits the intended operation.
|
|
149
|
+
|
|
150
|
+
Revoke by POSTing application/x-www-form-urlencoded token=<refresh_token>&client_id=<client_id> to revocation_endpoint. Revoked grants stop authorizing both access and refresh requests. Removing a local configuration file alone is not server-side revocation.
|
|
151
|
+
|
|
152
|
+
Read [the token operation](/docs/for-ai/operations/generateToken.md), [revocation operation](/docs/for-ai/operations/revokeOAuthGrant.md), and [connection recovery](/docs/for-ai/guides/troubleshooting.md) for schemas and failures. Verify account access using [first setup](/docs/for-ai/guides/first-setup.md), then perform only the customer's intended task. Dispatch acceptance is distinct from observed device state.
|
|
153
|
+
|
|
154
|
+
Canonical component: [Exchange, refresh and revoke scoped OAuth tokens](/docs/for-ai/guides/oauth-token-lifecycle.md).
|
|
155
|
+
|
|
156
|
+
## Scopes and authorization rules
|
|
157
|
+
|
|
158
|
+
Authentication establishes the principal and client. OAuth scopes bound the user's delegated authority; resource rules decide which selected resources and actions that principal may access. A scope is not an ownership or sharing grant.
|
|
159
|
+
|
|
160
|
+
For delegated REST grants, Port OS verifies token signature, expiry, issuer, REST audience, access-token type and active grant, then checks the operation's scope before existing service resource-policy evaluation. MCP tokens have a separate /mcp audience and cannot be reused on REST. A refresh token is never an API bearer credential.
|
|
161
|
+
|
|
162
|
+
| Task | Scope |
|
|
163
|
+
| --- | --- |
|
|
164
|
+
| Enumerate or query endpoints/routes | endpoint:read |
|
|
165
|
+
| Modify endpoints/routes | endpoint:write |
|
|
166
|
+
| Send a device message | message:send |
|
|
167
|
+
| Read groups and relationships | group:read |
|
|
168
|
+
| Manage group membership | group:manage |
|
|
169
|
+
| Read subscriptions | subscription:read |
|
|
170
|
+
| Create/update/delete subscriptions | subscription:write |
|
|
171
|
+
|
|
172
|
+
Other operations are outside the anonymous DCR device profile and fail closed. [Operation pages](/docs/for-ai/operations/index.md) expose exact credential alternatives and resource requirements. [Machine-readable authorization metadata](/docs/references/authorization.yaml) links the contract.
|
|
173
|
+
|
|
174
|
+
The existing resource engine converts principal, action, resource and entity data into Cedar requests. Default owner rules and applicable sharing/conditional rules are evaluated; only an Allow outcome admits access. The typed operation IDs come from Port OS's policy action catalog, not invented dotted action names. Owning an endpoint does not override a delegated token's missing scope.
|
|
175
|
+
|
|
176
|
+
A token with endpoint:read can enumerate permitted lights but cannot dispatch a command. Adding message:send permits dispatch only to endpoints that the signed-in principal's rules allow. An authorized light does not imply camera access. A generic power-capable plug is not automatically a light. For a group request, evaluate the selected targets and report denied or unresolved members separately.
|
|
177
|
+
|
|
178
|
+
An invalid/expired/revoked token needs renewed authentication. A scope denial requires the user to approve the needed scope. A resource denial requires the owner to grant the appropriate resource/action access. Never fix denial by switching principal, requesting unrestricted credentials or retrying blindly. Provider authentication failures can require account relinking; they are different from Port OS policy denial. Keep inaccessible resource identities out of diagnostics.
|
|
179
|
+
|
|
180
|
+
See [troubleshooting](/docs/for-ai/guides/troubleshooting.md).
|
|
181
|
+
|
|
182
|
+
Canonical component: [Scopes and authorization rules](/docs/for-ai/guides/authorization-rules.md).
|
|
@@ -17,6 +17,25 @@ code_challenge=<S256 challenge>
|
|
|
17
17
|
code_challenge_method=S256
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
For REST, use the `resource = authorizationServer.issuer` value retained from discovery. Construct the URL rather than writing an alias into a template. This JavaScript fragment assumes `clientId`, `redirectUri` and `acceptedScope` come from your registration response and callback configuration:
|
|
21
|
+
|
|
22
|
+
```javascript
|
|
23
|
+
const base64url = bytes => btoa(String.fromCharCode(...bytes))
|
|
24
|
+
.replaceAll('+', '-').replaceAll('/', '_').replace(/=+$/, '');
|
|
25
|
+
const verifier = base64url(crypto.getRandomValues(new Uint8Array(32)));
|
|
26
|
+
const state = base64url(crypto.getRandomValues(new Uint8Array(32)));
|
|
27
|
+
const challenge = base64url(new Uint8Array(await crypto.subtle.digest(
|
|
28
|
+
'SHA-256', new TextEncoder().encode(verifier))));
|
|
29
|
+
const authorizationURL = new URL(authorizationServer.authorization_endpoint);
|
|
30
|
+
authorizationURL.search = new URLSearchParams({
|
|
31
|
+
client_id: clientId, redirect_uri: redirectUri, response_type: 'code',
|
|
32
|
+
scope: acceptedScope, resource, state,
|
|
33
|
+
code_challenge: challenge, code_challenge_method: 'S256',
|
|
34
|
+
}).toString();
|
|
35
|
+
// Retain verifier, state and authorizationServer.issuer privately until callback validation.
|
|
36
|
+
// Open authorizationURL.href in the user's browser; wait for their consent.
|
|
37
|
+
```
|
|
38
|
+
|
|
20
39
|
The user signs in on Port OS and reviews the requested permissions. Pause for the user; an agent must not approve its own grant, request passwords or manufacture a production sign-in identity. Local functional tests substitute an existing signed fixture identity at this boundary without changing production sign-in.
|
|
21
40
|
|
|
22
41
|
After approval, Port OS navigates to the exact callback with code, state and iss. Reject a callback whose state or issuer does not match this attempt. Treat an error callback as a denied or failed authorization, not a code. Codes and pending consent expire after ten minutes and are single-use. Do not paste codes or credentials into shared chat or logs. Continue with [code exchange and token lifecycle](/docs/for-ai/guides/oauth-token-lifecycle.md).
|
|
@@ -12,3 +12,17 @@ An MCP connector can start at https://api.portoperatingsystem.lol/mcp and follow
|
|
|
12
12
|
Choose one supported [client registration method](/docs/for-ai/guides/oauth-client-registration.md), then follow the same [consent and callback steps](/docs/for-ai/guides/oauth-consent-and-callback.md). If metadata omits registration_endpoint, new DCR registration is unavailable; do not guess a replacement endpoint or silently switch to another client's credentials.
|
|
13
13
|
|
|
14
14
|
See [scopes and resource rules](/docs/for-ai/guides/authorization-rules.md). Authorization-server scopes_supported describes server vocabulary; a particular client's accepted scopes can be narrower.
|
|
15
|
+
|
|
16
|
+
## Carry discovery values into every request
|
|
17
|
+
|
|
18
|
+
This JavaScript fragment initializes a REST connection. Keep `authorizationServer` and `resource` for the consent and token examples; the API alias is only the discovery starting point.
|
|
19
|
+
|
|
20
|
+
```javascript
|
|
21
|
+
const response = await fetch('https://api.portoperatingsystem.lol/.well-known/oauth-authorization-server');
|
|
22
|
+
if (!response.ok) throw new Error('OAuth discovery failed');
|
|
23
|
+
const authorizationServer = await response.json();
|
|
24
|
+
const resource = authorizationServer.issuer;
|
|
25
|
+
const apiBase = authorizationServer.issuer;
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
For MCP, assign `resource` from the protected-resource metadata's `resource` field instead. Do not replace either value with the hostname you started from. A wrong `resource` can produce an `invalid_request` error callback even when client registration succeeded.
|
|
@@ -11,6 +11,21 @@ code_verifier=<this attempt's original verifier>
|
|
|
11
11
|
resource=<the same canonical resource used for authorization>
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
+
Continue with the same discovery values and verifier from the consent example. `code` below must be from a callback whose `state` and `iss` you validated; abort on any callback `error`:
|
|
15
|
+
|
|
16
|
+
```javascript
|
|
17
|
+
const tokenResponse = await fetch(authorizationServer.token_endpoint, {
|
|
18
|
+
method: 'POST',
|
|
19
|
+
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
20
|
+
body: new URLSearchParams({
|
|
21
|
+
grant_type: 'authorization_code', client_id: clientId, code,
|
|
22
|
+
redirect_uri: redirectUri, code_verifier: verifier, resource,
|
|
23
|
+
}),
|
|
24
|
+
});
|
|
25
|
+
if (!tokenResponse.ok) throw new Error('OAuth code exchange failed');
|
|
26
|
+
const tokens = await tokenResponse.json(); // Store securely; do not print tokens.
|
|
27
|
+
```
|
|
28
|
+
|
|
14
29
|
Save access_token, refresh_token and returned scope in the connector's secure credential store. Public clients have no client secret. Use Authorization: Bearer <access_token> with REST requests or the MCP HTTP connection, according to that token's resource. A refresh token is never an API credential. [Scopes bound access; resource policies still apply](/docs/for-ai/guides/authorization-rules.md).
|
|
15
30
|
|
|
16
31
|
Refresh with grant_type=refresh_token, client_id, refresh_token and the original resource at token_endpoint. Scope may stay the same or narrow; it cannot expand. Credentials rotate: store the newly returned refresh token atomically and stop using the previous one. A revoked or reused refresh token must not be retried in a loop. Reauthorize when the grant no longer permits the intended operation.
|
|
@@ -5,12 +5,14 @@ First complete [OAuth setup](/docs/for-ai/guides/authentication-and-dcr.md). Kee
|
|
|
5
5
|
1. GET /endpoints?owner=~caller&maxResults=25 with Authorization: Bearer <access_token>. Read [enumerateEndpoints](/docs/for-ai/operations/enumerateEndpoints.md) for the exact pagination and response fields. A filter such as owner is required. Follow the returned continuation metadata until the authorized enumeration is complete. An empty list means valid access with no visible devices; guide the user to [add devices](/docs/for-ai/guides/adding-devices.md).
|
|
6
6
|
2. Select one light by full endpoint ID and group/room context. If the target is ambiguous, ask the user before acting.
|
|
7
7
|
3. Inspect its declared capability namespace and version. A light declaring power 1.0 uses the [power guide](/docs/for-ai/capability-interfaces/power/1.0.md) and [turn-on payload schema](/docs/references/capability-interfaces/power/1.0/messages/turn-on.yaml). For other versions or capabilities, follow [the capability directory](/docs/for-ai/capability-interfaces.md).
|
|
8
|
-
4. With the user's intended action, POST /messages. Read [sendMessage](/docs/for-ai/operations/sendMessage.md) and its linked request schema. Use the endpoint ID and message version you discovered, not the illustrative ID below.
|
|
8
|
+
4. With the user's intended action, POST /messages with Authorization: Bearer <access_token> and Content-Type: application/json. Send the request object below as the JSON body, without a surrounding `body` field or a JSON string. Read [sendMessage](/docs/for-ai/operations/sendMessage.md) and its linked request schema. Use the endpoint ID and message version you discovered, not the illustrative ID below.
|
|
9
9
|
|
|
10
10
|
```json
|
|
11
11
|
{"target":{"type":"ENDPOINT","id":"port1/principals/example/endpoints/example-light"},"message":{"header":{"namespace":"port1/systems/zero/capability-interfaces/power","name":"turn-on","version":"1.0"},"body":{}}}
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
HTTP 200 acknowledges acceptance. An asynchronous request can return `{"messageId":""}` without a `message`; the empty ID is valid and does not provide a durable receipt or retry deduplication. When a unary response message is present, `messageId` identifies that response. Neither response proves physical state. After a lost response, treat the outcome as unknown and inspect state before deciding whether another action is safe.
|
|
15
|
+
|
|
16
|
+
Do not cut JSON with head -c. GET /endpoints?id=<URL-encoded-endpoint-id>&expand=interfaces.attributes&forceDeviceAttributeQuery=true to request permitted device-backed state. Inspect attributes and partial errors. Check sampledAt against the command time and the capability version. sampledAt is the source-reported time, not the fetch time; an absent timestamp means freshness is unknown. Use [enumerateEndpoints and its linked components](/docs/for-ai/operations/enumerateEndpoints.md) for exact response shapes. Report returned device state separately from dispatch acceptance. Stale/unavailable state means unknown, and user confirmation may be necessary for a physical device.
|
|
15
17
|
|
|
16
18
|
For first setup, test one explicitly selected safe light. Do not turn off all homes as a connectivity check. See [lighting](/docs/for-ai/guides/lighting.md), [first setup](/docs/for-ai/guides/first-setup.md) and [authorization rules](/docs/for-ai/guides/authorization-rules.md).
|
|
@@ -114,13 +114,15 @@ post:
|
|
|
114
114
|
body: {}
|
|
115
115
|
responses:
|
|
116
116
|
'200':
|
|
117
|
-
description:
|
|
117
|
+
description: >-
|
|
118
|
+
Request accepted; an asynchronous acknowledgment may have an empty messageId and no message.
|
|
119
|
+
Verify device state separately.
|
|
118
120
|
content:
|
|
119
121
|
application/json:
|
|
120
122
|
schema:
|
|
121
123
|
$ref: /docs/references/schemas/CreateMessageResponse.json
|
|
122
124
|
example:
|
|
123
|
-
messageId:
|
|
125
|
+
messageId: ''
|
|
124
126
|
'400':
|
|
125
127
|
description: Invalid request payload or plugin dispatch request error
|
|
126
128
|
content:
|
|
@@ -114,13 +114,15 @@ post:
|
|
|
114
114
|
body: {}
|
|
115
115
|
responses:
|
|
116
116
|
'200':
|
|
117
|
-
description:
|
|
117
|
+
description: >-
|
|
118
|
+
Request accepted; an asynchronous acknowledgment may have an empty messageId and no message.
|
|
119
|
+
Verify device state separately.
|
|
118
120
|
content:
|
|
119
121
|
application/json:
|
|
120
122
|
schema:
|
|
121
123
|
$ref: /docs/references/schemas/CreateMessageResponse.json
|
|
122
124
|
example:
|
|
123
|
-
messageId:
|
|
125
|
+
messageId: ''
|
|
124
126
|
'400':
|
|
125
127
|
description: Invalid request payload or plugin dispatch request error
|
|
126
128
|
content:
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# REST components: A, page 1
|
|
2
|
+
|
|
3
|
+
[Schema directory](/docs/for-ai/schemas.md). Follow only the components linked by your operation.
|
|
4
|
+
|
|
5
|
+
- [AccessControlEntity](/docs/references/schemas/AccessControlEntity.json) (schemas)
|
|
6
|
+
- [AccessControlOperation](/docs/references/schemas/AccessControlOperation.json) (schemas)
|
|
7
|
+
- [AccessControlRequesterContext](/docs/references/schemas/AccessControlRequesterContext.json) (schemas)
|
|
8
|
+
- [AccessControlResourceContext](/docs/references/schemas/AccessControlResourceContext.json) (schemas)
|
|
9
|
+
- [AccessControlRule](/docs/references/schemas/AccessControlRule.json) (schemas)
|
|
10
|
+
- [AccessControlRuleEffect](/docs/references/schemas/AccessControlRuleEffect.json) (schemas)
|
|
11
|
+
- [AddEndpointGroupMembersRequest](/docs/references/schemas/AddEndpointGroupMembersRequest.json) (schemas)
|
|
12
|
+
- [AirQualitySensorInterfaceAirQualityIndexAttribute](/docs/references/schemas/AirQualitySensorInterfaceAirQualityIndexAttribute.json) (schemas)
|
|
13
|
+
- [AirQualitySensorInterfaceConfiguration](/docs/references/schemas/AirQualitySensorInterfaceConfiguration.json) (schemas)
|
|
14
|
+
- [AirQualitySensorInterfaceGetAirQualityMessage](/docs/references/schemas/AirQualitySensorInterfaceGetAirQualityMessage.json) (schemas)
|
|
15
|
+
- [AirQualityStandard](/docs/references/schemas/AirQualityStandard.json) (schemas)
|
|
16
|
+
- [AlarmInterfaceAlarmStateAttribute](/docs/references/schemas/AlarmInterfaceAlarmStateAttribute.json) (schemas)
|
|
17
|
+
- [AlarmInterfaceConfiguration](/docs/references/schemas/AlarmInterfaceConfiguration.json) (schemas)
|
|
18
|
+
- [AlarmInterfaceRingAlarmMessage](/docs/references/schemas/AlarmInterfaceRingAlarmMessage.json) (schemas)
|
|
19
|
+
- [AlarmInterfaceSilenceAlarmMessage](/docs/references/schemas/AlarmInterfaceSilenceAlarmMessage.json) (schemas)
|
|
20
|
+
- [AlarmInterfaceTestAlarmMessage](/docs/references/schemas/AlarmInterfaceTestAlarmMessage.json) (schemas)
|
|
21
|
+
- [AlarmState](/docs/references/schemas/AlarmState.json) (schemas)
|
|
22
|
+
- [Album](/docs/references/schemas/Album.json) (schemas)
|
|
23
|
+
- [ApiKeySecret](/docs/references/schemas/ApiKeySecret.json) (schemas)
|
|
24
|
+
- [ApplePushNotificationAuthTokenSecret](/docs/references/schemas/ApplePushNotificationAuthTokenSecret.json) (schemas)
|
|
25
|
+
- [ApplePushNotificationPlugin](/docs/references/schemas/ApplePushNotificationPlugin.json) (schemas)
|
|
26
|
+
- [ApplicationInfo](/docs/references/schemas/ApplicationInfo.json) (schemas)
|
|
27
|
+
- [ApplicationInterface](/docs/references/schemas/ApplicationInterface.json) (schemas)
|
|
28
|
+
- [ApplicationInterfaceAttribute](/docs/references/schemas/ApplicationInterfaceAttribute.json) (schemas)
|
|
29
|
+
- [ApplicationInterfaceMessage](/docs/references/schemas/ApplicationInterfaceMessage.json) (schemas)
|
|
30
|
+
- [ApplicationLauncherInterfaceApplicationListAttribute](/docs/references/schemas/ApplicationLauncherInterfaceApplicationListAttribute.json) (schemas)
|
|
31
|
+
- [ApplicationLauncherInterfaceConfiguration](/docs/references/schemas/ApplicationLauncherInterfaceConfiguration.json) (schemas)
|
|
32
|
+
- [ApplicationLauncherInterfaceCurrentApplicationAttribute](/docs/references/schemas/ApplicationLauncherInterfaceCurrentApplicationAttribute.json) (schemas)
|
|
33
|
+
- [ApplicationLauncherInterfaceLaunchApplicationMessage](/docs/references/schemas/ApplicationLauncherInterfaceLaunchApplicationMessage.json) (schemas)
|
|
34
|
+
- [ApplicationLauncherInterfaceStopApplicationMessage](/docs/references/schemas/ApplicationLauncherInterfaceStopApplicationMessage.json) (schemas)
|
|
35
|
+
- [Artist](/docs/references/schemas/Artist.json) (schemas)
|
|
36
|
+
- [AttributeSchema](/docs/references/schemas/AttributeSchema.json) (schemas)
|
|
37
|
+
- [AttributeState](/docs/references/schemas/AttributeState.json) (schemas)
|
|
38
|
+
- [AudioConvertNodeConfiguration](/docs/references/schemas/AudioConvertNodeConfiguration.json) (schemas)
|
|
39
|
+
- [AuthDataType](/docs/references/schemas/AuthDataType.json) (schemas)
|
|
40
|
+
- [AuthLink](/docs/references/schemas/AuthLink.json) (schemas)
|
|
41
|
+
- [AuthLinkSecret](/docs/references/schemas/AuthLinkSecret.json) (schemas)
|
|
42
|
+
- [AuthLinksList](/docs/references/schemas/AuthLinksList.json) (schemas)
|
|
43
|
+
- [AuthorizationInterfaceAuthorizationEstablishedMessage](/docs/references/schemas/AuthorizationInterfaceAuthorizationEstablishedMessage.json) (schemas)
|
|
44
|
+
- [AuthorizationInterfaceAuthorizationUpdateReportMessage](/docs/references/schemas/AuthorizationInterfaceAuthorizationUpdateReportMessage.json) (schemas)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# REST components: A, page 2
|
|
2
|
+
|
|
3
|
+
[Schema directory](/docs/for-ai/schemas.md). Follow only the components linked by your operation.
|
|
4
|
+
|
|
5
|
+
- [AuthorizationInterfaceConfiguration](/docs/references/schemas/AuthorizationInterfaceConfiguration.json) (schemas)
|
|
6
|
+
- [AuthorizationInterfaceRefreshTokensMessage](/docs/references/schemas/AuthorizationInterfaceRefreshTokensMessage.json) (schemas)
|
|
7
|
+
- [AuthorizeDeviceRequest](/docs/references/schemas/AuthorizeDeviceRequest.json) (schemas)
|
|
8
|
+
- [AuthorizeDeviceResponse](/docs/references/schemas/AuthorizeDeviceResponse.json) (schemas)
|
|
9
|
+
- [AuthResourceType](/docs/references/schemas/AuthResourceType.json) (schemas)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# REST components: B, page 1
|
|
2
|
+
|
|
3
|
+
[Schema directory](/docs/for-ai/schemas.md). Follow only the components linked by your operation.
|
|
4
|
+
|
|
5
|
+
- [BarrierControlInterfaceBarrierPositionAttribute](/docs/references/schemas/BarrierControlInterfaceBarrierPositionAttribute.json) (schemas)
|
|
6
|
+
- [BarrierControlInterfaceBarrierStateAttribute](/docs/references/schemas/BarrierControlInterfaceBarrierStateAttribute.json) (schemas)
|
|
7
|
+
- [BarrierControlInterfaceCloseMessage](/docs/references/schemas/BarrierControlInterfaceCloseMessage.json) (schemas)
|
|
8
|
+
- [BarrierControlInterfaceConfiguration](/docs/references/schemas/BarrierControlInterfaceConfiguration.json) (schemas)
|
|
9
|
+
- [BarrierControlInterfaceGoToPositionMessage](/docs/references/schemas/BarrierControlInterfaceGoToPositionMessage.json) (schemas)
|
|
10
|
+
- [BarrierControlInterfaceOpenMessage](/docs/references/schemas/BarrierControlInterfaceOpenMessage.json) (schemas)
|
|
11
|
+
- [BasePlugin](/docs/references/schemas/BasePlugin.json) (schemas)
|
|
12
|
+
- [BaseSecret](/docs/references/schemas/BaseSecret.json) (schemas)
|
|
13
|
+
- [BatchItemError](/docs/references/schemas/BatchItemError.json) (schemas)
|
|
14
|
+
- [BatchMessageItem](/docs/references/schemas/BatchMessageItem.json) (schemas)
|
|
15
|
+
- [BatchOperationRequestId](/docs/references/schemas/BatchOperationRequestId.json) (schemas)
|
|
16
|
+
- [BatchResponseStatus](/docs/references/schemas/BatchResponseStatus.json) (schemas)
|
|
17
|
+
- [BatteryInterfaceBatteryAttribute](/docs/references/schemas/BatteryInterfaceBatteryAttribute.json) (schemas)
|
|
18
|
+
- [BatteryInterfaceConfiguration](/docs/references/schemas/BatteryInterfaceConfiguration.json) (schemas)
|
|
19
|
+
- [BrandingInformation](/docs/references/schemas/BrandingInformation.json) (schemas)
|
|
20
|
+
- [BrightnessInterfaceBrightnessAttribute](/docs/references/schemas/BrightnessInterfaceBrightnessAttribute.json) (schemas)
|
|
21
|
+
- [BrightnessInterfaceConfiguration](/docs/references/schemas/BrightnessInterfaceConfiguration.json) (schemas)
|
|
22
|
+
- [BrightnessInterfaceSetBrightnessMessage](/docs/references/schemas/BrightnessInterfaceSetBrightnessMessage.json) (schemas)
|