webex_byova.models
webex_byova.models
Pydantic models.
__all__
module-attribute
__all__ = ['IntegrationCredentials', 'ServiceAppCredentials', 'OAuthTokens', 'ServiceAppTokens', 'DataSource', 'DataSourceCreate', 'DataSourceUpdate', 'DataSourceListItem', 'Schema', 'ServiceAppWebhookEvent', 'ServiceAppAuthorizedResult', 'WebhookRegistration', 'WebhookUpdate']
IntegrationCredentials
Bases: BaseModel
Developer-supplied Integration OAuth client credentials.
Attributes:
| Name | Type | Description |
|---|---|---|
client_id |
str
|
Integration client ID from Webex Developer portal. |
client_secret |
str
|
Integration client secret. |
redirect_uri |
str
|
Registered OAuth redirect URI for the Integration. |
OAuthTokens
Bases: BaseModel
OAuth token response from /v1/access_token.
Attributes:
| Name | Type | Description |
|---|---|---|
access_token |
str
|
Bearer access token for Integration API calls. |
expires_in |
int
|
Access token lifetime in seconds. |
token_type |
str
|
Token type (typically |
refresh_token |
str | None
|
Refresh token for obtaining new access tokens. |
refresh_token_expires_in |
int | None
|
Refresh token lifetime in seconds, if provided. |
obtained_at |
datetime
|
UTC timestamp when tokens were received. |
expires_at
property
expires_at: datetime
Return the UTC datetime when the access token expires.
is_expired
is_expired(buffer_seconds: int = 60) -> bool
Check whether the access token is expired or near expiry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
buffer_seconds
|
int
|
Refresh this many seconds before actual expiry. |
60
|
Returns:
| Type | Description |
|---|---|
bool
|
True if the token should be refreshed. |
ServiceAppCredentials
Bases: BaseModel
Developer-supplied Service App OAuth client credentials.
Attributes:
| Name | Type | Description |
|---|---|---|
client_id |
str
|
Service App client ID from Webex Developer portal. |
client_secret |
str
|
Service App client secret. |
ServiceAppTokens
Bases: BaseModel
Service App token pair from POST /applications/{id}/token.
Attributes:
| Name | Type | Description |
|---|---|---|
access_token |
str
|
Bearer access token for org-scoped API calls. |
expires_in |
int
|
Access token lifetime in seconds. |
token_type |
str
|
Token type (typically |
refresh_token |
str | None
|
Refresh token for the org registration. |
refresh_token_expires_in |
int | None
|
Refresh token lifetime in seconds, if provided. |
obtained_at |
datetime
|
UTC timestamp when tokens were received. |
is_expired
is_expired(buffer_seconds: int = 60) -> bool
Check whether the access token is expired or near expiry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
buffer_seconds
|
int
|
Refresh this many seconds before actual expiry. |
60
|
Returns:
| Type | Description |
|---|---|
bool
|
True if the token should be refreshed. |
DataSource
Bases: BaseModel
Data source resource returned by the Webex BYODS API.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str | None
|
Unique data source identifier. |
audience |
str | None
|
Virtual agent or application audience name. |
subject |
str | None
|
Data subject identifier (for example |
nonce |
str | None
|
Unique nonce string for the data source. |
schema_id |
str | None
|
UUID of the associated BYODS schema. |
url |
str | None
|
Ingestion endpoint URL for data delivery. |
token_lifetime_minutes |
int | None
|
JWS token lifetime in minutes. |
status |
str | None
|
Provisioning status (for example |
error_message |
str | None
|
Error details when status indicates failure. |
DataSourceCreate
Bases: BaseModel
Payload for POST /dataSources.
Attributes:
| Name | Type | Description |
|---|---|---|
audience |
str
|
Virtual agent or application audience name. |
subject |
str
|
Data subject identifier. |
nonce |
str
|
Unique nonce string. |
schema_id |
str
|
UUID of the BYODS schema to use. |
url |
str
|
Ingestion endpoint URL. |
token_lifetime_minutes |
int
|
JWS token lifetime in minutes. |
DataSourceListItem
Bases: BaseModel
Item in the GET /dataSources/ list response.
DataSourceUpdate
Bases: BaseModel
Payload for PUT /dataSources/{id}.
All fields are optional; only provided fields are sent to the API.
model_dump_api
model_dump_api() -> dict[str, Any]
Serialize for the Webex API using camelCase field names.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary with |
Schema
Bases: BaseModel
Data source schema available for BYODS registration.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Unique schema UUID. |
app_type |
str | None
|
Application type identifier. |
created_at |
str | None
|
ISO 8601 creation timestamp. |
protocol |
str | None
|
Data delivery protocol. |
service_type |
str | None
|
Service type classification. |
url |
str | None
|
Schema documentation or reference URL. |
ServiceAppAuthorizedResult
Bases: BaseModel
Result of handling a serviceApp authorized event.
Attributes:
| Name | Type | Description |
|---|---|---|
org_id |
str
|
Decoded organization ID. |
tokens |
Any
|
Service App tokens fetched for the org. |
event |
str
|
Event name ( |
ServiceAppWebhookEvent
Bases: BaseModel
Parsed serviceApp authorized or deauthorized webhook payload.
from_payload
classmethod
from_payload(payload: dict[str, Any]) -> ServiceAppWebhookEvent
Parse a raw webhook JSON payload into a structured event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payload
|
dict[str, Any]
|
Raw webhook JSON from Webex. |
required |
Returns:
| Type | Description |
|---|---|
ServiceAppWebhookEvent
|
Parsed |
WebhookRegistration
Bases: BaseModel
Registered Webex webhook.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Unique webhook identifier. |
name |
str | None
|
Human-readable webhook name. |
target_url |
str | None
|
HTTPS URL that receives webhook payloads. |
resource |
str | None
|
Webhook resource type (for example |
event |
str | None
|
Event name (for example |
filter |
str | None
|
Optional webhook filter expression. |
secret |
str | None
|
Shared secret for payload verification. |
status |
str | None
|
Webhook status from Webex. |
created |
str | None
|
ISO 8601 creation timestamp. |
owned_by |
str | None
|
Owner identifier. |
WebhookUpdate
Bases: BaseModel
Payload for PUT /webhooks/{id}.
model_dump_api
model_dump_api() -> dict[str, Any]
Serialize for the Webex API using camelCase field names.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary with |
auth
Authentication models.
IntegrationCredentials
Bases: BaseModel
Developer-supplied Integration OAuth client credentials.
Attributes:
| Name | Type | Description |
|---|---|---|
client_id |
str
|
Integration client ID from Webex Developer portal. |
client_secret |
str
|
Integration client secret. |
redirect_uri |
str
|
Registered OAuth redirect URI for the Integration. |
ServiceAppCredentials
Bases: BaseModel
Developer-supplied Service App OAuth client credentials.
Attributes:
| Name | Type | Description |
|---|---|---|
client_id |
str
|
Service App client ID from Webex Developer portal. |
client_secret |
str
|
Service App client secret. |
OAuthTokens
Bases: BaseModel
OAuth token response from /v1/access_token.
Attributes:
| Name | Type | Description |
|---|---|---|
access_token |
str
|
Bearer access token for Integration API calls. |
expires_in |
int
|
Access token lifetime in seconds. |
token_type |
str
|
Token type (typically |
refresh_token |
str | None
|
Refresh token for obtaining new access tokens. |
refresh_token_expires_in |
int | None
|
Refresh token lifetime in seconds, if provided. |
obtained_at |
datetime
|
UTC timestamp when tokens were received. |
expires_at
property
expires_at: datetime
Return the UTC datetime when the access token expires.
is_expired
is_expired(buffer_seconds: int = 60) -> bool
Check whether the access token is expired or near expiry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
buffer_seconds
|
int
|
Refresh this many seconds before actual expiry. |
60
|
Returns:
| Type | Description |
|---|---|
bool
|
True if the token should be refreshed. |
ServiceAppTokens
Bases: BaseModel
Service App token pair from POST /applications/{id}/token.
Attributes:
| Name | Type | Description |
|---|---|---|
access_token |
str
|
Bearer access token for org-scoped API calls. |
expires_in |
int
|
Access token lifetime in seconds. |
token_type |
str
|
Token type (typically |
refresh_token |
str | None
|
Refresh token for the org registration. |
refresh_token_expires_in |
int | None
|
Refresh token lifetime in seconds, if provided. |
obtained_at |
datetime
|
UTC timestamp when tokens were received. |
is_expired
is_expired(buffer_seconds: int = 60) -> bool
Check whether the access token is expired or near expiry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
buffer_seconds
|
int
|
Refresh this many seconds before actual expiry. |
60
|
Returns:
| Type | Description |
|---|---|
bool
|
True if the token should be refreshed. |
datasource
DataSource API models.
DataSource
Bases: BaseModel
Data source resource returned by the Webex BYODS API.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str | None
|
Unique data source identifier. |
audience |
str | None
|
Virtual agent or application audience name. |
subject |
str | None
|
Data subject identifier (for example |
nonce |
str | None
|
Unique nonce string for the data source. |
schema_id |
str | None
|
UUID of the associated BYODS schema. |
url |
str | None
|
Ingestion endpoint URL for data delivery. |
token_lifetime_minutes |
int | None
|
JWS token lifetime in minutes. |
status |
str | None
|
Provisioning status (for example |
error_message |
str | None
|
Error details when status indicates failure. |
DataSourceCreate
Bases: BaseModel
Payload for POST /dataSources.
Attributes:
| Name | Type | Description |
|---|---|---|
audience |
str
|
Virtual agent or application audience name. |
subject |
str
|
Data subject identifier. |
nonce |
str
|
Unique nonce string. |
schema_id |
str
|
UUID of the BYODS schema to use. |
url |
str
|
Ingestion endpoint URL. |
token_lifetime_minutes |
int
|
JWS token lifetime in minutes. |
DataSourceUpdate
Bases: BaseModel
Payload for PUT /dataSources/{id}.
All fields are optional; only provided fields are sent to the API.
model_dump_api
model_dump_api() -> dict[str, Any]
Serialize for the Webex API using camelCase field names.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary with |
DataSourceListItem
Bases: BaseModel
Item in the GET /dataSources/ list response.
DataSourceListResponse
Bases: BaseModel
Response wrapper for GET /dataSources/.
schema
Schema API models.
Schema
Bases: BaseModel
Data source schema available for BYODS registration.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Unique schema UUID. |
app_type |
str | None
|
Application type identifier. |
created_at |
str | None
|
ISO 8601 creation timestamp. |
protocol |
str | None
|
Data delivery protocol. |
service_type |
str | None
|
Service type classification. |
url |
str | None
|
Schema documentation or reference URL. |
SchemaListResponse
Bases: BaseModel
Response wrapper for GET /dataSources/schemas.
webhook
Webhook event models.
WebhookRegistration
Bases: BaseModel
Registered Webex webhook.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Unique webhook identifier. |
name |
str | None
|
Human-readable webhook name. |
target_url |
str | None
|
HTTPS URL that receives webhook payloads. |
resource |
str | None
|
Webhook resource type (for example |
event |
str | None
|
Event name (for example |
filter |
str | None
|
Optional webhook filter expression. |
secret |
str | None
|
Shared secret for payload verification. |
status |
str | None
|
Webhook status from Webex. |
created |
str | None
|
ISO 8601 creation timestamp. |
owned_by |
str | None
|
Owner identifier. |
WebhookUpdate
Bases: BaseModel
Payload for PUT /webhooks/{id}.
model_dump_api
model_dump_api() -> dict[str, Any]
Serialize for the Webex API using camelCase field names.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary with |
ServiceAppWebhookEvent
Bases: BaseModel
Parsed serviceApp authorized or deauthorized webhook payload.
from_payload
classmethod
from_payload(payload: dict[str, Any]) -> ServiceAppWebhookEvent
Parse a raw webhook JSON payload into a structured event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payload
|
dict[str, Any]
|
Raw webhook JSON from Webex. |
required |
Returns:
| Type | Description |
|---|---|
ServiceAppWebhookEvent
|
Parsed |
ServiceAppAuthorizedResult
Bases: BaseModel
Result of handling a serviceApp authorized event.
Attributes:
| Name | Type | Description |
|---|---|---|
org_id |
str
|
Decoded organization ID. |
tokens |
Any
|
Service App tokens fetched for the org. |
event |
str
|
Event name ( |
ServiceAppDeauthorizedResult
Bases: BaseModel
Result of handling a serviceApp deauthorized event.
Attributes:
| Name | Type | Description |
|---|---|---|
org_id |
str
|
Organization ID that was deauthorized. |
event |
str
|
Event name ( |
webex_byova.models.auth.IntegrationCredentials
Bases: BaseModel
Developer-supplied Integration OAuth client credentials.
Attributes:
| Name | Type | Description |
|---|---|---|
client_id |
str
|
Integration client ID from Webex Developer portal. |
client_secret |
str
|
Integration client secret. |
redirect_uri |
str
|
Registered OAuth redirect URI for the Integration. |
webex_byova.models.auth.ServiceAppCredentials
Bases: BaseModel
Developer-supplied Service App OAuth client credentials.
Attributes:
| Name | Type | Description |
|---|---|---|
client_id |
str
|
Service App client ID from Webex Developer portal. |
client_secret |
str
|
Service App client secret. |
webex_byova.models.auth.OAuthTokens
Bases: BaseModel
OAuth token response from /v1/access_token.
Attributes:
| Name | Type | Description |
|---|---|---|
access_token |
str
|
Bearer access token for Integration API calls. |
expires_in |
int
|
Access token lifetime in seconds. |
token_type |
str
|
Token type (typically |
refresh_token |
str | None
|
Refresh token for obtaining new access tokens. |
refresh_token_expires_in |
int | None
|
Refresh token lifetime in seconds, if provided. |
obtained_at |
datetime
|
UTC timestamp when tokens were received. |
expires_at
property
expires_at: datetime
Return the UTC datetime when the access token expires.
is_expired
is_expired(buffer_seconds: int = 60) -> bool
Check whether the access token is expired or near expiry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
buffer_seconds
|
int
|
Refresh this many seconds before actual expiry. |
60
|
Returns:
| Type | Description |
|---|---|
bool
|
True if the token should be refreshed. |
webex_byova.models.auth.ServiceAppTokens
Bases: BaseModel
Service App token pair from POST /applications/{id}/token.
Attributes:
| Name | Type | Description |
|---|---|---|
access_token |
str
|
Bearer access token for org-scoped API calls. |
expires_in |
int
|
Access token lifetime in seconds. |
token_type |
str
|
Token type (typically |
refresh_token |
str | None
|
Refresh token for the org registration. |
refresh_token_expires_in |
int | None
|
Refresh token lifetime in seconds, if provided. |
obtained_at |
datetime
|
UTC timestamp when tokens were received. |
is_expired
is_expired(buffer_seconds: int = 60) -> bool
Check whether the access token is expired or near expiry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
buffer_seconds
|
int
|
Refresh this many seconds before actual expiry. |
60
|
Returns:
| Type | Description |
|---|---|
bool
|
True if the token should be refreshed. |
webex_byova.models.datasource.DataSource
Bases: BaseModel
Data source resource returned by the Webex BYODS API.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str | None
|
Unique data source identifier. |
audience |
str | None
|
Virtual agent or application audience name. |
subject |
str | None
|
Data subject identifier (for example |
nonce |
str | None
|
Unique nonce string for the data source. |
schema_id |
str | None
|
UUID of the associated BYODS schema. |
url |
str | None
|
Ingestion endpoint URL for data delivery. |
token_lifetime_minutes |
int | None
|
JWS token lifetime in minutes. |
status |
str | None
|
Provisioning status (for example |
error_message |
str | None
|
Error details when status indicates failure. |
webex_byova.models.datasource.DataSourceCreate
Bases: BaseModel
Payload for POST /dataSources.
Attributes:
| Name | Type | Description |
|---|---|---|
audience |
str
|
Virtual agent or application audience name. |
subject |
str
|
Data subject identifier. |
nonce |
str
|
Unique nonce string. |
schema_id |
str
|
UUID of the BYODS schema to use. |
url |
str
|
Ingestion endpoint URL. |
token_lifetime_minutes |
int
|
JWS token lifetime in minutes. |
webex_byova.models.datasource.DataSourceUpdate
Bases: BaseModel
Payload for PUT /dataSources/{id}.
All fields are optional; only provided fields are sent to the API.
model_dump_api
model_dump_api() -> dict[str, Any]
Serialize for the Webex API using camelCase field names.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary with |
webex_byova.models.datasource.DataSourceListItem
Bases: BaseModel
Item in the GET /dataSources/ list response.
webex_byova.models.schema.Schema
Bases: BaseModel
Data source schema available for BYODS registration.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Unique schema UUID. |
app_type |
str | None
|
Application type identifier. |
created_at |
str | None
|
ISO 8601 creation timestamp. |
protocol |
str | None
|
Data delivery protocol. |
service_type |
str | None
|
Service type classification. |
url |
str | None
|
Schema documentation or reference URL. |
webex_byova.models.webhook.WebhookRegistration
Bases: BaseModel
Registered Webex webhook.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Unique webhook identifier. |
name |
str | None
|
Human-readable webhook name. |
target_url |
str | None
|
HTTPS URL that receives webhook payloads. |
resource |
str | None
|
Webhook resource type (for example |
event |
str | None
|
Event name (for example |
filter |
str | None
|
Optional webhook filter expression. |
secret |
str | None
|
Shared secret for payload verification. |
status |
str | None
|
Webhook status from Webex. |
created |
str | None
|
ISO 8601 creation timestamp. |
owned_by |
str | None
|
Owner identifier. |
webex_byova.models.webhook.WebhookUpdate
Bases: BaseModel
Payload for PUT /webhooks/{id}.
model_dump_api
model_dump_api() -> dict[str, Any]
Serialize for the Webex API using camelCase field names.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary with |
webex_byova.models.webhook.ServiceAppWebhookEvent
Bases: BaseModel
Parsed serviceApp authorized or deauthorized webhook payload.
from_payload
classmethod
from_payload(payload: dict[str, Any]) -> ServiceAppWebhookEvent
Parse a raw webhook JSON payload into a structured event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payload
|
dict[str, Any]
|
Raw webhook JSON from Webex. |
required |
Returns:
| Type | Description |
|---|---|
ServiceAppWebhookEvent
|
Parsed |
webex_byova.models.webhook.ServiceAppAuthorizedResult
Bases: BaseModel
Result of handling a serviceApp authorized event.
Attributes:
| Name | Type | Description |
|---|---|---|
org_id |
str
|
Decoded organization ID. |
tokens |
Any
|
Service App tokens fetched for the org. |
event |
str
|
Event name ( |
webex_byova.models.webhook.ServiceAppDeauthorizedResult
Bases: BaseModel
Result of handling a serviceApp deauthorized event.
Attributes:
| Name | Type | Description |
|---|---|---|
org_id |
str
|
Organization ID that was deauthorized. |
event |
str
|
Event name ( |