Skip to main content

Overview

Spectrum extends Cloudflare’s DDoS protection and performance to any TCP or UDP-based application. Use the Spectrum API to manage application configurations and view analytics.

Initialize the client

Apps

Manage Spectrum applications for TCP/UDP proxying.

Create an app

Create a new Spectrum application.
string
required
Zone identifier
string
required
The port configuration at Cloudflare’s edge. May specify a single port (e.g., "tcp/1000") or a range (e.g., "tcp/1000-2000")
object
required
The name and type of DNS record for the Spectrum application
'direct' | 'http' | 'https'
required
Determines how data travels from the edge to your origin:
  • direct - Send traffic directly to origin
  • http - Apply HTTP features
  • https - Apply HTTPS features
object
The name and type of DNS record for the origin
number | string
The destination port at the origin. Can be a single port or range
object
The anycast edge IP configuration for this application
boolean
Enable Argo Smart Routing (TCP applications with direct traffic only)
boolean
Enable IP Access Rules for this application
'off' | 'v1' | 'v2' | 'simple'
Enable Proxy Protocol to the origin
'off' | 'flexible' | 'full' | 'strict'
TLS encryption mode between Cloudflare and origin
string
App identifier
string
When the application was created
string
When the application was last modified

Update an app

Update an existing Spectrum application.

List apps

Retrieve a list of all Spectrum applications in a zone.

Get an app

Get the configuration of a specific Spectrum application.

Delete an app

Delete a Spectrum application.

Analytics

View analytics for Spectrum applications.
The analytics resource provides methods to retrieve traffic and performance metrics for your Spectrum applications.

Types

DNS

The name and type of DNS record for the Spectrum application.
string
The name of the DNS record associated with the application
'CNAME' | 'ADDRESS'
The type of DNS record

EdgeIPs

The anycast edge IP configuration. Dynamic configuration:
'dynamic'
Dynamically allocated edge IPs using Spectrum anycast IPs
'all' | 'ipv4' | 'ipv6'
The IP versions supported for inbound connections
Static configuration:
'static'
Statically allocated edge IPs using customer IPs
string[]
The array of customer owned IPs broadcast via anycast

OriginDNS

The name and type of DNS record for the origin.
string
The name of the DNS record associated with the origin
'' | 'A' | 'AAAA' | 'SRV'
The type of DNS record. Empty string specifies A/AAAA combination
number
The TTL of DNS resolution in seconds