Creates a new Spectrum application from a configuration using a name for the origin.
/zones/{zone}/spectrum/apps
post
Spectrum Applications
spectrum-applications-create-spectrum-application-using-a-name-for-the-origin
null null [
{
"in": "path",
"name": "zone",
"required": true,
"schema": {
"description": "Identifier",
"example": "023e105f4ecef8ad9ca31a8372d0c353",
"maxLength": 32,
"readOnly": true,
"type": "string"
}
}
] {
"content": {
"application/json": {
"schema": {
"properties": {
"argo_smart_routing": {
"default": false,
"description": "Enables Argo Smart Routing for this application.\nNotes: Only available for TCP applications with traffic_type set to \"direct\".",
"example": true,
"type": "boolean"
},
"dns": {
"description": "The name and type of DNS record for the Spectrum application.",
"properties": {
"name": {
"description": "The name of the DNS record associated with the application.",
"example": "ssh.example.com",
"format": "hostname",
"type": "string"
},
"type": {
"description": "The type of DNS record associated with the application.",
"enum": [
"CNAME",
"ADDRESS"
],
"example": "CNAME",
"type": "string"
}
},
"type": "object"
},
"edge_ips": {
"default": {
"connectivity": "all",
"type": "dynamic"
},
"description": "The anycast edge IP configuration for the hostname of this application.",
"oneOf": [
{
"properties": {
"connectivity": {
"description": "The IP versions supported for inbound connections on Spectrum anycast IPs.",
"enum": [
"all",
"ipv4",
"ipv6"
],
"example": "all",
"type": "string"
},
"type": {
"description": "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.",
"enum": [
"dynamic"
],
"example": "dynamic",
"type": "string"
}
},
"type": "object"
},
{
"properties": {
"ips": {
"description": "The array of customer owned IPs we broadcast via anycast for this hostname and application.",
"example": [
"192.0.2.1"
],
"items": {
"description": "Edge anycast IPs.",
"example": "192.0.2.1",
"type": "string"
},
"type": "array"
},
"type": {
"description": "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.",
"enum": [
"static"
],
"example": "static",
"type": "string"
}
},
"type": "object"
}
]
},
"ip_firewall": {
"description": "Enables IP Access Rules for this application.\nNotes: Only available for TCP applications.",
"example": true,
"type": "boolean"
},
"origin_dns": {
"description": "The name and type of DNS record for the Spectrum application.",
"properties": {
"name": {
"description": "The name of the DNS record associated with the origin.",
"example": "origin.example.com",
"format": "hostname",
"type": "string"
},
"ttl": {
"description": "The TTL of our resolution of your DNS record in seconds.",
"minimum": 600,
"type": "integer"
},
"type": {
"description": "The type of DNS record associated with the origin. \"\" is used to specify a combination of A/AAAA records.",
"enum": [
"",
"A",
"AAAA",
"SRV"
],
"example": "",
"type": "string"
}
},
"type": "object"
},
"origin_port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"description": "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\"`.\nNotes: If specifying a port range, the number of ports in the range must match the number of ports specified in the \"protocol\" field.",
"example": 22,
"maximum": 65535,
"minimum": 1
},
"protocol": {
"description": "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\"`.",
"example": "tcp/22",
"type": "string"
},
"proxy_protocol": {
"default": "off",
"description": "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.",
"enum": [
"off",
"v1",
"v2",
"simple"
],
"example": "off",
"type": "string"
},
"tls": {
"description": "The type of TLS termination associated with the application.",
"enum": [
"off",
"flexible",
"full",
"strict"
],
"example": "full",
"type": "string"
},
"traffic_type": {
"default": "direct",
"description": "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.",
"enum": [
"direct",
"http",
"https"
],
"example": "direct",
"type": "string"
}
},
"required": [
"protocol",
"dns",
"origin_dns",
"origin_port"
],
"type": "object"
}
}
},
"required": true
} {
"200": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"allOf": [
{
"properties": {
"errors": {
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
},
"messages": {
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "string"
}
]
},
"success": {
"description": "Whether the API call was successful",
"enum": [
true
],
"example": true,
"type": "boolean"
}
},
"required": [
"success",
"errors",
"messages",
"result"
],
"type": "object"
},
{
"properties": {
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "string"
}
],
"nullable": true
}
}
}
],
"type": "object"
},
{
"properties": {
"result": {
"properties": {
"argo_smart_routing": {
"default": false,
"description": "Enables Argo Smart Routing for this application.\nNotes: Only available for TCP applications with traffic_type set to \"direct\".",
"example": true,
"type": "boolean"
},
"created_on": {
"description": "When the Application was created.",
"example": "2014-01-02T02:20:00Z",
"format": "date-time",
"readOnly": true,
"type": "string"
},
"dns": {
"description": "The name and type of DNS record for the Spectrum application.",
"properties": {
"name": {
"description": "The name of the DNS record associated with the application.",
"example": "ssh.example.com",
"format": "hostname",
"type": "string"
},
"type": {
"description": "The type of DNS record associated with the application.",
"enum": [
"CNAME",
"ADDRESS"
],
"example": "CNAME",
"type": "string"
}
},
"type": "object"
},
"edge_ips": {
"default": {
"connectivity": "all",
"type": "dynamic"
},
"description": "The anycast edge IP configuration for the hostname of this application.",
"oneOf": [
{
"properties": {
"connectivity": {
"description": "The IP versions supported for inbound connections on Spectrum anycast IPs.",
"enum": [
"all",
"ipv4",
"ipv6"
],
"example": "all",
"type": "string"
},
"type": {
"description": "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.",
"enum": [
"dynamic"
],
"example": "dynamic",
"type": "string"
}
},
"type": "object"
},
{
"properties": {
"ips": {
"description": "The array of customer owned IPs we broadcast via anycast for this hostname and application.",
"example": [
"192.0.2.1"
],
"items": {
"description": "Edge anycast IPs.",
"example": "192.0.2.1",
"type": "string"
},
"type": "array"
},
"type": {
"description": "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.",
"enum": [
"static"
],
"example": "static",
"type": "string"
}
},
"type": "object"
}
]
},
"id": {
"description": "Application identifier.",
"example": "ea95132c15732412d22c1476fa83f27a",
"maxLength": 32,
"readOnly": true,
"type": "string"
},
"ip_firewall": {
"description": "Enables IP Access Rules for this application.\nNotes: Only available for TCP applications.",
"example": true,
"type": "boolean"
},
"modified_on": {
"description": "When the Application was last modified.",
"example": "2014-01-02T02:20:00Z",
"format": "date-time",
"readOnly": true,
"type": "string"
},
"origin_dns": {
"description": "The name and type of DNS record for the Spectrum application.",
"properties": {
"name": {
"description": "The name of the DNS record associated with the origin.",
"example": "origin.example.com",
"format": "hostname",
"type": "string"
},
"ttl": {
"description": "The TTL of our resolution of your DNS record in seconds.",
"minimum": 600,
"type": "integer"
},
"type": {
"description": "The type of DNS record associated with the origin. \"\" is used to specify a combination of A/AAAA records.",
"enum": [
"",
"A",
"AAAA",
"SRV"
],
"example": "",
"type": "string"
}
},
"type": "object"
},
"origin_port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"description": "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\"`.\nNotes: If specifying a port range, the number of ports in the range must match the number of ports specified in the \"protocol\" field.",
"example": 22,
"maximum": 65535,
"minimum": 1
},
"protocol": {
"description": "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\"`.",
"example": "tcp/22",
"type": "string"
},
"proxy_protocol": {
"default": "off",
"description": "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.",
"enum": [
"off",
"v1",
"v2",
"simple"
],
"example": "off",
"type": "string"
},
"tls": {
"description": "The type of TLS termination associated with the application.",
"enum": [
"off",
"flexible",
"full",
"strict"
],
"example": "full",
"type": "string"
},
"traffic_type": {
"default": "direct",
"description": "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.",
"enum": [
"direct",
"http",
"https"
],
"example": "direct",
"type": "string"
}
}
}
}
}
]
}
}
},
"description": "Create Spectrum application using a name for the origin response"
},
"4xx": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"allOf": [
{
"allOf": [
{
"properties": {
"errors": {
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
},
"messages": {
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "string"
}
]
},
"success": {
"description": "Whether the API call was successful",
"enum": [
true
],
"example": true,
"type": "boolean"
}
},
"required": [
"success",
"errors",
"messages",
"result"
],
"type": "object"
},
{
"properties": {
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "string"
}
],
"nullable": true
}
}
}
],
"type": "object"
},
{
"properties": {
"result": {
"properties": {
"argo_smart_routing": {
"default": false,
"description": "Enables Argo Smart Routing for this application.\nNotes: Only available for TCP applications with traffic_type set to \"direct\".",
"example": true,
"type": "boolean"
},
"created_on": {
"description": "When the Application was created.",
"example": "2014-01-02T02:20:00Z",
"format": "date-time",
"readOnly": true,
"type": "string"
},
"dns": {
"description": "The name and type of DNS record for the Spectrum application.",
"properties": {
"name": {
"description": "The name of the DNS record associated with the application.",
"example": "ssh.example.com",
"format": "hostname",
"type": "string"
},
"type": {
"description": "The type of DNS record associated with the application.",
"enum": [
"CNAME",
"ADDRESS"
],
"example": "CNAME",
"type": "string"
}
},
"type": "object"
},
"edge_ips": {
"default": {
"connectivity": "all",
"type": "dynamic"
},
"description": "The anycast edge IP configuration for the hostname of this application.",
"oneOf": [
{
"properties": {
"connectivity": {
"description": "The IP versions supported for inbound connections on Spectrum anycast IPs.",
"enum": [
"all",
"ipv4",
"ipv6"
],
"example": "all",
"type": "string"
},
"type": {
"description": "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.",
"enum": [
"dynamic"
],
"example": "dynamic",
"type": "string"
}
},
"type": "object"
},
{
"properties": {
"ips": {
"description": "The array of customer owned IPs we broadcast via anycast for this hostname and application.",
"example": [
"192.0.2.1"
],
"items": {
"description": "Edge anycast IPs.",
"example": "192.0.2.1",
"type": "string"
},
"type": "array"
},
"type": {
"description": "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.",
"enum": [
"static"
],
"example": "static",
"type": "string"
}
},
"type": "object"
}
]
},
"id": {
"description": "Application identifier.",
"example": "ea95132c15732412d22c1476fa83f27a",
"maxLength": 32,
"readOnly": true,
"type": "string"
},
"ip_firewall": {
"description": "Enables IP Access Rules for this application.\nNotes: Only available for TCP applications.",
"example": true,
"type": "boolean"
},
"modified_on": {
"description": "When the Application was last modified.",
"example": "2014-01-02T02:20:00Z",
"format": "date-time",
"readOnly": true,
"type": "string"
},
"origin_dns": {
"description": "The name and type of DNS record for the Spectrum application.",
"properties": {
"name": {
"description": "The name of the DNS record associated with the origin.",
"example": "origin.example.com",
"format": "hostname",
"type": "string"
},
"ttl": {
"description": "The TTL of our resolution of your DNS record in seconds.",
"minimum": 600,
"type": "integer"
},
"type": {
"description": "The type of DNS record associated with the origin. \"\" is used to specify a combination of A/AAAA records.",
"enum": [
"",
"A",
"AAAA",
"SRV"
],
"example": "",
"type": "string"
}
},
"type": "object"
},
"origin_port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"description": "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\"`.\nNotes: If specifying a port range, the number of ports in the range must match the number of ports specified in the \"protocol\" field.",
"example": 22,
"maximum": 65535,
"minimum": 1
},
"protocol": {
"description": "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\"`.",
"example": "tcp/22",
"type": "string"
},
"proxy_protocol": {
"default": "off",
"description": "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.",
"enum": [
"off",
"v1",
"v2",
"simple"
],
"example": "off",
"type": "string"
},
"tls": {
"description": "The type of TLS termination associated with the application.",
"enum": [
"off",
"flexible",
"full",
"strict"
],
"example": "full",
"type": "string"
},
"traffic_type": {
"default": "direct",
"description": "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.",
"enum": [
"direct",
"http",
"https"
],
"example": "direct",
"type": "string"
}
}
}
}
}
]
},
{
"properties": {
"errors": {
"allOf": [
{
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
}
],
"example": [
{
"code": 7003,
"message": "No route for the URI"
}
],
"minLength": 1
},
"messages": {
"allOf": [
{
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
}
],
"example": []
},
"result": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"success": {
"description": "Whether the API call was successful",
"enum": [
false
],
"example": false,
"type": "boolean"
}
},
"required": [
"success",
"errors",
"messages",
"result"
],
"type": "object"
}
]
}
}
},
"description": "Create Spectrum application using a name for the origin response failure"
}
} [
{
"api_email": [],
"api_key": []
},
{
"api_token": []
}
]