Skip to content
Start here

Spectrum

ModelsExpand Collapse
class DNS:

The name and type of DNS record for the Spectrum application.

name: Optional[str]

The name of the DNS record associated with the application.

formathostname
type: Optional[Literal["CNAME", "ADDRESS"]]

The type of DNS record associated with the application.

One of the following:
"CNAME"
"ADDRESS"

The anycast edge IP configuration for the hostname of this application.

One of the following:
class Dynamic:
connectivity: Optional[Literal["all", "ipv4", "ipv6"]]

The IP versions supported for inbound connections on Spectrum anycast IPs.

One of the following:
"all"
"ipv4"
"ipv6"
type: Optional[Literal["dynamic"]]

The type of edge IP configuration specified. Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the connectivity you specify. Only valid with CNAME DNS names.

class Static:
ips: Optional[List[str]]

The array of customer owned IPs we broadcast via anycast for this hostname and application.

type: Optional[Literal["static"]]

The type of edge IP configuration specified. Statically allocated edge IPs use customer IPs in accordance with the ips array you specify. Only valid with ADDRESS DNS names.

class OriginDNS:

The name and type of DNS record for the Spectrum application.

name: Optional[str]

The name of the DNS record associated with the origin.

formathostname
ttl: Optional[int]

The TTL of our resolution of your DNS record in seconds.

minimum600
type: Optional[Literal["", "A", "AAAA", "SRV"]]

The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records.

One of the following:
""
"A"
"AAAA"
"SRV"
Union[int, str]

The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example 1000, or a string to specify a range of origin ports, for example "1000-2000". Notes: If specifying a port range, the number of ports in the range must match the number of ports specified in the "protocol" field.

One of the following:
int
str

SpectrumAnalytics

SpectrumAnalyticsAggregates

SpectrumAnalyticsAggregatesCurrents

Get current aggregated analytics
spectrum.analytics.aggregates.currents.get(CurrentGetParams**kwargs) -> CurrentGetResponse
GET/zones/{zone_id}/spectrum/analytics/aggregate/current
ModelsExpand Collapse
List[CurrentGetResponseItem]
app_id: str

Application identifier.

maxLength32
bytes_egress: float

Number of bytes sent

bytes_ingress: float

Number of bytes received

connections: float

Number of connections

duration_avg: float

Average duration of connections

SpectrumAnalyticsEvents

ModelsExpand Collapse
Literal["event", "appID", "coloName", "ipVersion"]
One of the following:
"event"
"appID"
"coloName"
"ipVersion"

SpectrumAnalyticsEventsBytimes

Get analytics by time
spectrum.analytics.events.bytimes.get(BytimeGetParams**kwargs) -> BytimeGetResponse
GET/zones/{zone_id}/spectrum/analytics/events/bytime
ModelsExpand Collapse
class BytimeGetResponse:
data: List[Data]

List of columns returned by the analytics query.

dimensions: Optional[List[str]]
metrics: Optional[Union[List[float], List[List[float]], null]]
One of the following:
List[float]
List[List[float]]
data_lag: float

Number of seconds between current time and last processed event, i.e. how many seconds of data could be missing.

minimum0
max: Dict[str, float]

Maximum result for each selected metrics across all data.

min: Dict[str, float]

Minimum result for each selected metrics across all data.

query: Query
dimensions: Optional[List[Dimension]]

Can be used to break down the data by given attributes. Options are:

Dimension Name Example
event Connection Event connect, progress, disconnect, originError, clientFiltered
appID Application ID 40d67c87c6cd4b889a4fd57805225e85
coloName Colo Name SFO
ipVersion IP version used by the client 4, 6.
One of the following:
"event"
"appID"
"coloName"
"ipVersion"
filters: Optional[str]

Used to filter rows by one or more dimensions. Filters can be combined using OR and AND boolean logic. AND takes precedence over OR in all the expressions. The OR operator is defined using a comma (,) or OR keyword surrounded by whitespace. The AND operator is defined using a semicolon (;) or AND keyword surrounded by whitespace. Note that the semicolon is a reserved character in URLs (rfc1738) and needs to be percent-encoded as %3B. Comparison options are:

Operator Name URL Encoded
== Equals %3D%3D
!= Does not equals !%3D
> Greater Than %3E
< Less Than %3C
>= Greater than or equal to %3E%3D
<= Less than or equal to %3C%3D
limit: Optional[float]

Limit number of returned metrics.

metrics: Optional[List[Literal["count", "bytesIngress", "bytesEgress", 4 more]]]

One or more metrics to compute. Options are:

