Pause a space's traffic rules
Parks every rule at the edge and keeps the space paused, so a rule it declares later is parked as it arrives. The space serves as if it declared none. The rules are kept, so resume puts them back without the author writing them again.
/v1/spaces/{spaceId}/rules/pauseAuthorizationBearer token · headerrequiredSpace key (sfc_…) for an unclaimed anonymous Space. Also the fragment of its claim URL and the token of its /__/<key> door. A publish without a credential returns it in claim with the claim link. With the key, getSpace extends the Space's expiry window, getSpaceVersion follows its publish, createSpaceOpenLink returns its reusable open link, and restoreSpace undoes a deleteSpace while the claim window remains open.
AuthorizationBearer token · headerrequiredBetter Auth session, OAuth access token, OAuth client-credentials token, or sfm_ Space machine credential.
AuthorizationOAuth2 access token · headerrequiredOAuth 2.0 with explicit Spacefast capability scopes. Use the authorization-code flow for people and client credentials for machines.
spaces:writespaceIdstringrequiredResponse for status 200
$schemastring<uri>Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.
dataTrafficRulesrequiredA space's traffic rules and what the edge is doing with them.
Show propertiesHide properties
rulesTrafficRuleState[]requiredThe space's rules, in the order the edge reads them.
Show propertiesHide properties
TrafficRuleStateidstringrequiredSpacefast's id for this rule.
namestringrequiredThe rule's name at the edge, derived from what it does.
handlestring | nullrequiredThe name the author gave the rule, or null when they gave it none.
kindstringrequiredWhat the rule does.
firewallcacheBypassredirectrewriteheaderoriginstringrequiredWhere the rule was declared: file in the space's own source, config in the live version's config, overlay in the space settings, platform by Spacefast.
fileconfigoverlayplatformsourceRefstring | nullrequiredThe config the rule was read from, for a rule a version declared.
placementstringrequiredWhere the rule runs. edge answers before the request reaches the space.
edgeoriginplacementReasonstring | nullrequiredWhy the rule runs at the space instead of the edge, or null for a rule that runs at the edge. placement_off: this space does not run its rules at the edge, so nothing about the rule was judged. Every other code is an edge_ineligible_* one, and says what about the rule the edge could not carry. edge_ineligible_capture: the rule captures part of the path, or its destination uses a capture. edge_ineligible_condition: it matches on a request fact the edge would read differently from the space, such as a country, a cookie, a query string, or the user agent. edge_ineligible_destination: it sends the visitor to another origin. edge_ineligible_status: its redirect status is not 301, 302, 307, or 308. edge_ineligible_shadowed: a published file already answers that path and the rule is not forced. edge_ineligible_order: an earlier rule that stayed at the space could answer the same request first. edge_ineligible_reentry: it is a rewrite, and the space has to match its own rules against the rewritten path. edge_ineligible_proxy: it proxies to another origin. edge_ineligible_not_found: it answers 404. edge_ineligible_path_preservation: it is a whole-host redirect, and the edge cannot carry the path across. edge_ineligible_platform_header: it sets or removes a header the platform owns. edge_ineligible_header_folds: more than one rule sets the same header, and the space folds them where the edge would replace. edge_ineligible_quota: the space has more placeable rules than the edge holds.
desiredStatestringrequiredWhat the rule is meant to do. suspended is a paused space's parked rule.
enableddisabledsuspendededgeStatestringrequiredWhat the edge last said about the rule. pending means the edge accepted it and is still applying it; over_quota means the space has more rules than the edge allows and this one was left off.
pendingliveinvalidover_quotafailedunknowndefinitionTrafficRuleDefinition | nullrequiredThe rule as its author wrote it. Null for a rule the edge still holds but the space no longer declares: the next reconcile removes it, and there is no authored rule left to show.
Show propertiesHide properties
namestringName for this rule: lowercase letters, digits, - and _, up to 61 characters. Names the rule in the CLI and the API.
descriptionstringWhat this rule is for.
actionstringrequiredblock answers without reaching the space; challenge asks for proof of a human.
blockchallengestatusintegerStatus a blocked request gets. Defaults to 403. Blocks only.
matchTrafficRuleMatchrequiredRequest attributes the rule looks at. At least one.
Show propertiesHide properties
pathTrafficRuleValueWhat the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.
Show propertiesHide properties
stringstringstringopstringrequiredHow the request attribute is compared to the value.
eqneqininCidrcontainsstartsWithendsWithwildcardexistsvaluestringSingle value to compare against.
valuesstring[]Values to compare against, for in and inCidr.
notbooleanMatch when the comparison does not hold.
hostTrafficRuleValueWhat the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.
methodTrafficRuleValueWhat the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.
ipTrafficRuleValueWhat the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.
countryTrafficRuleValueTwo-letter country codes.
asnTrafficRuleValueWhat the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.
userAgentTrafficRuleValueWhat the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.
refererTrafficRuleValueWhat the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.
headerobjectPer-name conditions: { "x-api-client": { "op": "exists" } }.
cookieobjectPer-name conditions: { "x-api-client": { "op": "exists" } }.
queryobjectPer-name conditions: { "x-api-client": { "op": "exists" } }.
extensionTrafficRuleValuePath extension, without the dot.
ja3TrafficRuleValueWhat the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.
ja4TrafficRuleValueWhat the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.
anybooleanFire when any match field holds. Defaults to false: all of them have to.
namestringName for this rule: lowercase letters, digits, - and _, up to 61 characters. Names the rule in the CLI and the API.
descriptionstringWhat this rule is for.
matchTrafficRuleMatchrequiredRequest attributes the rule looks at. At least one.
anybooleanFire when any match field holds. Defaults to false: all of them have to.
sourcestringrequiredThe path the rule matches.
destinationstringWhere a redirect sends the request.
statusintegerThe status a redirect answers with.
headersstring[]The response header names a header rule sets or removes.
forcebooleanTrue when a redirect answers even if a published file can serve its source. Absent on a header rule.
queryobjectThe query parameters a redirect matches, each mapped to the capture name it fills. Absent when the rule matches on the path only.
conditionalbooleanTrue when the rule also matches on a country, a language, a cookie, or the user agent. Only a _redirects line can state those, so a rule with this flag cannot be written in the space settings.
nulllastErrorobject | nullrequiredWhy the edge refused the rule, or null.
Show propertiesHide properties
codestringrequiredmessagestringrequirednullquotaobject | nullrequiredHow many rules this space has at the edge and how many it may have. Null means the space has no edge yet, so there is no allowance to spend. stale: false is the edge's own answer; stale: true is our record of it, because the edge did not answer.
Show propertiesHide properties
usedintegerrequiredRules this space currently has at the edge.
limitinteger | nullrequiredRules the edge allows this space. Null when the edge could not be read, because the allowance is the edge's to state and this platform does not know it.
Show propertiesHide properties
integernullstalebooleanrequiredTrue when the edge could not be reached, so these numbers are this platform's own record rather than the edge's answer.
nullpausedbooleanrequiredTrue while the space is paused. A paused space serves as if it declared none, and a rule it declares while paused is parked as it arrives.
hostnamesstring[]requiredThe hostnames these rules answer on.
collapsedCollapsedTrafficRule[]requiredRules the space declares that the edge never got, and why.
Show propertiesHide properties
CollapsedTrafficRuleruleNamestringrequiredThe rule's name at the edge.
originstringrequiredWhere the rule was declared: file in the space's own source, config in the live version's config, overlay in the space settings, platform by Spacefast.
fileconfigoverlayplatformreasonstringrequiredfingerprint: an earlier rule already does the same thing. name: an earlier rule already has this name.
fingerprintnameProblem details (RFC 9457). Any 4xx/5xx response is one application/problem+json document.
$schemastring<uri>Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.
typestringrequiredProblem type URI resolving to the error docs page. The server derives it mechanically from code against the docs origin.
titlestringrequiredShort human-readable summary of the problem type. The server derives it mechanically from code.
statusintegerrequiredHTTP status code of this response, repeated in the body.
detailstringrequiredHuman-readable failure explanation for this occurrence.
codestringrequiredStable snake_case error code naming the failed public contract.
pointerstringRFC 6901 JSON Pointer into the failing request field, for example "/files/37/path", on validation failures.
detailsobjectMachine-readable context for the error code.
fixstringOne sentence on what to do about this error code, the same text as the type page. Read it before retrying.
suggestionsstring[]Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.
nextstring[]Copy-pasteable commands or API requests an agent can run next.
requestIdstringrequiredThe request id to quote when contacting support.