# Spectrum ## Domain Types ### DNS - `DNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the application. - `type?: "CNAME" | "ADDRESS"` The type of DNS record associated with the application. - `"CNAME"` - `"ADDRESS"` ### Edge IPs - `EdgeIPs = Dynamic | Static` The anycast edge IP configuration for the hostname of this application. - `Dynamic` - `connectivity?: "all" | "ipv4" | "ipv6"` The IP versions supported for inbound connections on Spectrum anycast IPs. - `"all"` - `"ipv4"` - `"ipv6"` - `type?: "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. - `"dynamic"` - `Static` - `ips?: Array` The array of customer owned IPs we broadcast via anycast for this hostname and application. - `type?: "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. - `"static"` ### Origin DNS - `OriginDNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the origin. - `ttl?: number` The TTL of our resolution of your DNS record in seconds. - `type?: "" | "A" | "AAAA" | "SRV"` The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records. - `""` - `"A"` - `"AAAA"` - `"SRV"` ### Origin Port - `OriginPort = number | string` 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. - `number` - `string` # Analytics # Aggregates # Currents ## Get current aggregated analytics `client.spectrum.analytics.aggregates.currents.get(CurrentGetParamsparams, RequestOptionsoptions?): CurrentGetResponse` **get** `/zones/{zone_id}/spectrum/analytics/aggregate/current` Retrieves analytics aggregated from the last minute of usage on Spectrum applications underneath a given zone. ### Parameters - `params: CurrentGetParams` - `zone_id: string` Path param: Identifier. - `appID?: string` Query param: Comma-delimited list of Spectrum Application Id(s). If provided, the response will be limited to Spectrum Application Id(s) that match. - `colo_name?: string` Query param: Co-location identifier. ### Returns - `CurrentGetResponse = Array` - `appID: string` Application identifier. - `bytesEgress: number` Number of bytes sent - `bytesIngress: number` Number of bytes received - `connections: number` Number of connections - `durationAvg: number` Average duration of connections ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const currents = await client.spectrum.analytics.aggregates.currents.get({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(currents); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "appID": "023e105f4ecef8ad9ca31a8372d0c353", "bytesEgress": 0, "bytesIngress": 0, "connections": 0, "durationAvg": 0 } ] } ``` ## Domain Types ### Current Get Response - `CurrentGetResponse = Array` - `appID: string` Application identifier. - `bytesEgress: number` Number of bytes sent - `bytesIngress: number` Number of bytes received - `connections: number` Number of connections - `durationAvg: number` Average duration of connections # Events ## Domain Types ### Dimension - `Dimension = "event" | "appID" | "coloName" | "ipVersion"` - `"event"` - `"appID"` - `"coloName"` - `"ipVersion"` # Bytimes ## Get analytics by time `client.spectrum.analytics.events.bytimes.get(BytimeGetParamsparams, RequestOptionsoptions?): BytimeGetResponse` **get** `/zones/{zone_id}/spectrum/analytics/events/bytime` Retrieves a list of aggregate metrics grouped by time interval. ### Parameters - `params: BytimeGetParams` - `zone_id: string` Path param: Identifier. - `time_delta: "year" | "quarter" | "month" | 5 more` Query param: Used to select time series resolution. - `"year"` - `"quarter"` - `"month"` - `"week"` - `"day"` - `"hour"` - `"dekaminute"` - `"minute"` - `dimensions?: Array` Query param: 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. | - `"event"` - `"appID"` - `"coloName"` - `"ipVersion"` - `filters?: string` Query param: 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 | - `metrics?: Array<"count" | "bytesIngress" | "bytesEgress" | 4 more>` Query param: 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. | - `"count"` - `"bytesIngress"` - `"bytesEgress"` - `"durationAvg"` - `"durationMedian"` - `"duration90th"` - `"duration99th"` - `since?: string` Query param: Start of time interval to query, defaults to `until` - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. - `sort?: Array` Query param: The sort order for the result set; sort fields must be included in `metrics` or `dimensions`. - `until?: string` Query param: End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. ### Returns - `BytimeGetResponse` - `data: Array` List of columns returned by the analytics query. - `dimensions?: Array` - `metrics?: Array | Array>` - `Array` - `Array>` - `data_lag: number` Number of seconds between current time and last processed event, i.e. how many seconds of data could be missing. - `max: Record` Maximum result for each selected metrics across all data. - `min: Record` Minimum result for each selected metrics across all data. - `query: Query` - `dimensions?: Array` 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. | - `"event"` - `"appID"` - `"coloName"` - `"ipVersion"` - `filters?: string` 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?: number` Limit number of returned metrics. - `metrics?: Array<"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. | - `"count"` - `"bytesIngress"` - `"bytesEgress"` - `"durationAvg"` - `"durationMedian"` - `"duration90th"` - `"duration99th"` - `since?: string` Start of time interval to query, defaults to `until` - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. - `sort?: Array` The sort order for the result set; sort fields must be included in `metrics` or `dimensions`. - `until?: string` End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. - `rows: number` Total number of rows in the result. - `totals: Record` Total result for each selected metrics across all data. - `time_intervals?: Array>` List of time interval buckets: [start, end] ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const bytime = await client.spectrum.analytics.events.bytimes.get({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', time_delta: 'minute', }); console.log(bytime.data); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "data": [ { "dimensions": [ "string" ], "metrics": [ 0 ] } ], "data_lag": 3, "max": { "bytesEgress": 100, "bytesIngress": 50 }, "min": { "bytesEgress": 100, "bytesIngress": 50 }, "query": { "dimensions": [ "event", "appID" ], "filters": "event==disconnect%20AND%20coloName!=SFO", "limit": 0, "metrics": [ "count", "bytesIngress" ], "since": "2014-01-01T05:20:00.12345Z", "sort": [ "+count", "-bytesIngress" ], "until": "2014-01-01T05:20:00.12345Z" }, "rows": 5, "totals": { "bytesEgress": 100, "bytesIngress": 50 }, "time_intervals": [ [ "2014-01-01T05:20:00.12345Z" ] ] } } ``` ## Domain Types ### Bytime Get Response - `BytimeGetResponse` - `data: Array` List of columns returned by the analytics query. - `dimensions?: Array` - `metrics?: Array | Array>` - `Array` - `Array>` - `data_lag: number` Number of seconds between current time and last processed event, i.e. how many seconds of data could be missing. - `max: Record` Maximum result for each selected metrics across all data. - `min: Record` Minimum result for each selected metrics across all data. - `query: Query` - `dimensions?: Array` 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. | - `"event"` - `"appID"` - `"coloName"` - `"ipVersion"` - `filters?: string` 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?: number` Limit number of returned metrics. - `metrics?: Array<"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. | - `"count"` - `"bytesIngress"` - `"bytesEgress"` - `"durationAvg"` - `"durationMedian"` - `"duration90th"` - `"duration99th"` - `since?: string` Start of time interval to query, defaults to `until` - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. - `sort?: Array` The sort order for the result set; sort fields must be included in `metrics` or `dimensions`. - `until?: string` End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. - `rows: number` Total number of rows in the result. - `totals: Record` Total result for each selected metrics across all data. - `time_intervals?: Array>` List of time interval buckets: [start, end] # Summaries ## Get analytics summary `client.spectrum.analytics.events.summaries.get(SummaryGetParamsparams, RequestOptionsoptions?): SummaryGetResponse` **get** `/zones/{zone_id}/spectrum/analytics/events/summary` Retrieves a list of summarised aggregate metrics over a given time period. ### Parameters - `params: SummaryGetParams` - `zone_id: string` Path param: Identifier. - `dimensions?: Array` Query param: 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. | - `"event"` - `"appID"` - `"coloName"` - `"ipVersion"` - `filters?: string` Query param: 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 | - `metrics?: Array<"count" | "bytesIngress" | "bytesEgress" | 4 more>` Query param: 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. | - `"count"` - `"bytesIngress"` - `"bytesEgress"` - `"durationAvg"` - `"durationMedian"` - `"duration90th"` - `"duration99th"` - `since?: string` Query param: Start of time interval to query, defaults to `until` - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. - `sort?: Array` Query param: The sort order for the result set; sort fields must be included in `metrics` or `dimensions`. - `until?: string` Query param: End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. ### Returns - `SummaryGetResponse` - `data: Array` List of columns returned by the analytics query. - `dimensions?: Array` - `metrics?: Array | Array>` - `Array` - `Array>` - `data_lag: number` Number of seconds between current time and last processed event, i.e. how many seconds of data could be missing. - `max: Record` Maximum result for each selected metrics across all data. - `min: Record` Minimum result for each selected metrics across all data. - `query: Query` - `dimensions?: Array` 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. | - `"event"` - `"appID"` - `"coloName"` - `"ipVersion"` - `filters?: string` 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?: number` Limit number of returned metrics. - `metrics?: Array<"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. | - `"count"` - `"bytesIngress"` - `"bytesEgress"` - `"durationAvg"` - `"durationMedian"` - `"duration90th"` - `"duration99th"` - `since?: string` Start of time interval to query, defaults to `until` - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. - `sort?: Array` The sort order for the result set; sort fields must be included in `metrics` or `dimensions`. - `until?: string` End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. - `rows: number` Total number of rows in the result. - `totals: Record` Total result for each selected metrics across all data. - `time_intervals?: Array>` List of time interval buckets: [start, end] ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const summary = await client.spectrum.analytics.events.summaries.get({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(summary.data); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "data": [ { "dimensions": [ "string" ], "metrics": [ 0 ] } ], "data_lag": 3, "max": { "bytesEgress": 100, "bytesIngress": 50 }, "min": { "bytesEgress": 100, "bytesIngress": 50 }, "query": { "dimensions": [ "event", "appID" ], "filters": "event==disconnect%20AND%20coloName!=SFO", "limit": 0, "metrics": [ "count", "bytesIngress" ], "since": "2014-01-01T05:20:00.12345Z", "sort": [ "+count", "-bytesIngress" ], "until": "2014-01-01T05:20:00.12345Z" }, "rows": 5, "totals": { "bytesEgress": 100, "bytesIngress": 50 }, "time_intervals": [ [ "2014-01-01T05:20:00.12345Z" ] ] } } ``` ## Domain Types ### Summary Get Response - `SummaryGetResponse` - `data: Array` List of columns returned by the analytics query. - `dimensions?: Array` - `metrics?: Array | Array>` - `Array` - `Array>` - `data_lag: number` Number of seconds between current time and last processed event, i.e. how many seconds of data could be missing. - `max: Record` Maximum result for each selected metrics across all data. - `min: Record` Minimum result for each selected metrics across all data. - `query: Query` - `dimensions?: Array` 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. | - `"event"` - `"appID"` - `"coloName"` - `"ipVersion"` - `filters?: string` 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?: number` Limit number of returned metrics. - `metrics?: Array<"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. | - `"count"` - `"bytesIngress"` - `"bytesEgress"` - `"durationAvg"` - `"durationMedian"` - `"duration90th"` - `"duration99th"` - `since?: string` Start of time interval to query, defaults to `until` - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. - `sort?: Array` The sort order for the result set; sort fields must be included in `metrics` or `dimensions`. - `until?: string` End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. - `rows: number` Total number of rows in the result. - `totals: Record` Total result for each selected metrics across all data. - `time_intervals?: Array>` List of time interval buckets: [start, end] # Apps ## List Spectrum applications `client.spectrum.apps.list(AppListParamsparams, RequestOptionsoptions?): V4PagePaginationArray` **get** `/zones/{zone_id}/spectrum/apps` Retrieves a list of currently existing Spectrum applications inside a zone. ### Parameters - `params: AppListParams` - `zone_id: string` Path param: Zone identifier. - `direction?: "asc" | "desc"` Query param: Sets the direction by which results are ordered. - `"asc"` - `"desc"` - `order?: "protocol" | "app_id" | "created_on" | 2 more` Query param: Application field by which results are ordered. - `"protocol"` - `"app_id"` - `"created_on"` - `"modified_on"` - `"dns"` - `page?: number` Query param: Page number of paginated results. This parameter is required in order to use other pagination parameters. If included in the query, `result_info` will be present in the response. - `per_page?: number` Query param: Sets the maximum number of results per page. ### Returns - `AppListResponse = SpectrumConfigAppConfig | SpectrumConfigPaygoAppConfig` - `SpectrumConfigAppConfig` - `id: string` App identifier. - `created_on: string` When the Application was created. - `dns: DNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the application. - `type?: "CNAME" | "ADDRESS"` The type of DNS record associated with the application. - `"CNAME"` - `"ADDRESS"` - `modified_on: string` When the Application was last modified. - `protocol: string` 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: "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. - `"direct"` - `"http"` - `"https"` - `argo_smart_routing?: boolean` Enables Argo Smart Routing for this application. Notes: Only available for TCP applications with traffic_type set to "direct". - `edge_ips?: EdgeIPs` The anycast edge IP configuration for the hostname of this application. - `Dynamic` - `connectivity?: "all" | "ipv4" | "ipv6"` The IP versions supported for inbound connections on Spectrum anycast IPs. - `"all"` - `"ipv4"` - `"ipv6"` - `type?: "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. - `"dynamic"` - `Static` - `ips?: Array` The array of customer owned IPs we broadcast via anycast for this hostname and application. - `type?: "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. - `"static"` - `ip_firewall?: boolean` Enables IP Access Rules for this application. Notes: Only available for TCP applications. - `origin_direct?: Array` List of origin IP addresses. Array may contain multiple IP addresses for load balancing. - `origin_dns?: OriginDNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the origin. - `ttl?: number` The TTL of our resolution of your DNS record in seconds. - `type?: "" | "A" | "AAAA" | "SRV"` The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records. - `""` - `"A"` - `"AAAA"` - `"SRV"` - `origin_port?: 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. - `number` - `string` - `proxy_protocol?: "off" | "v1" | "v2" | "simple"` Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol. - `"off"` - `"v1"` - `"v2"` - `"simple"` - `tls?: "off" | "flexible" | "full" | "strict"` The type of TLS termination associated with the application. - `"off"` - `"flexible"` - `"full"` - `"strict"` - `SpectrumConfigPaygoAppConfig` - `id: string` App identifier. - `created_on: string` When the Application was created. - `dns: DNS` The name and type of DNS record for the Spectrum application. - `modified_on: string` When the Application was last modified. - `protocol: string` 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?: Array` List of origin IP addresses. Array may contain multiple IP addresses for load balancing. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const appListResponse of client.spectrum.apps.list({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', })) { console.log(appListResponse); } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2014-01-01T05:20:00.12345Z", "dns": { "name": "ssh.example.com", "type": "CNAME" }, "modified_on": "2014-01-01T05:20:00.12345Z", "protocol": "tcp/22", "traffic_type": "direct", "argo_smart_routing": true, "edge_ips": { "connectivity": "all", "type": "dynamic" }, "ip_firewall": false, "origin_direct": [ "tcp://127.0.0.1:8080" ], "origin_dns": { "name": "origin.example.com", "ttl": 600, "type": "" }, "origin_port": 22, "proxy_protocol": "off", "tls": "off" } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Get Spectrum application configuration `client.spectrum.apps.get(stringappId, AppGetParamsparams, RequestOptionsoptions?): AppGetResponse` **get** `/zones/{zone_id}/spectrum/apps/{app_id}` Gets the application configuration of a specific application inside a zone. ### Parameters - `appId: string` App identifier. - `params: AppGetParams` - `zone_id: string` Zone identifier. ### Returns - `AppGetResponse = SpectrumConfigAppConfig | SpectrumConfigPaygoAppConfig` - `SpectrumConfigAppConfig` - `id: string` App identifier. - `created_on: string` When the Application was created. - `dns: DNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the application. - `type?: "CNAME" | "ADDRESS"` The type of DNS record associated with the application. - `"CNAME"` - `"ADDRESS"` - `modified_on: string` When the Application was last modified. - `protocol: string` 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: "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. - `"direct"` - `"http"` - `"https"` - `argo_smart_routing?: boolean` Enables Argo Smart Routing for this application. Notes: Only available for TCP applications with traffic_type set to "direct". - `edge_ips?: EdgeIPs` The anycast edge IP configuration for the hostname of this application. - `Dynamic` - `connectivity?: "all" | "ipv4" | "ipv6"` The IP versions supported for inbound connections on Spectrum anycast IPs. - `"all"` - `"ipv4"` - `"ipv6"` - `type?: "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. - `"dynamic"` - `Static` - `ips?: Array` The array of customer owned IPs we broadcast via anycast for this hostname and application. - `type?: "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. - `"static"` - `ip_firewall?: boolean` Enables IP Access Rules for this application. Notes: Only available for TCP applications. - `origin_direct?: Array` List of origin IP addresses. Array may contain multiple IP addresses for load balancing. - `origin_dns?: OriginDNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the origin. - `ttl?: number` The TTL of our resolution of your DNS record in seconds. - `type?: "" | "A" | "AAAA" | "SRV"` The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records. - `""` - `"A"` - `"AAAA"` - `"SRV"` - `origin_port?: 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. - `number` - `string` - `proxy_protocol?: "off" | "v1" | "v2" | "simple"` Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol. - `"off"` - `"v1"` - `"v2"` - `"simple"` - `tls?: "off" | "flexible" | "full" | "strict"` The type of TLS termination associated with the application. - `"off"` - `"flexible"` - `"full"` - `"strict"` - `SpectrumConfigPaygoAppConfig` - `id: string` App identifier. - `created_on: string` When the Application was created. - `dns: DNS` The name and type of DNS record for the Spectrum application. - `modified_on: string` When the Application was last modified. - `protocol: string` 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?: Array` List of origin IP addresses. Array may contain multiple IP addresses for load balancing. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const app = await client.spectrum.apps.get('023e105f4ecef8ad9ca31a8372d0c353', { zone_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(app); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2014-01-01T05:20:00.12345Z", "dns": { "name": "ssh.example.com", "type": "CNAME" }, "modified_on": "2014-01-01T05:20:00.12345Z", "protocol": "tcp/22", "traffic_type": "direct", "argo_smart_routing": true, "edge_ips": { "connectivity": "all", "type": "dynamic" }, "ip_firewall": false, "origin_direct": [ "tcp://127.0.0.1:8080" ], "origin_dns": { "name": "origin.example.com", "ttl": 600, "type": "" }, "origin_port": 22, "proxy_protocol": "off", "tls": "off" } } ``` ## Create Spectrum application using a name for the origin `client.spectrum.apps.create(AppCreateParamsparams, RequestOptionsoptions?): AppCreateResponse` **post** `/zones/{zone_id}/spectrum/apps` Creates a new Spectrum application from a configuration using a name for the origin. ### Parameters - `AppCreateParams = SpectrumConfigAppConfig | SpectrumConfigPaygoAppConfig` - `AppCreateParamsBase` - `SpectrumConfigAppConfig extends AppCreateParamsBase` - `SpectrumConfigPaygoAppConfig extends AppCreateParamsBase` ### Returns - `AppCreateResponse = SpectrumConfigAppConfig | SpectrumConfigPaygoAppConfig` - `SpectrumConfigAppConfig` - `id: string` App identifier. - `created_on: string` When the Application was created. - `dns: DNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the application. - `type?: "CNAME" | "ADDRESS"` The type of DNS record associated with the application. - `"CNAME"` - `"ADDRESS"` - `modified_on: string` When the Application was last modified. - `protocol: string` 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: "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. - `"direct"` - `"http"` - `"https"` - `argo_smart_routing?: boolean` Enables Argo Smart Routing for this application. Notes: Only available for TCP applications with traffic_type set to "direct". - `edge_ips?: EdgeIPs` The anycast edge IP configuration for the hostname of this application. - `Dynamic` - `connectivity?: "all" | "ipv4" | "ipv6"` The IP versions supported for inbound connections on Spectrum anycast IPs. - `"all"` - `"ipv4"` - `"ipv6"` - `type?: "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. - `"dynamic"` - `Static` - `ips?: Array` The array of customer owned IPs we broadcast via anycast for this hostname and application. - `type?: "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. - `"static"` - `ip_firewall?: boolean` Enables IP Access Rules for this application. Notes: Only available for TCP applications. - `origin_direct?: Array` List of origin IP addresses. Array may contain multiple IP addresses for load balancing. - `origin_dns?: OriginDNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the origin. - `ttl?: number` The TTL of our resolution of your DNS record in seconds. - `type?: "" | "A" | "AAAA" | "SRV"` The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records. - `""` - `"A"` - `"AAAA"` - `"SRV"` - `origin_port?: 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. - `number` - `string` - `proxy_protocol?: "off" | "v1" | "v2" | "simple"` Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol. - `"off"` - `"v1"` - `"v2"` - `"simple"` - `tls?: "off" | "flexible" | "full" | "strict"` The type of TLS termination associated with the application. - `"off"` - `"flexible"` - `"full"` - `"strict"` - `SpectrumConfigPaygoAppConfig` - `id: string` App identifier. - `created_on: string` When the Application was created. - `dns: DNS` The name and type of DNS record for the Spectrum application. - `modified_on: string` When the Application was last modified. - `protocol: string` 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?: Array` List of origin IP addresses. Array may contain multiple IP addresses for load balancing. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const app = await client.spectrum.apps.create({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', dns: {}, protocol: 'tcp/22', traffic_type: 'direct', }); console.log(app); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2014-01-01T05:20:00.12345Z", "dns": { "name": "ssh.example.com", "type": "CNAME" }, "modified_on": "2014-01-01T05:20:00.12345Z", "protocol": "tcp/22", "traffic_type": "direct", "argo_smart_routing": true, "edge_ips": { "connectivity": "all", "type": "dynamic" }, "ip_firewall": false, "origin_direct": [ "tcp://127.0.0.1:8080" ], "origin_dns": { "name": "origin.example.com", "ttl": 600, "type": "" }, "origin_port": 22, "proxy_protocol": "off", "tls": "off" } } ``` ## Update Spectrum application configuration using a name for the origin `client.spectrum.apps.update(stringappId, AppUpdateParamsparams, RequestOptionsoptions?): AppUpdateResponse` **put** `/zones/{zone_id}/spectrum/apps/{app_id}` Updates a previously existing application's configuration that uses a name for the origin. ### Parameters - `appId: string` App identifier. - `AppUpdateParams = SpectrumConfigAppConfig | SpectrumConfigPaygoAppConfig` - `AppUpdateParamsBase` - `SpectrumConfigAppConfig extends AppUpdateParamsBase` - `SpectrumConfigPaygoAppConfig extends AppUpdateParamsBase` ### Returns - `AppUpdateResponse = SpectrumConfigAppConfig | SpectrumConfigPaygoAppConfig` - `SpectrumConfigAppConfig` - `id: string` App identifier. - `created_on: string` When the Application was created. - `dns: DNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the application. - `type?: "CNAME" | "ADDRESS"` The type of DNS record associated with the application. - `"CNAME"` - `"ADDRESS"` - `modified_on: string` When the Application was last modified. - `protocol: string` 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: "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. - `"direct"` - `"http"` - `"https"` - `argo_smart_routing?: boolean` Enables Argo Smart Routing for this application. Notes: Only available for TCP applications with traffic_type set to "direct". - `edge_ips?: EdgeIPs` The anycast edge IP configuration for the hostname of this application. - `Dynamic` - `connectivity?: "all" | "ipv4" | "ipv6"` The IP versions supported for inbound connections on Spectrum anycast IPs. - `"all"` - `"ipv4"` - `"ipv6"` - `type?: "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. - `"dynamic"` - `Static` - `ips?: Array` The array of customer owned IPs we broadcast via anycast for this hostname and application. - `type?: "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. - `"static"` - `ip_firewall?: boolean` Enables IP Access Rules for this application. Notes: Only available for TCP applications. - `origin_direct?: Array` List of origin IP addresses. Array may contain multiple IP addresses for load balancing. - `origin_dns?: OriginDNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the origin. - `ttl?: number` The TTL of our resolution of your DNS record in seconds. - `type?: "" | "A" | "AAAA" | "SRV"` The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records. - `""` - `"A"` - `"AAAA"` - `"SRV"` - `origin_port?: 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. - `number` - `string` - `proxy_protocol?: "off" | "v1" | "v2" | "simple"` Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol. - `"off"` - `"v1"` - `"v2"` - `"simple"` - `tls?: "off" | "flexible" | "full" | "strict"` The type of TLS termination associated with the application. - `"off"` - `"flexible"` - `"full"` - `"strict"` - `SpectrumConfigPaygoAppConfig` - `id: string` App identifier. - `created_on: string` When the Application was created. - `dns: DNS` The name and type of DNS record for the Spectrum application. - `modified_on: string` When the Application was last modified. - `protocol: string` 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?: Array` List of origin IP addresses. Array may contain multiple IP addresses for load balancing. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const app = await client.spectrum.apps.update('023e105f4ecef8ad9ca31a8372d0c353', { zone_id: '023e105f4ecef8ad9ca31a8372d0c353', dns: {}, protocol: 'tcp/22', traffic_type: 'direct', }); console.log(app); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2014-01-01T05:20:00.12345Z", "dns": { "name": "ssh.example.com", "type": "CNAME" }, "modified_on": "2014-01-01T05:20:00.12345Z", "protocol": "tcp/22", "traffic_type": "direct", "argo_smart_routing": true, "edge_ips": { "connectivity": "all", "type": "dynamic" }, "ip_firewall": false, "origin_direct": [ "tcp://127.0.0.1:8080" ], "origin_dns": { "name": "origin.example.com", "ttl": 600, "type": "" }, "origin_port": 22, "proxy_protocol": "off", "tls": "off" } } ``` ## Delete Spectrum application `client.spectrum.apps.delete(stringappId, AppDeleteParamsparams, RequestOptionsoptions?): AppDeleteResponse | null` **delete** `/zones/{zone_id}/spectrum/apps/{app_id}` Deletes a previously existing application. ### Parameters - `appId: string` App identifier. - `params: AppDeleteParams` - `zone_id: string` Zone identifier. ### Returns - `AppDeleteResponse` - `id: string` Identifier. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const app = await client.spectrum.apps.delete('023e105f4ecef8ad9ca31a8372d0c353', { zone_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(app.id); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "023e105f4ecef8ad9ca31a8372d0c353" } } ``` ## Domain Types ### App List Response - `AppListResponse = SpectrumConfigAppConfig | SpectrumConfigPaygoAppConfig` - `SpectrumConfigAppConfig` - `id: string` App identifier. - `created_on: string` When the Application was created. - `dns: DNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the application. - `type?: "CNAME" | "ADDRESS"` The type of DNS record associated with the application. - `"CNAME"` - `"ADDRESS"` - `modified_on: string` When the Application was last modified. - `protocol: string` 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: "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. - `"direct"` - `"http"` - `"https"` - `argo_smart_routing?: boolean` Enables Argo Smart Routing for this application. Notes: Only available for TCP applications with traffic_type set to "direct". - `edge_ips?: EdgeIPs` The anycast edge IP configuration for the hostname of this application. - `Dynamic` - `connectivity?: "all" | "ipv4" | "ipv6"` The IP versions supported for inbound connections on Spectrum anycast IPs. - `"all"` - `"ipv4"` - `"ipv6"` - `type?: "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. - `"dynamic"` - `Static` - `ips?: Array` The array of customer owned IPs we broadcast via anycast for this hostname and application. - `type?: "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. - `"static"` - `ip_firewall?: boolean` Enables IP Access Rules for this application. Notes: Only available for TCP applications. - `origin_direct?: Array` List of origin IP addresses. Array may contain multiple IP addresses for load balancing. - `origin_dns?: OriginDNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the origin. - `ttl?: number` The TTL of our resolution of your DNS record in seconds. - `type?: "" | "A" | "AAAA" | "SRV"` The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records. - `""` - `"A"` - `"AAAA"` - `"SRV"` - `origin_port?: 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. - `number` - `string` - `proxy_protocol?: "off" | "v1" | "v2" | "simple"` Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol. - `"off"` - `"v1"` - `"v2"` - `"simple"` - `tls?: "off" | "flexible" | "full" | "strict"` The type of TLS termination associated with the application. - `"off"` - `"flexible"` - `"full"` - `"strict"` - `SpectrumConfigPaygoAppConfig` - `id: string` App identifier. - `created_on: string` When the Application was created. - `dns: DNS` The name and type of DNS record for the Spectrum application. - `modified_on: string` When the Application was last modified. - `protocol: string` 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?: Array` List of origin IP addresses. Array may contain multiple IP addresses for load balancing. ### App Get Response - `AppGetResponse = SpectrumConfigAppConfig | SpectrumConfigPaygoAppConfig` - `SpectrumConfigAppConfig` - `id: string` App identifier. - `created_on: string` When the Application was created. - `dns: DNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the application. - `type?: "CNAME" | "ADDRESS"` The type of DNS record associated with the application. - `"CNAME"` - `"ADDRESS"` - `modified_on: string` When the Application was last modified. - `protocol: string` 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: "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. - `"direct"` - `"http"` - `"https"` - `argo_smart_routing?: boolean` Enables Argo Smart Routing for this application. Notes: Only available for TCP applications with traffic_type set to "direct". - `edge_ips?: EdgeIPs` The anycast edge IP configuration for the hostname of this application. - `Dynamic` - `connectivity?: "all" | "ipv4" | "ipv6"` The IP versions supported for inbound connections on Spectrum anycast IPs. - `"all"` - `"ipv4"` - `"ipv6"` - `type?: "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. - `"dynamic"` - `Static` - `ips?: Array` The array of customer owned IPs we broadcast via anycast for this hostname and application. - `type?: "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. - `"static"` - `ip_firewall?: boolean` Enables IP Access Rules for this application. Notes: Only available for TCP applications. - `origin_direct?: Array` List of origin IP addresses. Array may contain multiple IP addresses for load balancing. - `origin_dns?: OriginDNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the origin. - `ttl?: number` The TTL of our resolution of your DNS record in seconds. - `type?: "" | "A" | "AAAA" | "SRV"` The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records. - `""` - `"A"` - `"AAAA"` - `"SRV"` - `origin_port?: 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. - `number` - `string` - `proxy_protocol?: "off" | "v1" | "v2" | "simple"` Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol. - `"off"` - `"v1"` - `"v2"` - `"simple"` - `tls?: "off" | "flexible" | "full" | "strict"` The type of TLS termination associated with the application. - `"off"` - `"flexible"` - `"full"` - `"strict"` - `SpectrumConfigPaygoAppConfig` - `id: string` App identifier. - `created_on: string` When the Application was created. - `dns: DNS` The name and type of DNS record for the Spectrum application. - `modified_on: string` When the Application was last modified. - `protocol: string` 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?: Array` List of origin IP addresses. Array may contain multiple IP addresses for load balancing. ### App Create Response - `AppCreateResponse = SpectrumConfigAppConfig | SpectrumConfigPaygoAppConfig` - `SpectrumConfigAppConfig` - `id: string` App identifier. - `created_on: string` When the Application was created. - `dns: DNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the application. - `type?: "CNAME" | "ADDRESS"` The type of DNS record associated with the application. - `"CNAME"` - `"ADDRESS"` - `modified_on: string` When the Application was last modified. - `protocol: string` 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: "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. - `"direct"` - `"http"` - `"https"` - `argo_smart_routing?: boolean` Enables Argo Smart Routing for this application. Notes: Only available for TCP applications with traffic_type set to "direct". - `edge_ips?: EdgeIPs` The anycast edge IP configuration for the hostname of this application. - `Dynamic` - `connectivity?: "all" | "ipv4" | "ipv6"` The IP versions supported for inbound connections on Spectrum anycast IPs. - `"all"` - `"ipv4"` - `"ipv6"` - `type?: "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. - `"dynamic"` - `Static` - `ips?: Array` The array of customer owned IPs we broadcast via anycast for this hostname and application. - `type?: "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. - `"static"` - `ip_firewall?: boolean` Enables IP Access Rules for this application. Notes: Only available for TCP applications. - `origin_direct?: Array` List of origin IP addresses. Array may contain multiple IP addresses for load balancing. - `origin_dns?: OriginDNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the origin. - `ttl?: number` The TTL of our resolution of your DNS record in seconds. - `type?: "" | "A" | "AAAA" | "SRV"` The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records. - `""` - `"A"` - `"AAAA"` - `"SRV"` - `origin_port?: 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. - `number` - `string` - `proxy_protocol?: "off" | "v1" | "v2" | "simple"` Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol. - `"off"` - `"v1"` - `"v2"` - `"simple"` - `tls?: "off" | "flexible" | "full" | "strict"` The type of TLS termination associated with the application. - `"off"` - `"flexible"` - `"full"` - `"strict"` - `SpectrumConfigPaygoAppConfig` - `id: string` App identifier. - `created_on: string` When the Application was created. - `dns: DNS` The name and type of DNS record for the Spectrum application. - `modified_on: string` When the Application was last modified. - `protocol: string` 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?: Array` List of origin IP addresses. Array may contain multiple IP addresses for load balancing. ### App Update Response - `AppUpdateResponse = SpectrumConfigAppConfig | SpectrumConfigPaygoAppConfig` - `SpectrumConfigAppConfig` - `id: string` App identifier. - `created_on: string` When the Application was created. - `dns: DNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the application. - `type?: "CNAME" | "ADDRESS"` The type of DNS record associated with the application. - `"CNAME"` - `"ADDRESS"` - `modified_on: string` When the Application was last modified. - `protocol: string` 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: "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. - `"direct"` - `"http"` - `"https"` - `argo_smart_routing?: boolean` Enables Argo Smart Routing for this application. Notes: Only available for TCP applications with traffic_type set to "direct". - `edge_ips?: EdgeIPs` The anycast edge IP configuration for the hostname of this application. - `Dynamic` - `connectivity?: "all" | "ipv4" | "ipv6"` The IP versions supported for inbound connections on Spectrum anycast IPs. - `"all"` - `"ipv4"` - `"ipv6"` - `type?: "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. - `"dynamic"` - `Static` - `ips?: Array` The array of customer owned IPs we broadcast via anycast for this hostname and application. - `type?: "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. - `"static"` - `ip_firewall?: boolean` Enables IP Access Rules for this application. Notes: Only available for TCP applications. - `origin_direct?: Array` List of origin IP addresses. Array may contain multiple IP addresses for load balancing. - `origin_dns?: OriginDNS` The name and type of DNS record for the Spectrum application. - `name?: string` The name of the DNS record associated with the origin. - `ttl?: number` The TTL of our resolution of your DNS record in seconds. - `type?: "" | "A" | "AAAA" | "SRV"` The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records. - `""` - `"A"` - `"AAAA"` - `"SRV"` - `origin_port?: 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. - `number` - `string` - `proxy_protocol?: "off" | "v1" | "v2" | "simple"` Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol. - `"off"` - `"v1"` - `"v2"` - `"simple"` - `tls?: "off" | "flexible" | "full" | "strict"` The type of TLS termination associated with the application. - `"off"` - `"flexible"` - `"full"` - `"strict"` - `SpectrumConfigPaygoAppConfig` - `id: string` App identifier. - `created_on: string` When the Application was created. - `dns: DNS` The name and type of DNS record for the Spectrum application. - `modified_on: string` When the Application was last modified. - `protocol: string` 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?: Array` List of origin IP addresses. Array may contain multiple IP addresses for load balancing. ### App Delete Response - `AppDeleteResponse` - `id: string` Identifier.