Metric Name Example Unit
count Count of total events 1000 Count
bytesIngress Sum of ingress bytes 1000 Sum
bytesEgress Sum of egress bytes 1000 Sum
durationAvg Average connection duration 1.0 Time in milliseconds
durationMedian Median connection duration 1.0 Time in milliseconds
duration90th 90th percentile connection duration 1.0 Time in milliseconds
duration99th 99th percentile connection duration 1.0 Time in milliseconds.
One of the following:
"count"
"bytesIngress"
"bytesEgress"
"durationAvg"
"durationMedian"
"duration90th"
"duration99th"
since: Optional[datetime]

Start of time interval to query, defaults to until - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified.

formatdate-time
sort: Optional[List[str]]

The sort order for the result set; sort fields must be included in metrics or dimensions.

until: Optional[datetime]

End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified.

formatdate-time
rows: float

Total number of rows in the result.

minimum0
totals: Dict[str, float]

Total result for each selected metrics across all data.

time_intervals: Optional[List[List[datetime]]]

List of time interval buckets: [start, end]

SpectrumAnalyticsEventsSummaries

Get analytics summary
spectrum.analytics.events.summaries.get(SummaryGetParams**kwargs) -> SummaryGetResponse
GET/zones/{zone_id}/spectrum/analytics/events/summary
ModelsExpand Collapse
class SummaryGetResponse:
data: List[Data]

List of columns returned by the analytics query.

dimensions: Optional[List[str]]
metrics: Optional[Union[List[float], List[List[float]], null]]
One of the following:
List[float]
List[List[float]]
data_lag: float

Number of seconds between current time and last processed event, i.e. how many seconds of data could be missing.

minimum0
max: Dict[str, float]

Maximum result for each selected metrics across all data.

min: Dict[str, float]

Minimum result for each selected metrics across all data.

query: Query
dimensions: Optional[List[Dimension]]

Can be used to break down the data by given attributes. Options are:

Dimension Name Example
event Connection Event connect, progress, disconnect, originError, clientFiltered
appID Application ID 40d67c87c6cd4b889a4fd57805225e85
coloName Colo Name SFO
ipVersion IP version used by the client 4, 6.
One of the following:
"event"
"appID"
"coloName"
"ipVersion"
filters: Optional[str]

Used to filter rows by one or more dimensions. Filters can be combined using OR and AND boolean logic. AND takes precedence over OR in all the expressions. The OR operator is defined using a comma (,) or OR keyword surrounded by whitespace. The AND operator is defined using a semicolon (;) or AND keyword surrounded by whitespace. Note that the semicolon is a reserved character in URLs (rfc1738) and needs to be percent-encoded as %3B. Comparison options are:

Operator Name URL Encoded
== Equals %3D%3D
!= Does not equals !%3D
> Greater Than %3E
< Less Than %3C
>= Greater than or equal to %3E%3D
<= Less than or equal to %3C%3D
limit: Optional[float]

Limit number of returned metrics.

metrics: Optional[List[Literal["count", "bytesIngress", "bytesEgress", 4 more]]]

One or more metrics to compute. Options are:

Metric Name Example Unit
count Count of total events 1000 Count
bytesIngress Sum of ingress bytes 1000 Sum
bytesEgress Sum of egress bytes 1000 Sum
durationAvg Average connection duration 1.0 Time in milliseconds
durationMedian Median connection duration 1.0 Time in milliseconds
duration90th 90th percentile connection duration 1.0 Time in milliseconds
duration99th 99th percentile connection duration 1.0 Time in milliseconds.
One of the following:
"count"
"bytesIngress"
"bytesEgress"
"durationAvg"
"durationMedian"
"duration90th"
"duration99th"
since: Optional[datetime]

Start of time interval to query, defaults to until - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified.

formatdate-time
sort: Optional[List[str]]

The sort order for the result set; sort fields must be included in metrics or dimensions.

until: Optional[datetime]

End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified.

formatdate-time
rows: float

Total number of rows in the result.

minimum0
totals: Dict[str, float]

Total result for each selected metrics across all data.

time_intervals: Optional[List[List[datetime]]]

List of time interval buckets: [start, end]

SpectrumApps

List Spectrum applications
spectrum.apps.list(AppListParams**kwargs) -> SyncV4PagePaginationArray[AppListResponse]
GET/zones/{zone_id}/spectrum/apps
Get Spectrum application configuration
spectrum.apps.get(strapp_id, AppGetParams**kwargs) -> AppGetResponse
GET/zones/{zone_id}/spectrum/apps/{app_id}
Create Spectrum application using a name for the origin
spectrum.apps.create(AppCreateParams**kwargs) -> AppCreateResponse
POST/zones/{zone_id}/spectrum/apps
Update Spectrum application configuration using a name for the origin
spectrum.apps.update(strapp_id, AppUpdateParams**kwargs) -> AppUpdateResponse
PUT/zones/{zone_id}/spectrum/apps/{app_id}
Delete Spectrum application
spectrum.apps.delete(strapp_id, AppDeleteParams**kwargs) -> AppDeleteResponse
DELETE/zones/{zone_id}/spectrum/apps/{app_id}
ModelsExpand Collapse
One of the following:
class SpectrumConfigAppConfig:
id: str

