Access and playback
GraphQL schema reference · API guide · SDKs
Playback signing keys, developer tokens, playback policy, and viewer endpoint resolution.
Types used by more than one domain are on Shared types.
Queries
Section titled “Queries”Query.developerTokensConnection
Section titled “Query.developerTokensConnection”List API tokens for programmatic access. Used to authenticate requests to the Developer API.
developerTokensConnection( page: ConnectionInput): DeveloperTokensConnection!Returns: DeveloperTokensConnection! (DeveloperTokensConnection)
Arguments
page:ConnectionInput(ConnectionInput)
SDK
| Operation | TypeScript | Go | Python |
|---|---|---|---|
| ListDeveloperTokens | ListDeveloperTokensDocument | ListDeveloperTokens | list_developer_tokens |
Query.resolveViewerEndpoint
Section titled “Query.resolveViewerEndpoint”Resolve a playback ID to viewer endpoints (HLS, DASH, etc.). Used by players to get the optimal CDN endpoint for playback.
resolveViewerEndpoint( contentId: String! protocol: MediaViewerProtocol): ViewerEndpointResponseReturns: ViewerEndpointResponse (ViewerEndpointResponse)
Arguments
contentId:String!— Playback ID for live streams or VOD uploads, or artifact playback ID for clips/DVR.protocol:MediaViewerProtocol(MediaViewerProtocol) — Optional playback constraint. A different format is never substituted. Omit to select a node with any playable Mist output and receive its full catalog.
SDK
| Operation | TypeScript | Go | Python |
|---|---|---|---|
| ResolveViewerEndpoint | ResolveViewerEndpointDocument | ResolveViewerEndpoint | resolve_viewer_endpoint |
Query.signingKey
Section titled “Query.signingKey”Get a single playback signing key by ID. Tenant-scoped.
signingKey( id: ID!): SigningKeyReturns: SigningKey (SigningKey)
Arguments
id:ID!
SDK
| Operation | TypeScript | Go | Python |
|---|---|---|---|
| GetSigningKey | GetSigningKeyDocument | GetSigningKey | get_signing_key |
Query.signingKeysConnection
Section titled “Query.signingKeysConnection”List the tenant’s playback signing keys with optional status filter.
signingKeysConnection( status: String page: ConnectionInput): SigningKeysConnection!Returns: SigningKeysConnection! (SigningKeysConnection)
Arguments
status:String— Filter by status: ‘active’ or ‘revoked’. Empty = all.page:ConnectionInput(ConnectionInput)
SDK
| Operation | TypeScript | Go | Python |
|---|---|---|---|
| ListSigningKeys | ListSigningKeysDocument | ListSigningKeys | list_signing_keys |
Mutations
Section titled “Mutations”Mutation.createDeveloperToken
Section titled “Mutation.createDeveloperToken”Create a new API token for programmatic access.
createDeveloperToken( input: CreateDeveloperTokenInput!): CreateDeveloperTokenResult!Returns: CreateDeveloperTokenResult! (CreateDeveloperTokenResult)
Arguments
input:CreateDeveloperTokenInput!(CreateDeveloperTokenInput) — Token configuration.
SDK
| Operation | TypeScript | Go | Python |
|---|---|---|---|
| CreateDeveloperToken | CreateDeveloperTokenDocument | CreateDeveloperToken | create_developer_token |
Mutation.createSigningKey
Section titled “Mutation.createSigningKey”Generate a new ES256 playback signing keypair. The private key is returned ONCE in the response and never stored or returned again — capture it. Up to 10 active keys per tenant; revoke before re-creating.
createSigningKey( input: CreateSigningKeyInput!): CreateSigningKeyResult!Returns: CreateSigningKeyResult! (CreateSigningKeyResult)
Arguments
input:CreateSigningKeyInput!(CreateSigningKeyInput)
SDK
| Operation | TypeScript | Go | Python |
|---|---|---|---|
| CreateSigningKey | CreateSigningKeyDocument | CreateSigningKey | create_signing_key |
Mutation.revokeDeveloperToken
Section titled “Mutation.revokeDeveloperToken”Revoke an API token.
revokeDeveloperToken( id: ID!): RevokeDeveloperTokenResult!Returns: RevokeDeveloperTokenResult! (RevokeDeveloperTokenResult)
Arguments
id:ID!— The token ID to revoke.
SDK
| Operation | TypeScript | Go | Python |
|---|---|---|---|
| RevokeDeveloperToken | RevokeDeveloperTokenDocument | RevokeDeveloperToken | revoke_developer_token |
Mutation.revokeSigningKey
Section titled “Mutation.revokeSigningKey”Mark an active signing key as revoked. Triggers session re-evaluation across the tenant’s protected playback objects: viewers with valid auth continue (possibly with a brief reconnect), revoked viewers are denied.
revokeSigningKey( id: ID!): RevokeSigningKeyResult!Returns: RevokeSigningKeyResult! (RevokeSigningKeyResult)
Arguments
id:ID!
SDK
| Operation | TypeScript | Go | Python |
|---|---|---|---|
| RevokeSigningKey | RevokeSigningKeyDocument | RevokeSigningKey | revoke_signing_key |
Mutation.setPlaybackPolicy
Section titled “Mutation.setPlaybackPolicy”Set or clear the playback access policy on a stream, VOD asset, or clip. Exactly one of streamId / vodAssetId / clipId must be set in the input. Webhook secrets are write-only on input and never returned in queries. Mutating a policy invalidates Foghorn caches and re-runs USER_NEW for affected sessions; valid viewers continue, invalid ones are denied.
setPlaybackPolicy( input: SetPlaybackPolicyInput!): SetPlaybackPolicyResult!Returns: SetPlaybackPolicyResult! (SetPlaybackPolicyResult)
Arguments
input:SetPlaybackPolicyInput!(SetPlaybackPolicyInput)
SDK
| Operation | TypeScript | Go | Python |
|---|---|---|---|
| SetPlaybackPolicy | SetPlaybackPolicyDocument | SetPlaybackPolicy | set_playback_policy |
Mutation.testPlaybackAccess
Section titled “Mutation.testPlaybackAccess”Run the same evaluator the live USER_NEW path uses against a caller- supplied JWT (or webhook test request) without registering a viewer session. Mutation, not query, because webhook mode (fireWebhook=true) fires a real outbound HTTPS request to the customer URL. Tenant ownership of the playback target is validated server-side.
testPlaybackAccess( input: TestPlaybackAccessInput!): TestPlaybackAccessResult!Returns: TestPlaybackAccessResult! (TestPlaybackAccessResult)
Arguments
input:TestPlaybackAccessInput!(TestPlaybackAccessInput)
SDK
| Operation | TypeScript | Go | Python |
|---|---|---|---|
| TestPlaybackAccess | TestPlaybackAccessDocument | TestPlaybackAccess | test_playback_access |
CreateDeveloperTokenInput
Section titled “CreateDeveloperTokenInput”input_object
Input for creating a developer API token.
- name:
String!— Human-readable name for the token. - permissions:
String— Comma-separated permission scopes in resource:action form (streams:read, streams:write, analytics:read, etc.). - expiresIn:
Int— Days until expiration, 1-3650 (null = non-expiring).
CreateDeveloperTokenResult
Section titled “CreateDeveloperTokenResult”union
- Member: DeveloperToken
- Member: ValidationError
- Member: RateLimitError
- Member: AuthError
CreateSigningKeyInput
Section titled “CreateSigningKeyInput”input_object
- name:
String!— Display label for the key (e.g. ‘staging’, ‘rotation-2026-q2’).
CreateSigningKeyResult
Section titled “CreateSigningKeyResult”union
- Member: CreateSigningKeySuccess
- Member: ValidationError
- Member: RateLimitError
- Member: AuthError
CreateSigningKeySuccess
Section titled “CreateSigningKeySuccess”object
Returned exactly once on createSigningKey. Capture privateKeyPem before the response is discarded — FrameWorks does not store it and cannot return it again. Lose the private key, revoke and create a new one.
- signingKey:
SigningKey!(SigningKey) - privateKeyPem:
String!— ES256 private key in PEM format. Shown ONCE; never stored, never logged.
DeveloperToken
Section titled “DeveloperToken”object
An API token for programmatic access to the GraphQL API. Tokens have scoped permissions and optional expiration.
- id:
ID!— Unique token identifier. - tokenName:
String!— Human-readable name for the token. - tokenValue:
String— The secret token value (only returned on creation, null thereafter). - permissions:
[String!]!— List of granted permission scopes (streams:read, streams:write, etc.). - status:
String!— Token status (active, revoked, expired). - lastUsedAt:
Time(Time) — When the token was last used for API access. - expiresAt:
Time(Time) — When the token expires (null for non-expiring). - createdAt:
Time(Time) — When the token was created.
DeveloperTokenEdge
Section titled “DeveloperTokenEdge”object
- cursor:
String! - node:
DeveloperToken!(DeveloperToken)
DeveloperTokensConnection
Section titled “DeveloperTokensConnection”object
- edges:
[DeveloperTokenEdge!]!(DeveloperTokenEdge) - nodes:
[DeveloperToken!]!(DeveloperToken) - pageInfo:
PageInfo!(PageInfo) - totalCount:
Int!
MediaViewerProtocol
Section titled “MediaViewerProtocol”enum
Playback format required when selecting and preparing a viewer destination.
WEBRTCWHEPHLSDASHHLS_CMAFMEWSMEWS_WEBMMP4WEBMMKVTSAACH264H264_WSRAW_WSJSON_WSFLVHDSSMOOTHSTREAMINGSDPMIST_HTMLRTMPRTSPSRTDTSC
PlaybackAccessDecision
Section titled “PlaybackAccessDecision”object
Structured result of a dry-run policy evaluation. Mirrors Foghorn’s PlaybackDecision struct.
- allowed:
Boolean! - policyType:
String!— Resolved policy type: ‘public’ | ‘jwt’ | ‘webhook’ | ” when no policy was found. - reason:
String— Empty on allow; deny reason token (e.g. ‘jwt-expired’, ‘webhook-deny-403’) otherwise. - detail:
String— Free-form context for the operator (verifier error string, HTTP status as text). - kid:
String— JWT key ID claimed by the token (extracted before verification). - claimsJson:
String— JSON-encoded JWT claims map. On allow, the verified claims. On deny, an unverified parse of the payload — useful for diagnosing aud / required- claim mismatches but never trustworthy as an auth signal. - webhookStatus:
Int— HTTP status code from the customer webhook (0 if no call was made). - webhookLatencyMs:
Int— End-to-end RTT for the webhook call in milliseconds (0 if no call was made). - resolvedInternalName:
String— Internal MistServer name the evaluator resolved against. Always populated when a target was found.
PlaybackInstance
Section titled “PlaybackInstance”object
- nodeId:
String! - viewers:
Int! - bufferState:
String - bytesUp:
Float - bytesDown:
Float - totalConnections:
Int - inputs:
Int - lastUpdate:
Time(Time)
PlaybackJwtClaimRequirementInput
Section titled “PlaybackJwtClaimRequirementInput”input_object
- name:
String! - jsonValue:
String!— JSON-encoded expected value (e.g."pro",true,42).
PlaybackJwtPolicyInput
Section titled “PlaybackJwtPolicyInput”input_object
- allowedKids:
[String!]— Allowed signing key IDs. Empty = any active tenant key. Blank IDs are rejected. - requiredAudience:
[String!]— If set, the viewer JWT’saudclaim must contain at least one of these. - requiredClaimsJson:
[PlaybackJwtClaimRequirementInput!](PlaybackJwtClaimRequirementInput) — Required claim constraints. Each entry’s value is JSON-encoded for type flexibility.
PlaybackMetadata
Section titled “PlaybackMetadata”object
- status:
String! - isLive:
Boolean! - viewers:
Int! - bufferState:
String - tracks:
[PlaybackTrack!](PlaybackTrack) - protocolHints:
[String!] - instances:
[PlaybackInstance!](PlaybackInstance) - dvrStatus:
String - dvrSourceUri:
String - contentId:
String! - contentType:
String! - title:
String - description:
String - durationSeconds:
Int - recordingSizeBytes:
Float - clipSource:
String - createdAt:
Time(Time) - thumbnailAssets:
ThumbnailAssets(ThumbnailAssets) - telemetryToken:
String— Short-lived signed token binding the resolved serving endpoint. The player echoes it on its boot-telemetry beacon so Bridge can trust cluster attribution. Infrastructure attribution only — carries no viewer identity.
PlaybackPolicyInput
Section titled “PlaybackPolicyInput”input_object
- type:
PlaybackPolicyType!(PlaybackPolicyType) - jwt:
PlaybackJwtPolicyInput(PlaybackJwtPolicyInput) — Required when type == JWT. - webhook:
PlaybackWebhookPolicyInput(PlaybackWebhookPolicyInput) — Required when type == WEBHOOK. - allowedOrigins:
[String!]— JWT and WEBHOOK only: sites allowed to embed the content, each*orscheme://host[:port](at most 50). Omit or empty for no restriction.
PlaybackTrack
Section titled “PlaybackTrack”object
- type:
String! - codec:
String! - bitrateKbps:
Int! - width:
Int! - height:
Int! - channels:
Int! - sampleRate:
Int!
PlaybackWebhookPolicyInput
Section titled “PlaybackWebhookPolicyInput”input_object
- url:
String!— https URL FrameWorks will POST to on each viewer connect. - secret:
String— HMAC-SHA256 secret used to sign outbound webhook bodies. Write-only: persisted via field-level encryption and never returned in queries. Required when creating a webhook policy. Omit when updating an existing webhook policy to keep the currently configured secret. - timeoutMs:
Int— Outbound POST timeout in milliseconds. Server caps at 10000; default 5000. - context:
JSON(JSON) — A JSON object (at most 4 KiB) sent ascontextin every access request, e.g.{"courseId": "algebra-101"}, so the endpoint can decide without its own lookup.
RevokeDeveloperTokenResult
Section titled “RevokeDeveloperTokenResult”union
- Member: DeleteSuccess
- Member: NotFoundError
- Member: AuthError
RevokeSigningKeyResult
Section titled “RevokeSigningKeyResult”union
- Member: SigningKey
- Member: NotFoundError
- Member: AuthError
SetPlaybackPolicyInput
Section titled “SetPlaybackPolicyInput”input_object
- streamId:
ID— Exactly one of streamId, vodAssetId, or clipId must be provided. - vodAssetId:
ID - clipId:
ID - policy:
PlaybackPolicyInput!(PlaybackPolicyInput)
SetPlaybackPolicyResult
Section titled “SetPlaybackPolicyResult”union
- Member: Stream
- Member: VodAsset
- Member: Clip
- Member: ValidationError
- Member: NotFoundError
- Member: AuthError
SigningKey
Section titled “SigningKey”object
A customer-managed signing key for issuing viewer playback JWTs. The private key is returned exactly once at creation time (in CreateSigningKeySuccess); FrameWorks stores only the public key. Up to 10 active keys per tenant.
Implements Node.
- id:
ID! - kid:
String!— Short ID embedded in JWT header (kid) for fast key lookup. - name:
String!— Customer-supplied label. - algorithm:
SigningKeyAlgorithm!(SigningKeyAlgorithm) — Algorithm — ES256 only for v1. - publicKeyPem:
String!— Public key in PEM format. The private key is never stored. - status:
SigningKeyStatus!(SigningKeyStatus) — Lifecycle status. - createdAt:
Time!(Time) - lastUsedAt:
Time(Time) — Last time a JWT signed by this key successfully verified at playback. - revokedAt:
Time(Time) — When the key was revoked (null if active).
SigningKeyAlgorithm
Section titled “SigningKeyAlgorithm”enum
Algorithm used to sign viewer playback JWTs. ES256 only for v1.
ES256
SigningKeyEdge
Section titled “SigningKeyEdge”object
- cursor:
String! - node:
SigningKey!(SigningKey)
SigningKeyStatus
Section titled “SigningKeyStatus”enum
Lifecycle status of a signing key.
ACTIVEREVOKED
SigningKeysConnection
Section titled “SigningKeysConnection”object
- edges:
[SigningKeyEdge!]!(SigningKeyEdge) - nodes:
[SigningKey!]!(SigningKey) - pageInfo:
PageInfo!(PageInfo) - totalCount:
Int!
TestPlaybackAccessInput
Section titled “TestPlaybackAccessInput”input_object
Inputs for testPlaybackAccess. Exactly one of playbackId / internalName must be set (the server rejects both-set and neither-set). viewerToken is required for JWT policies and is forwarded to the webhook payload for webhook policies. fireWebhook gates a real outbound HTTPS call to the customer URL. That call uses the same SSRF-hardened evaluator path as live viewer admission, and customer endpoints may log, rate-limit, or trigger side effects from the test request. When playbackId is supplied, the server resolves the canonical internalName before invoking the evaluator so webhook payloads carry the same streamName the live USER_NEW path would.
- playbackId:
String - internalName:
String - viewerToken:
String— JWT to test (required for type=jwt; passed through in the webhook payload for type=webhook). - viewerIp:
String - requestUrl:
String - connector:
String - sessionId:
String - fireWebhook:
Boolean— Webhook policies only: when true, Foghorn will POST to the configured customer URL with an HMAC-signed payload (same path the live evaluator uses). When false, the evaluator returns reason=“webhook-test-skipped” without making the call so operators can inspect the resolved policy without side effects. - origin:
String— Origin header to test the policy’s allowed origins against. - referer:
String— Referer header, used when origin is empty.
TestPlaybackAccessResult
Section titled “TestPlaybackAccessResult”union
- Member: PlaybackAccessDecision
- Member: ValidationError
- Member: NotFoundError
- Member: AuthError
ViewerEndpoint
Section titled “ViewerEndpoint”object
- nodeId:
String! - baseUrl:
String! - protocol:
String! - url:
String! - geoDistance:
Float - loadScore:
Float - outputs:
JSON(JSON)
ViewerEndpointResponse
Section titled “ViewerEndpointResponse”object
- primary:
ViewerEndpoint(ViewerEndpoint) - fallbacks:
[ViewerEndpoint!]!(ViewerEndpoint) - metadata:
PlaybackMetadata(PlaybackMetadata)