App identifier.

maxLength32
created_on: datetime

When the Application was created.

formatdate-time
dns: DNS

The name and type of DNS record for the Spectrum application.

modified_on: datetime

When the Application was last modified.

formatdate-time
protocol: str

The port configuration at Cloudflare's edge. May specify a single port, for example "tcp/1000", or a range of ports, for example "tcp/1000-2000".

traffic_type: Literal["direct", "http", "https"]

Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the protocol. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly.

One of the following:
"direct"
"http"
"https"
argo_smart_routing: Optional[bool]

Enables Argo Smart Routing for this application. Notes: Only available for TCP applications with traffic_type set to "direct".

edge_ips: Optional[EdgeIPs]

The anycast edge IP configuration for the hostname of this application.

ip_firewall: Optional[bool]

Enables IP Access Rules for this application. Notes: Only available for TCP applications.

origin_direct: Optional[List[str]]

List of origin IP addresses. Array may contain multiple IP addresses for load balancing.

origin_dns: Optional[OriginDNS]

The name and type of DNS record for the Spectrum application.

origin_port: Optional[OriginPort]

The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example 1000, or a string to specify a range of origin ports, for example "1000-2000". Notes: If specifying a port range, the number of ports in the range must match the number of ports specified in the "protocol" field.

maximum65535
minimum1
proxy_protocol: Optional[Literal["off", "v1", "v2", "simple"]]

Enables Proxy Protocol to the origin. Refer to Enable Proxy protocol for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.

One of the following:
"off"
"v1"
"v2"
"simple"
tls: Optional[Literal["off", "flexible", "full", "strict"]]

The type of TLS termination associated with the application.

One of the following:
"off"
"flexible"
"full"
"strict"
class SpectrumConfigPaygoAppConfig:
id: str

App identifier.

maxLength32
created_on: datetime

When the Application was created.

formatdate-time
dns: DNS

The name and type of DNS record for the Spectrum application.

modified_on: datetime

When the Application was last modified.

formatdate-time
protocol: str

The port configuration at Cloudflare's edge. May specify a single port, for example "tcp/1000", or a range of ports, for example "tcp/1000-2000".

origin_direct: Optional[List[str]]

List of origin IP addresses. Array may contain multiple IP addresses for load balancing.

One of the following:
class SpectrumConfigAppConfig:
id: str

App identifier.

maxLength32
created_on: datetime

When the Application was created.

formatdate-time
dns: DNS

The name and type of DNS record for the Spectrum application.

modified_on: datetime

When the Application was last modified.

formatdate-time
protocol: str

The port configuration at Cloudflare's edge. May specify a single port, for example "tcp/1000", or a range of ports, for example "tcp/1000-2000".

traffic_type: Literal["direct", "http", "https"]

Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the protocol. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly.

One of the following:
"direct"
"http"
"https"
argo_smart_routing: Optional[bool]

Enables Argo Smart Routing for this application. Notes: Only available for TCP applications with traffic_type set to "direct".

edge_ips: Optional[EdgeIPs]

The anycast edge IP configuration for the hostname of this application.

ip_firewall: Optional[bool]

Enables IP Access Rules for this application. Notes: Only available for TCP applications.

origin_direct: Optional[List[str]]

List of origin IP addresses. Array may contain multiple IP addresses for load balancing.

origin_dns: Optional[OriginDNS]

The name and type of DNS record for the Spectrum application.

origin_port: Optional[OriginPort]

The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example 1000, or a string to specify a range of origin ports, for example "1000-2000". Notes: If specifying a port range, the number of ports in the range must match the number of ports specified in the "protocol" field.

maximum65535
minimum1
proxy_protocol: Optional[Literal["off", "v1", "v2", "simple"]]

Enables Proxy Protocol to the origin. Refer to Enable Proxy protocol for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.

One of the following:
"off"
"v1"
"v2"
"simple"
tls: Optional[Literal["off", "flexible", "full", "strict"]]

The type of TLS termination associated with the application.

One of the following:
"off"
"flexible"
"full"
"strict"
class SpectrumConfigPaygoAppConfig:
id: str

App identifier.

maxLength32
created_on: datetime

When the Application was created.

formatdate-time
dns: DNS

The name and type of DNS record for the Spectrum application.

modified_on: datetime

When the Application was last modified.

formatdate-time
protocol: str

The port configuration at Cloudflare's edge. May specify a single port, for example "tcp/1000", or a range of ports, for example "tcp/1000-2000".

origin_direct: Optional[List[str]]

List of origin IP addresses. Array may contain multiple IP addresses for load balancing.

One of the following:
class SpectrumConfigAppConfig:
id: str

App identifier.

maxLength32
created_on: datetime

When the Application was created.

formatdate-time
dns: DNS

The name and type of DNS record for the Spectrum application.

modified_on: datetime

When the Application was last modified.

formatdate-time
protocol: str

The port configuration at Cloudflare's edge. May specify a single port, for example "tcp/1000", or a range of ports, for example "tcp/1000-2000".

traffic_type: Literal["direct", "http", "https"]

Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the protocol. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly.

One of the following:
"direct"
"http"
"https"
argo_smart_routing: Optional[bool]

Enables Argo Smart Routing for this application. Notes: Only available for TCP applications with traffic_type set to "direct".

edge_ips: Optional[EdgeIPs]

The anycast edge IP configuration for the hostname of this application.

ip_firewall: Optional[bool]

Enables IP Access Rules for this application. Notes: Only available for TCP applications.

origin_direct: Optional[List[str]]

List of origin IP addresses. Array may contain multiple IP addresses for load balancing.

origin_dns: Optional[OriginDNS]

The name and type of DNS record for the Spectrum application.

origin_port: Optional[OriginPort]

The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example 1000, or a string to specify a range of origin ports, for example "1000-2000". Notes: If specifying a port range, the number of ports in the range must match the number of ports specified in the "protocol" field.

maximum65535
minimum1
proxy_protocol: Optional[Literal["off", "v1", "v2", "simple"]]

Enables Proxy Protocol to the origin. Refer to Enable Proxy protocol for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.

One of the following:
"off"
"v1"
"v2"
"simple"
tls: Optional[Literal["off", "flexible", "full", "strict"]]

The type of TLS termination associated with the application.

One of the following:
"off"
"flexible"
"full"
"strict"
class SpectrumConfigPaygoAppConfig:
id: str

App identifier.

maxLength32
created_on: datetime

When the Application was created.

formatdate-time
dns: DNS

The name and type of DNS record for the Spectrum application.

modified_on: datetime

When the Application was last modified.

formatdate-time
protocol: str

The port configuration at Cloudflare's edge. May specify a single port, for example "tcp/1000", or a range of ports, for example "tcp/1000-2000".

origin_direct: Optional[List[str]]

List of origin IP addresses. Array may contain multiple IP addresses for load balancing.

One of the following:
class SpectrumConfigAppConfig:
id: str

App identifier.

maxLength32
created_on: datetime

When the Application was created.

formatdate-time
dns: DNS

The name and type of DNS record for the Spectrum application.

modified_on: datetime

When the Application was last modified.

formatdate-time
protocol: str

The port configuration at Cloudflare's edge. May specify a single port, for example "tcp/1000", or a range of ports, for example "tcp/1000-2000".

traffic_type: Literal["direct", "http", "https"]

Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the protocol. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly.

One of the following:
"direct"
"http"
"https"
argo_smart_routing: Optional[bool]

Enables Argo Smart Routing for this application. Notes: Only available for TCP applications with traffic_type set to "direct".

edge_ips: Optional[EdgeIPs]

The anycast edge IP configuration for the hostname of this application.

ip_firewall: Optional[bool]

Enables IP Access Rules for this application. Notes: Only available for TCP applications.

origin_direct: Optional[List[str]]

List of origin IP addresses. Array may contain multiple IP addresses for load balancing.

origin_dns: Optional[OriginDNS]

The name and type of DNS record for the Spectrum application.

origin_port: Optional[OriginPort]

The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example 1000, or a string to specify a range of origin ports, for example "1000-2000". Notes: If specifying a port range, the number of ports in the range must match the number of ports specified in the "protocol" field.

maximum65535
minimum1
proxy_protocol: Optional[Literal["off", "v1", "v2", "simple"]]

Enables Proxy Protocol to the origin. Refer to Enable Proxy protocol for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.

One of the following:
"off"
"v1"
"v2"
"simple"
tls: Optional[Literal["off", "flexible", "full", "strict"]]

The type of TLS termination associated with the application.

One of the following:
"off"
"flexible"
"full"
"strict"
class SpectrumConfigPaygoAppConfig:
id: str

App identifier.

maxLength32
created_on: datetime

When the Application was created.

formatdate-time
dns: DNS

The name and type of DNS record for the Spectrum application.

modified_on: datetime

When the Application was last modified.

formatdate-time
protocol: str

The port configuration at Cloudflare's edge. May specify a single port, for example "tcp/1000", or a range of ports, for example "tcp/1000-2000".

origin_direct: Optional[List[str]]

List of origin IP addresses. Array may contain multiple IP addresses for load balancing.

class AppDeleteResponse:
id: str

Identifier.

maxLength32