REST API

The base path is /FCC. The style is a POST with a request body, even for a read. That matches the convention of Group Update. The UI Backend forwards every /FCC/ call without a change and only adds the identity headers. One path is the exception: the UI Backend never forwards /FCC/internal/ for a browser. See Service-to-service endpoint. Every enumeration value on the wire is upper case with underscores.

The endpoints fall into eight groups:

Identity contract

The service has no authentication of its own. See No authentication of its own. Every request is trusted on the strength of the headers below. The UI Backend adds them, and the identity filter of this service reads them.

Header Value Mandatory

X-FT-User-Id

The id of the portal user.

Contractually yes. Its absence does not fail the request, and the audit columns then fall back to the literal system.

X-FT-Domain-Id

The domain of the portal user.

Only with the scope LIST. A super-domain caller may omit it.

X-FT-Domain-Scope

ALL for a super-domain caller, LIST otherwise.

Yes. An absent or unreadable value answers HTTP 403, never a wildcard. The scope LIST with an empty id list also answers 403, because a caller without a visible domain can see no campaign.

X-FT-Domain-Ids

The visible domain ids, comma separated, with the scope LIST. Above 200 ids, split them across numbered headers, 200 per header.

With the scope LIST.

X-FT-Client-Type

The portal type.

Contractually yes. It is carried for the log only.

The filter concatenates the numbered headers until one is absent and de-duplicates them into one ordered list. A blank or non-numeric entry is dropped and never causes an error. A malformed id can only shrink the visible set of the caller, never widen it.

Three more headers are optional and are never an authorization input: the zone and the two date patterns of the caller. See Where the domain name, the creator and the dates come from.

Two FT codes answer HTTP 403

A client that switches on the numeric code must handle both.

Code Raised by Meaning

9401

The identity filter, before any controller

The headers were not satisfactory: an absent or unreadable scope, or the scope LIST with an empty id list. The description names the header. This is almost always a proxy misconfiguration and not a client bug.

9403

A controller

The headers were fine and the request was refused: a domain outside the visible set of the caller, or an administration write without the scope ALL.

The last three digits of a code mirror the HTTP status everywhere except here. An identity that was never established is a different incident from a domain that was denied. One code for both would make a proxy misconfiguration indistinguishable from an ordinary refusal in a log.

The error code catalog

The codes live in the 9000 range. The UI Backend may translate them into its own catalog.

Code HTTP Raised by

9400

400

A validation failure, a body the service cannot read, or a multipart request without the file part.

9401

403

The identity filter. See Two FT codes answer HTTP 403.

9403

403

A domain refusal in a controller.

9404

404

An unknown resource, including one that exists in a domain the caller cannot see.

9409

409

The frozen device set, and a state the campaign cannot leave for the requested action.

9413

413

An upload above the limit. The message names the maximum when one is knowable.

9415

415

A request or a part with a content type nothing accepts.

9500

500

The catch-all. Never a stack trace, always the generic text.

9503

503

The result store cannot take or answer rows. The description says whether it is unreachable or behind on its migrations. See The three ClickHouse states.

The last two codes exist because the framework resolves its own exceptions last, while a catch-all handler in an advice runs first. Without dedicated handlers the catch-all would answer HTTP 500 for a request the framework had a perfectly good answer for. Do not delete those handlers.

What each domain scope sees

The scope LIST: every read of the own tables is narrowed to the visible domains. Every read of the schema of the Auto Configuration Server (ACS) is narrowed by the domain column of the device. Above 1000 visible domains the narrowing happens in memory, because that is the limit of an Oracle list.

The scope ALL: no domain predicate at all.

A campaign outside the visible domains of the caller answers HTTP 404, never 403. A 403 would confirm that a campaign with that id exists in somebody else domain.

The fleet of a campaign has a second bound. Both scopes resolve the device list, the count and the saved fleet of a campaign inside the domain where the campaign was created. The caller scope is intersected with the subtree of that domain. See The fleet stays inside the domain of the campaign.

An empty intersection selects nothing

Several bodies carry a domain list of their own. Such a list narrows inside the scope of the caller and can never widen it. One resolver decides that for every one of them by intersecting the two sets.

The case worth writing down is the one that looks harmless. A caller with the scope LIST who names only invisible domains gets an empty intersection, and the endpoint answers an empty result. It does not answer an empty id list.

Resolved scope What every read does with it

Unrestricted

No domain predicate at all. Only a caller with the scope ALL who named no domain gets it.

A set of ids

A list predicate, or the in-memory narrowing above 1000 ids.

Nothing

The caller sees nothing. The service answers an empty result and reads no table.

An empty list has no SQL form, so every read treats an empty id list exactly as an absent one: as apply no predicate. That means everything. An empty intersection must therefore stay empty. As an empty list it would give a caller who asked for another domain the whole installation. That happens in silence, on the one request that most deserves a refusal.

Five places depend on the distinction, and all five answer before any read. Those are the catalog, the device resolve, the save-time device resolve, the report scope and the domain setting read.

The domain of a new campaign

Scope Rule

LIST

The domain comes from the identity header X-FT-Domain-Id. It must be positive and one of the visible domains of the caller. A missing or non-positive value answers HTTP 400, and a domain outside the visible set answers HTTP 403. The body field is ignored on a create and never read on an update, because an update could otherwise move a campaign out of a sub-domain into the own domain of the caller.

ALL

The domain comes from the body field domainId, and the field is optional. An absent value, null, 0 and -1 all mean the super domain, and the service stores 0. The service stores any other value as sent, and checks that the domain exists. A create with a domainId that does not exist, or is outside the scope of the caller, answers HTTP 400 the domain id=<n> of the new test does not exist, and nothing is saved. The super domain is exempt from this check.

A campaign filed under the super domain belongs to the operator. No caller with the scope LIST can read or change it.

The domain of a campaign never changes after the create. An update ignores the body field and uses the stored value.

Campaign endpoints

PUT /FCC/item/details

Create or update a campaign and its child rows in one transaction. An empty id creates, and an id updates.

The units are not in the field names. The total duration is in hours. The single duration and the batch interval are in minutes.

A caller who sends 60 meaning minutes gets a campaign of sixty hours. The service accepts it, dispatches it, and the mistake appears days later.

The field names are shared with the XML configuration document, because the document takes its element names from the same records. One setting therefore has one spelling in the JSON and in the file. The columns behind them keep their own older names, and that mapping is declared once on the entity.

The request carries these fields.

Field Type Notes

id

Number

Empty to create.

domainId

Number

Read only with the scope ALL. A domain that does not exist answers HTTP 400. See The domain of a new campaign.

name

Text, required, up to 255

activation

Block

The timing of the campaign. See the field list below.

reactivation

Block

The recurrence rule. See Reactivation is a rule, not a count.

configs

List, required

What to measure and on which devices. Several elements are accepted, and each becomes its own run. See Several configurations, and whose limit bounds them.

The activation block carries thirteen fields:

  • type, either Immediately or Scheduled, and an absent value means the first one.

  • date, required with Scheduled, refused without it, and it must be in the future. You may set it only while the campaign is not active, because a rebooking would move a commitment the poller already holds. Saving never starts anything.

  • totalTestDuration in hours and singleTestDuration in minutes, both required and positive. Their quotient must fit at least one iteration. See The window must fit one iteration.

  • batchInterval in minutes, failedTestRetries, wanUsageRetries, onlyOnlineDevices and requestDeviceConnect.

  • wanSampleGapSec, wanRetryIntervalSec, wanStepTimeoutSec and diagTimeoutSec. They fall back to the domain settings and the global defaults at save time.

Each element of configs carries id, manufacturer, model, sourceType, conditionId, selectedDevices, unselectedDevices and settings. The source type decides the fleet. See Where the fleet comes from.

The settings list holds exactly one object. That object carries both field sets, because the two shapes travel as one object. Three of its fields belong to either kind.

Field Notes

id

The id of the settings row. The read answers it and the save ignores it, because one settings row belongs to one configuration and is found by it.

type

Required, and the one place the contract states the type. It selects the half of the object the service reads. It also decides the settings table and the content of the command. A configuration without it cannot be dispatched at all.

speedTierMode

Either default or manual: where the tier came from. See Where a speed tier comes from.

The two kind-specific halves:

Kind Fields

"Speed test"

downloadUrl, uploadUrl, wanDownloadThreshold, wanUploadThreshold, speedTierDownload, speedTierUpload, downloadConnections, uploadConnections, fileSizeUpload, testMode, timeBasedDurationSec, timeBasedIntervalSec, speedSuccessPercent, hubbId

"Latency"

testHost, wanUsageThreshold, speedTier, repetitions, timeoutMs, dataBlockSize, latencySuccessMs, hubbId

The four latency parameters of the device are the Technical Report 181 (TR-181) ping parameters the ACS drives. The latency bound is not one of them: it is the pass rule this service applies. A ping is symmetric, so there is no upload counterpart to the threshold and the tier.

The answer is the id of the campaign.

Example request
PUT /FCC/item/details
X-FT-Domain-Scope: LIST
X-FT-Domain-Id: 17
X-FT-User-Id: 501

{
  "id": null,
  "name": "Downtown fiber compliance - Q3",
  "activation": {
    "type": "Scheduled",
    "date": "2026-11-01T06:00:00Z",
    "onlyOnlineDevices": true,
    "totalTestDuration": 24,
    "singleTestDuration": 30,
    "batchInterval": 0,
    "failedTestRetries": 1,
    "wanUsageRetries": 3,
    "requestDeviceConnect": false
  },
  "reactivation": {
    "type": "Daily",
    "repeatEvery": 1,
    "startsOn": "2026-11-01T06:00:00Z",
    "ends": "After",
    "reactivationCount": 7
  },
  "configs": [
    {
      "id": null,
      "manufacturer": "ALCL",
      "model": "Nokia WiFi Beacon 4",
      "sourceType": "All",
      "conditionId": null,
      "selectedDevices": [],
      "unselectedDevices": [10236],
      "settings": [
        {
          "type": "Speed test",
          "wanDownloadThreshold": 5000,
          "wanUploadThreshold": 1000,
          "speedTierDownload": 100000,
          "speedTierUpload": 20000,
          "downloadUrl": "http://speedtest.example.net/download",
          "uploadUrl": "http://speedtest.example.net/upload",
          "downloadConnections": 4,
          "uploadConnections": 2,
          "fileSizeUpload": 50000000,
          "testMode": "FILE_BASED"
        }
      ]
    }
  ]
}

Validation rules

Rule Status Detail

configs is empty, or holds more than the configuration limit

400

The message names both figures and the property. The limit is of this save and not of the ACS. See Several configurations, and whose limit bounds them.

The settings type is absent

400

The message says what the type decides. The service never guesses it from whichever half is filled in.

settings is absent, empty, or holds two objects

400

One object already carries both directions of a speed test and both ends of a latency one, and one run carries one set.

The settings object carries the fields of the other kind

400

The message names the offending fields. See The settings block must match the type.

sourceType is absent

400

No default. A guess from the filled fields turns a request for twelve devices into a request for every device of a model.

sourceType is All without a manufacturer and a model

400

Without them it would select every device the caller can see, and no screen offers that.

sourceType is Condition without a condition id

400

The saved condition is the selection. Without it the configuration names a manufacturer and a model alone. That is a much larger fleet.

sourceType is Condition and the condition is not fully translatable

400

The message names the column key and the operator. See Which saved conditions this service translates.

sourceType is Condition on an installation without the portal grant

400

The message says so and names the two grants. The other three sources are unaffected.

The latency host is missing or blank

400

The one value with no default anywhere. The ACS cannot ping nothing and refuses such a command.

A latency repetition count, timeout or block size is present and not positive

400

Checked for the sign only, and only when given. The three fall back to the global defaults. They are refused and never clamped, because zero repetitions measure nothing and a zero timeout is a ping that has already timed out.

A duration is present and not positive, or the pair gives no iteration

400

Presence is required at activation time and not at save time. See The window must fit one iteration.

The reactivation count is outside 0 to 9

400

The same validator also refuses a rule without a type, a period outside 1 to 365, and the bound After without a count.

testMode is TIME_BASED without a duration

400

The duration is what the ACS writes to the device. Without it the device transfers for its own default. That is a measurement whose window nobody chose.

A time-based field on a file-based block

400

Refused and not ignored. A file-based transfer ends when the file ends, so the value would be stored, snapshotted and applied by nothing.

The time-based interval is above the duration

400

The interval is the step of the result table, so a longer step yields a table with no rows.

The time-based duration is longer than one iteration

400

The message names both numbers in both units. An iteration has to hold a download leg, an upload leg and the WAN samples between them, so a longer duration is a test that can never finish.

testMode is TIME_BASED over a fleet that is not opted in

400

Every model needs a capability row with the time-based flag, and a model without a row counts as not supporting it. See [time-based-is-opt-in].

A connection count is outside 1 to 4

400

Four is a product cap and not a protocol limit. More parallel sessions measure the capacity of the test server rather than the line of the subscriber.

A connection count is above the ceiling of the fleet

400

Refused and never clamped. See The capability ceiling is refused, not clamped.

A diagnostic URL is not an absolute URL with a host

400

The scheme must be http, https or ftp. FTP is deliberately allowed, because TR-143 names it and installations do run such servers. A blank value is left to the activation check.

A tier or a threshold is present and not positive

400

The sign only. A tier is never matched against the preset list. See Tiers are served, not hard-coded in the UI.

selectedDevices names an unknown or invisible device

400

The message names the count and the ids. The two cases are indistinguishable on purpose, because neither comes back from the ACS table. An exclusion that matches nothing is the opposite rule and is not an error.

A serial number matches no visible device

400

The message names the count and the first 20 offenders in your own spelling. The wizard reports such a serial and continues. See Missing and duplicate serial numbers are two different defects.

A selection resolves to more devices than the limit

400

Counted before a single row is read, and the message names both figures. See The selection limit is counted before any row is read.

A device added to the fleet has no serial number

400

The message names the offending ids. On an update only the newly added devices are checked. See A device without a serial number is refused twice.

The fleet is edited after the first run

409

The message points at the export and the import. They answer the campaign as a new unsaved one. See [frozen-configurations].

Every accepted save also writes one audit row in the same transaction.

The settings are resolved before they are validated

The field rules apply to the resolved records. Those are what the service stores and dispatches, and never to the raw body. The save walks the three-level chain first and hands the result to the validators.

Judging the body instead made the per-domain level unreachable in both directions, in silence.

Direction What the earlier order did

A domain default that satisfies a rule

The per-domain latency host could never satisfy the check, because the host was judged before the domain value was read. The one request the column exists for was refused, and the whole feature was inert.

A domain default that breaks a rule

A malformed per-domain URL reached the database unchecked, because the check only ever saw the URL of the request. The campaign then failed at the ACS, naming a URL the operator never typed.

The type check stays first, and it is the exception.

It is about which block the body carries. No resolution can change that, and none may hide it. A latency campaign carrying speed settings has to be refused as the contradiction it is, not filled in from a domain default and saved.

A caller can observe two consequences.

  • An update loads its campaign before the body is judged, so a caller who may not see the campaign gets the 404 before any 400 about the body. A body is only worth judging for somebody entitled to save it.

  • The chain is walked exactly once. The validated values and the stored values are the same objects.

The settings block must match the type

The service refuses a body whose settings do not match the type. It refuses a missing block of the right kind, and also a present block of the wrong kind.

The type alone decides what the run snapshot copies and what the command carries. A latency campaign with only speed settings would be saved happily, dispatch a command without its ping block, and come back refused from the ACS. That is a campaign that never runs, discovered hours later in the run history instead of in the form the operator is looking at.

The extra block is refused for the same reason in reverse. An operator who filled in a ping host and then switched the type would otherwise save a campaign that measures something else.

On a save the service deletes the settings row of the other kind. That is why the read answers exactly one of the two blocks.

The contract once carried the type in two places, and a disagreement was refused. That refusal was correct and useless: picking a winner would decide for the operator which half of their screen was right. The duplicate field is therefore gone, and the type lives in the settings object alone. One fact spelled twice can disagree, and one fact spelled once cannot.

The window must fit one iteration

iterations = totalDurationH * 60 / singleDurationMin
iterations >= 1

That expression is exactly the one the ACS derives its iteration count with. That is why the service checks it instead of approximating it. A campaign that fails it would otherwise be accepted, dispatched, acknowledged and measure nothing: the ACS computes zero iterations and the run closes empty.

The message states the computed count and not only the two inputs:

activation.totalTestDuration=2 and activation.singleTestDuration=180 give 0 iterations;
the window must fit at least 1

The integer division is deliberate and matches the ACS. One hour with a 45-minute iteration gives one iteration, not 1.33.

Presence is judged at activation time and not at save time.

The save refuses a present value that is not positive, and a pair that can never work. It does not require either field, and a requirement would break a supported flow. Saving a campaign with no timing at all is legal. Drafting a campaign and filling in its schedule later is how operators work. A stored campaign with an empty iteration length could otherwise never be saved again, not even for a rename.

The activation check is the gate. It refuses to activate a campaign without either duration and reports both in one message.

Reactivation is a rule, not a count

Field Meaning

type

Daily or None, required when the block is present. None is the explicit spelling of runs once, and it wins over the rest of the block: a count beside it is ignored rather than refused, because the operator chose None on the screen. The read answers an object and never an empty value, so a UI always has something to bind to. Daily is the only repeating unit the engine can run.

repeatEvery

Days between two runs. An absent value means 1. That is the constant the planner used to hard-code. The range is 1 to 365.

startsOn

The anchor the slots are counted from. Run n opens at the anchor plus n periods. An absent value means the start of the previous run. An anchored campaign stays on its grid however late a run opened.

ends

After says the operator chose to bound the campaign by the count. An absent value says they did not say, and the count bounds it either way. The value After without a count is refused, because after what is otherwise unanswered.

reactivationCount

How many runs the campaign owes after the first. The range is 0 to 9. See [reactivation-days-range].

An absent block is a one-shot campaign. An update that omits it clears a rule the campaign had, because an operator who removed the repetition on the screen expects it gone.

A count of 0 is a one-shot campaign, and 9 is the product cap. An empty value is accepted and stores 0.

The bound matters because of what reads the value back. The state machine compares the run number with it to decide whether a finished run plans another one or completes the campaign. An out-of-range value would fail nowhere: the campaign would keep re-planning for as long as the number said.

The count is no longer overridable on the activation call, because two places for one figure let the two disagree.

Several configurations, and whose limit bounds them

The configuration array accepts several elements, each with its own settings and its own fleet. Every one of them becomes its own run on the ACS.

The old limit of one element had a reason that was true and was not a reason. One command carries one configuration and one device list, and the ACS treats a repeated key as a retry. All of that holds, and one run per configuration satisfies it exactly. Several configurations are several runs, each with its own key and its own sequence number, so nothing is a retry of anything. The assumption of one run per slot belonged to this service and not to the ACS. It needed no change at all.

What bounds the array is this save. The configuration limit exists because several configurations resolve several fleets in one transaction.

configs carries 11 configurations; at most 10 are accepted (ft.fcc.max-configs-per-test). The
limit is this save's and not the ACS's - each configuration becomes its own activation - but
every one of them resolves a fleet of up to 20000 devices in the same transaction

Mixed kinds in one campaign are allowed, and so are overlapping fleets:

  • A speed configuration beside a latency one is exactly what one legacy group with two task types is.

  • A device named by two configurations is measured by both. It then belongs to two runs at once, and the two measurements may distort the WAN sampling of each other. That is a judgement about the fleet the operator is looking at, not a rule this endpoint can make for them.

There are therefore no rules across configurations. Every rule names its configuration by position, for example configs[2].settings is required.

One limit remains inside a configuration: the settings list holds one object. A campaign that measures two different things carries two configurations.

The fleet freeze is per configuration, and the set of configurations is frozen with it. Moving a device from the first configuration to the second changes what both measured without changing the device list of the campaign. Adding or removing a configuration would make a run dispatch a different number of commands than the finished runs had. Both are refused with HTTP 409, and the message names what would change.

the device set of test id=7 is frozen: it has been activated 2 time(s), and the fleet of
configuration(s) 0, 1 would change. To run a different fleet with this configuration, export
the campaign (PUT /FCC/item/export) and import the file back (PUT /FCC/item/import): that
answers it as a new, unsaved campaign whose fleet you can change before saving

Where the fleet comes from

The source type of a configuration decides what the service reads, and every branch lands in the same resolve path the wizard used. What is stored is therefore what the operator was shown.

Source type What is resolved

All

Every device of the named manufacturer and model the caller can see inside the domain bound, matched by name and without regard to case. Both names are required, because without them it would select the whole installation of the caller.

Individual

The selected device ids. An unknown id, an invisible id or an id outside the domain bound fails the save instead of shortening the fleet. See The fleet stays inside the domain of the campaign for the one exception on a campaign saved before the bound existed.

File

The same as Individual. The client holds the imported list and sends the ids it resolved. The client must send every cpe id of the file in selectedDevices. See An XML device file.

Condition

The saved condition, read from the portal schema and intersected with the manufacturer and the model of the configuration and with the domain bound. Evaluated once, at save time, and stored as device ids. A condition re-read at activation would dispatch to a fleet nobody approved. Only a subset of the condition vocabulary is translated. See Which saved conditions this service translates.

The exclusions are subtracted after the resolution, and the fleet limit is checked before the subtraction.

The exclusions are how every device of this model except these four is expressed. That is the other half of a select-all checkbox.

That has one consequence worth stating: a selection of 25000 devices with 6000 excluded is refused although 19000 would be legal. The service must read the 25000 devices before it can subtract anything. An unbounded read is the one way this endpoint can exhaust the service. The message names both figures, so you narrow the selection and not the exclusions.

An exclusion that matches nothing is not an error, unlike a selected id. An id the selection never held means the operator wanted it out, and it is out. Excluding everything is legal and leaves an empty fleet. That is a legal draft.

The fleet stays inside the domain of the campaign

Every source resolves its devices inside one bound: the subtree of the domain where the campaign was created, intersected with the scope of the caller. The bound never grows to the whole scope of the caller. An editor in the super domain who edits a sub-domain campaign therefore saves only devices of that sub-domain and below.

The service reads the domain from the stored campaign on an update, and from the resolved domain on a create. On a create the bound comes from the body field domainId of a caller with the scope ALL, and from the identity header for the scope LIST. See The domain of a new campaign. The body never decides the bound of an update. If the campaign belongs to the super domain, the bound is the scope of the caller, as before.

Case What the save does

All and Condition

The service resolves the fleet again inside the bound on every save of a campaign that was never activated.

Individual and File, an id that is new

An id that is unknown, invisible or outside the bound answers HTTP 400 unknown or out-of-scope cpe ids.

The domain of the campaign no longer exists, or the domain of a new campaign does not exist

An update answers HTTP 400 the domain of test id=<n> no longer exists. A create answers HTTP 400 the domain id=<n> of the new test does not exist before anything is saved. A create of a caller with the scope ALL is also checked, because its bound is the body field domainId. This applies to every source and to an activated campaign too.

Campaigns saved before this bound existed can hold devices outside it. The service does not migrate them. Their stored rows stay until the next save, and then these rules apply.

A stored id counts as a legacy id if it is stored in the campaign, a live device that the editor can see, and outside the bound. An id that no device matches, or that the editor cannot see, is not a legacy id. It keeps the refusal of today.

A campaign that was never activated. A configuration with the source Individual or File drops its legacy ids on the next save, and the save succeeds. The service logs the number of dropped ids once for each configuration. If dropping the legacy ids leaves the configuration with no device, the save answers HTTP 400 and names the configuration seq and the test id. Select devices of the domain of the campaign. A newly added id outside the bound is not a legacy id and answers HTTP 400. A configuration with the source All or Condition resolves again inside the bound.

An activated campaign. The fleet is frozen, so the service keeps the stored fleet as stored. A legacy id causes no new HTTP 409, and the save compares the submitted fleet with the stored ids without the legacy ones. Any other difference keeps the existing HTTP 409. The save writes the stored rows back for each configuration, including the legacy rows. The write keeps the stored protocol text as stored, and a stored NULL stays NULL. The stored serial number is not refreshed from the ACS on this write. The service then runs the connection-ceiling check and the time-based check on the written fleet, legacy rows included.

The bound applies to the save only. Saved conditions and the visibility of the campaign keep the identity of the caller. The preview endpoints POST /FCC/devices/resolve and POST /FCC/devices/count stay bound to the scope of the caller, because they have no campaign.

Which saved conditions this service translates

A condition id names a saved view of the device list of the portal. This service holds a read grant on exactly two tables there and reads nothing else. One translator turns the criteria into one parenthesised SQL fragment, combined with the device query.

The condition is evaluated once, at save time, and the fleet is stored as device ids. A condition re-read at activation would dispatch to whatever it selects then. That is not the fleet anybody approved. The service stores the condition id beside the fleet. A read then answers its name, and an edit shows where the frozen fleet came from.

Why a subset. The portal evaluates a condition with about fifteen hundred lines of code. That code covers 23 operators, 47 column keys and correlated subqueries over the device parameters. It also covers a table of 26 custom fields, and date operators whose meaning depends on the client type and the zone of the caller.

A second implementation of that rule would fail in silence. The device list shows four thousand devices, and the campaign measures three thousand eight hundred. Nobody finds out until a report is short.

This service therefore translates only what it can prove it translates identically. It refuses the rest with an HTTP 400 naming the column key and the operator. The message also says what to do instead: resolve the condition on the device list and send the devices as a list or a file.

The service translates these conditions.

Column key SQL Operators

serial

The serial number

Equal, NotEqual, Like, NotLike, IsNull, IsNotNull

firmware

The firmware

The same six

manufacturer

The manufacturer name of the product group

Equal, NotEqual, the only two the portal offers

model

The model column of the product group

Equal, NotEqual

status

The online flag

On, Off. They carry no value

domainId

The domain

Equal, NotEqual, InHierarchy, IsNull

The service refuses every other condition by name. Those are the vendor code, the two timestamps, the domain name, the protocol and the 26 custom fields. The two parameter keys, every date operator and the device id are refused too.

Five details are matched character for character, and a test covers each one.

  • The manufacturer and the model are columns of the product group, not of the product class. There is no model column on the group under that name, because the field called model maps onto a differently named column. The wizard filter of this service compares other columns. That is right for a value an operator picks from our own list and wrong here.

  • The online status uses two value-less operators, never an equality against text. Both exclude an empty value, so a device whose flag was never written is neither on nor off.

  • An equality with no value is a plain null check, and the null operator is blank-or-null. An empty text therefore satisfies the second and not the first. An inequality with no value is always true. Three rules that look like one.

  • Every text comparison is lower-cased on both sides, trimmed only when it has text, and the contains operator does not escape wildcards. A wildcard an operator typed into a saved condition is a wildcard there.

  • The domain does not go through the generic path at all. An equality on the super domain matches the three sentinel values including the empty one. A hierarchy on the super domain matches everything. A hierarchy on a real domain is the branch under it, read by name. A domain deleted since the condition was saved selects nothing. That is not the same as selecting everything.

One operator on the domain is a deliberate departure from the portal. The portal treats it, and four others, as an equality on the parsed value and throws on a value that is not a number. Reproducing that would be reproducing a bug.

Structure. A condition is a tree, and each node carries its own combinator. The portal turns a sibling list into runs of conjunctions joined by disjunctions. That is reproducible and is also exactly the kind of thing reproduced subtly wrong once and then trusted for years.

This service therefore accepts only the structure it can state in one line: every node at the top level, and every node a conjunction. It refuses nesting and any disjunction by criterion id. That is the shape an FCC campaign names.

An empty condition is refused, and that is the most important refusal here. A view row with no criteria under it selects every device the caller can see. It is almost always a condition whose rows were deleted, and every device in your domains is not something anybody picked from a list.

What a condition cannot do. It can only narrow, because the fragment is combined with the domain predicate of the caller. A condition cannot inject SQL. The column names come from an allow list, and the operators from a closed list. Every value travels as a bound parameter with a prefix no other clause uses. A condition of an unreachable domain answers the same 404 as one that does not exist. Conditions of the super domain and conditions without a domain are the shared views of the portal and are visible to everyone.

When the portal schema is unreachable, the save and the count paths answer HTTP 400 naming the condition, never an empty fleet. The details read answers an empty condition name and a readable campaign. With the feature switched off, every condition id is refused with a message that names the two grants.

A device without a serial number is refused twice

The serial number is mandatory on the wire. The ACS addresses a device by its id and names the measurement by the serial number. It refuses a whole command with a blank serial number. This service therefore refuses such a device itself, with HTTP 400, at two points.

Checkpoint What it catches

The save, for a device added to the fleet

A device with no serial number in the ACS table at save time. On a create that is the whole fleet, and on an update only the newly submitted ids. A device already in the fleet is never re-checked, so an edit that does not touch the fleet cannot fail on it.

The activation

The same condition on a fleet stored before the rule existed, or whose device rows changed since. It is reported with the other missing prerequisites in one message.

Why the save-time check stops at new devices. After the first run the fleet is frozen, so the operator cannot drop a device from it. A check over the stored fleet would mean that a device factory-reset after the activation makes every later edit fail. There would be no way to clear it: not a rename, not a threshold change, nothing. The campaign would be bricked by a device it is not allowed to remove.

The activation check is therefore the only checkpoint that inspects an already stored device. The fleet is a snapshot, so a fleet saved by an earlier build can hold a serial-less row no save ever saw.

Why the service refuses locally at all. The acknowledgement is asynchronous and arrives minutes later, on a screen the operator has left. The refusal would fail the run and move the campaign to the error state, with a reason that names neither the device nor the field. An HTTP 400 on the request that caused it names the exact ids while they can still be acted on.

The capability ceiling is refused, not clamped

The check runs after the fleet is resolved and before anything is written, so a refused campaign leaves no half-saved row.

The applied ceiling is the lowest known one across the models of the fleet, because one command goes to all of them. A value the weakest model cannot honour is a value that model will clamp, refuse or ignore.

Case Ceiling

A model without a capability row

Constrains nothing. An empty value is not zero: it is the absence of knowledge, and a lowered ceiling would refuse every campaign on every model nobody has entered yet.

A row with an empty value on that direction

The same. Its other direction may still constrain.

An empty fleet

Not judged. Saving a campaign before picking its devices is a supported draft.

No connection count given

Not judged. Nothing was asked for, so nothing can exceed.

Clamping would be the friendlier behaviour and it is the wrong one here.

The output of this product is a compliance report. A report stating four connections for a run measured with two is a report nobody can defend. A silent reduction produces exactly that. The operator typed four and the campaign stored two. The only record of the change is a log line nobody reads.

The refusal names the value, the ceiling and the models behind that ceiling.

speed.downloadConnections=4 exceeds 2, the lowest ceiling among the models of this
fleet, imposed by model id(s) 402; lower the value or run those models as a
test of their own. The value is not reduced automatically, because a compliance
report has to state the number of connections the run was measured with

Lower it to two is useless without because of these models, because the real choice of the operator is usually neither: it is to split the fleet.

A removed capability row makes that model unconstrained again and changes no existing campaign, because the ceilings were applied at save time.

The two test modes

TR-143 defines two shapes of throughput test, and this service runs both.

The file-based mode transfers a file and reports the window it took. The ACS sets the URL and the connection count. It reads the two measurement instants and the byte counters. The rate is the bytes over that window.

The time-based mode transfers for a stated number of seconds and reports a full-loading window inside it. The ACS also writes the duration, and the interval when one was given. It reads back the full-loading period, the full-loading byte counters and the interval table. The rate is measured over the full-loading window and never over the outer window. See Two formulas, one verdict.

The duration is in seconds and is required with the time-based mode. The interval is the step of the result table, also in seconds. It is optional. An absent value lets the device choose, and the ACS then omits the parameter. Both are refused on a file-based block rather than ignored.

The Sec ending is the convention this contract already uses for the four WAN timings. It is worth the noise here, because the single duration beside it is in minutes and one rule compares the two.

The time-based parameters are a newer data-model addition and are absent on much of the older device population. That matters. The ACS rejects a parameter write as a whole when one parameter is unknown. An unguarded time-based request would therefore not run at all, and it would not fall back to a file-based test.

The ACS therefore probes the parameter on the device before it starts the diagnostic, and refuses to build the diagnostic when the parameter is unknown. A silent fallback would publish a measurement of something nobody asked for.

This service refuses earlier and more usefully, at save time. Every model of the configuration needs a capability row with the time-based flag, and a model without a row counts as not supporting it. The operator therefore finds out while looking at the form.

The practical consequence is that the capability catalog has to be populated before the feature is useful. The catalog endpoint already serves the flag per model, so a UI can disable the choice instead of letting it be chosen and refused.

Where a speed tier comes from

The value default means the tier came from the preset of the model, and manual means the operator typed it. The tier value reaches the ACS either way, and this service never checks a tier against the preset list.

The field exists for the screen. A campaign re-opened with manual shows the figure in its input, and one with default shows the preset it came from. Without it a UI cannot tell a typed value from a preset with the same number.

It belongs to both kinds, because a latency campaign carries a tier too: the rate the line is provisioned at. Both settings tables have the column, nullable and never filled in later.

The constants are upper case and the wire values are lower case. This is the second and last field of the service with an explicit JSON name. The wire value and the constant cannot be the same text here.

The upper-case spelling matters because the value is stored and it travels in the XML document. A mixed-case constant was a round-trip bug once. The writer emitted it as declared and the reader upper-cased it before the lookup. A document this service had exported itself was therefore refused on import. The reader now matches without regard to case, and a stored name that follows the convention is the first line of that defence.

The settings chain from the caller side

The save resolves absent values through three levels, once, and stores the result.

the value in the request  ->  fcc_domain_setting of this campaign domain  ->  the global defaults
the first present value wins, from left to right

That has four visible consequences:

  • The read answers the resolved values, not what you sent. A body without a URL comes back with the URL of the domain, because that is the stored campaign.

  • A blank text is absent, not a value. An empty string falls through to the domain default. A strict chain would let it beat the default, so the per-domain URL would never apply for exactly the caller it exists for. With no value at any level the field is stored and read back empty, never as an empty string.

  • The rules apply to the resolved values. A URL inherited from the domain is judged exactly as your own would be, and a host supplied only by the domain satisfies the requirement.

  • A later edit of a domain default does not reach the campaign.

Which fields have which levels is in The settings chain.

POST /FCC/item/details

Read one campaign in the shape the save accepts. You send the id, and you get the body of the save endpoint back, under the same names. The screen that reads a campaign and the screen that writes one therefore speak one vocabulary.

The answer carries the id, the name, the state, the activation block, the recurrence block and the configurations.

Field Notes

state

The lifecycle state of the campaign. See Campaign states.

activation

The timing settings plus the booking of the campaign. A stored instant is reported as Scheduled with that date, and its absence as Immediately. A campaign without a configuration row still answers its booking, because a draft saved with a date and nothing else is a legal campaign.

reactivation

The recurrence rule, or {"type": "None"} for a one-shot campaign. That is the body the save accepts for one.

configs

One element per stored configuration, in the order they were saved. Each carries the id, the choice, the condition name, the device count, the devices and the settings.

Three fields of a configuration differ from the save:

Field Why

conditionName, read only

The name of the saved condition. It can be empty without that being an error: a deleted condition, one this caller may not see, an installation without the grant and one with the feature off all answer empty, because a label on a screen may never fail the read of a campaign. Render the condition id you already have.

devicesCount, read only

How many devices the frozen fleet holds. It cannot disagree with the device list, because both come from one read. It exists so a screen that shows only the figure need not count an array of twenty thousand.

unselectedDevices, write only

It has nothing to report on a read. The exclusions were applied when the fleet was resolved, so the device list is what is left. A second list of what is not in it would be a figure with no stored truth behind it.

The choice is read, never derived from the fleet again.

The manufacturer, the model, the source type and the condition id come from the configuration row. A campaign with no recorded choice answers empty for them. Examples are a campaign saved before those columns existed and one imported from a configuration document. It carries a fleet and not the choice behind it.

The manufacturer its devices happen to carry today would look like information and be a guess. A mixed fleet has no single manufacturer, and a re-provisioned device would change what the campaign appears to have been configured with.

There is no column for the end rule of the recurrence, because the count is the only bound this product has. A stored rule with a count means after that many runs. The read states that, so a screen does not have to guess from an empty value.

The settings list holds one object, with the fields of the other kind empty throughout. A draft without a settings row answers an empty list, never a list holding an empty object. Every client would otherwise have to handle that empty object.

Two things this answer does not carry.

The run history is not lost: the run list answers one row per run filtered by campaign, with the figures a history screen shows. That screen now makes a query of its own. The details read no longer carries fifty rows for it.

A flag for the frozen fleet is a real loss. It told the UI that the fleet is frozen and that it must offer a new campaign instead of an edit. No field of this answer implies it. The state is the closest field, and it is wrong in one case. A booked campaign has never run, and its fleet is still editable. Without the flag a UI finds out by being refused on a save. It is one field to restore if the screen needs it.

A campaign outside the visible domains of the caller answers HTTP 404.

POST /FCC/items

List campaigns, filtered, sorted and paged. The body is flat: the filters sit beside the paging, with no wrapper.

Field Type Notes

manufacturer

Text

Selects campaigns by what is in their fleet. Matched whole and without regard to case, never as a substring. A blank value means do not filter. See Filtering the list by manufacturer or model.

model

Text

The same for the model. Given together with the manufacturer it narrows.

state

A state, or ALL

An exact match, except for ALL. That means no filter and answers exactly as an absent field. It exists because a dropdown needs an all states entry to send, and it is deliberately not a constant of the stored state enumeration. The value is read without regard to case, and every answer carries one of the nine real states. Any other value is refused, where an unreadable enumeration otherwise answers the unhelpful request body is not readable.

pageNumbers

Number list, from 1

An absent or empty list means the first page, a number below 1 reads as 1, and repeats collapse. Several numbers are answered in one response, with their rows concatenated in the order asked. One response carries at most 500 items in total, and more is refused. The page size is clamped and the page count is refused, because a clamped size still answers the question that was asked while a dropped page answers a different one.

pageSize

Number

The default is 25 and the cap is 500.

sorts

List

Each entry is a field and a direction. The field must be one of name, state, type, created, updated or scheduledAt, and anything else is refused with the allowed set. The direction defaults to ascending. No sort at all means newest first.

There is no domain field. Which campaigns a caller may list is decided by the identity headers and never by the body. The list does show a domain column to a super-domain operator, and that is a column and not a control.

The answer is a page of rows. A row is the Group Update row, field for field. It is the same table on the same screen.

Field Notes

id, name, state

As stored.

domain

The name of the domain, read from the ACS. The super domain carries its own constant. See Where the domain name, the creator and the dates come from.

creator

Who saved the campaign, as the name the UI Backend sent at the time. A campaign saved before that header carries the user id, and one written by a poller carries system. Rendered as stored.

created, updated, activated

Formatted in the zone and the patterns of the caller.

createdIso, updatedIso, activatedIso

The same instants, unformatted. Sort and filter on these.

activated

When the latest run started. While a campaign waits on a booking, when it is due. Empty for one that never ran.

activationMethod

Manual or Scheduled, and empty for a campaign that never ran. The spelling is the one of the UI Backend, and that screen already renders it.

application

The portal type of the caller. It describes the portal asking the question and not the campaign, exactly as the Group Update list does.

The page details carry the current pages, the item count of the page, the page size, the total items and the total pages. Group Update fills three of the five, and this list fills all five. A caller may ask for several pages at once. The current-page field then says which pages the answer carries.

The row carries no type, no device count, no domain id, no source, no booking and no recurrence count. The type is the one to watch. Nothing in this row says whether a campaign is a speed or a latency test. Restore that one field if the screen needs it.

Where the domain name, the creator and the dates come from

Three columns cannot be produced from the own data of this service, and each is solved differently.

The domain name is read live from the ACS, one batched query per page. That table is in the ACS schema, and the read-only account of this service already covers it. No new grant and no second datasource are needed. The super domain has no row there, so the service substitutes the constant. The name is sent as stored, dotted path included, because that is the string the portal shows.

The two columns of that table are part of the startup schema check. An installation that narrows the grant therefore fails at startup, and the message names the two columns.

The creator is stored, not resolved. The user table lives in a schema this service has no account on. The UI Backend therefore sends the name, and the save writes it into the column. A later rename does not rewrite history. That is what an audit column is for.

The three dates are formatted with the zone and the two patterns of the caller. Those are the same arguments the UI Backend uses for its own lists. All three headers are optional. The fallbacks are UTC and two default patterns. An unreadable value falls back with a warning. The unformatted field beside each formatted one always carries the instant. None of them is an authorization input. That is why a missing one is never a refusal.

Filtering the list by manufacturer or model

Both fields select a campaign by what is in its fleet and not by a property of the campaign. A campaign is listed when at least one device of its fleet matches.

Both are matched whole and without regard to case, never as a substring. The values come from the catalog endpoint, and a substring match would let one vendor name pull in another and widen a compliance filter.

Naming both narrows: the device has to be of a model that is both. The other reading would answer a question nobody asks of a list screen.

Three consequences are worth knowing:

  • The filter reads the frozen snapshot. A campaign keeps answering the manufacturer it ran against, even after those devices were re-provisioned or deleted. Only the manufacturer-to-model expansion is read live, and it is deliberately not narrowed to models somebody still owns devices of: last year campaign is exactly the one whose models may have none left.

  • A value that matches no model lists no campaign, never every campaign, and the service issues no query at all. An empty list reads as no predicate to every read. That is how a filter turns into a wildcard.

  • A blank value is not a filter. An empty text box means the operator did not filter by it.

A device row without a model never matches. Such a device belongs to no manufacturer anybody can name, and it can only enter a fleet through a serial number or an id.

Activation endpoints

Three of these endpoints answer true or an error, and never false. That is the contract of Group Update. The boolean means the call completed, and a failure is an error response. There is no third answer.

Every campaign is processed in its own transaction, and a failure part way through is not rolled back. The boolean cannot say that, so the error does: how many succeeded, and every id that failed with its reason.

The status of a mixed batch is the most severe outcome and not the first one: 503, then 500, then 409, then 404 and 403, then 400. That is what decides whether a retry can help. A 500 is a transient server fault for one id, so a retry may help, but it is not a definite outage like a 503. An unexpected server fault for an id answers FT code 9500, not 9400. An unclassified failure counts as the most severe, so a failure nobody has classified is never reported as a mere 404.

Duplicate ids are collapsed before anything happens. A UI that sends one id twice gets one outcome, not a success and a conflict about a campaign its own first id changed.

The stop, the pause and the delete do not consult the result store.

The activation refuses to start anything while ClickHouse is unreachable, because a run whose measurements cannot be stored is a hole in a regulatory report. Stopping has the opposite sense: a refusal would leave the fleet measuring into a store that is already down.

POST /FCC/activate

Request: the ids and nothing else. Answer: true, or an error.

The save decides when a campaign runs

There is no mode and no instant on this body. The timing lives on the campaign, and this endpoint commits whatever was booked.

Stored booking What the activation does

None

Creates the run and writes its command in one transaction.

An instant in the future

Moves the campaign to the booked state and creates no run. The poller claims it when the instant arrives. See A booked campaign creates no run.

An instant in the past

Refused for that id with HTTP 409. The operator booked 10:00 and pressed activate at 10:05, and starting the fleet now is not what they asked for. For a speed test the difference between a booked hour and now is the difference between a quiet line and a peak-hour one. The message says to edit the date or clear it.

A schedule belongs to the campaign and not to the click that starts it. It therefore survives a reload of the screen. It also removes the one way the two could disagree: a campaign booked for Friday activated immediately.

The recurrence count is gone from this body too. It is stored on the campaign, and accepting it again meant one figure in two places.

The whole call is refused while the result store is unavailable, booked campaigns included.

A campaign booked now would start hours later. The store may still be unreachable then, and the report would get the hole a refusal prevents. Nobody would be watching by then. Now is the only moment an operator is present to be told.

A booked campaign creates no run

The service moves the campaign to the booked state, writes the instant, and stops there. Nothing is dispatched and the call still answers true, because what it committed is the booking.

A run carries a settings snapshot. A snapshot taken now for a campaign that starts next Tuesday would freeze the configuration for a week. That is the opposite of the product rule that an edit applies from the next run.

The states a campaign may be booked from are not the states it may be activated from. The refusal therefore names the event the caller asked for. There is one difference. A campaign between daily runs accepts an immediate run and refuses a new booking. It already owes a planned run, and this endpoint cannot move the window of that run.

Status codes

Status When

200

Every id was activated or booked.

400

The body failed validation, or a campaign was refused with a 400-shaped reason and nothing more severe happened in the batch. The description names how many were activated and which ids failed.

500

An unexpected server fault for an id, with FT code 9500 and the text "internal error", and nothing more severe in the batch. The description lists each failed id with a generic reason. Nothing is rolled back.

503

The result store cannot take rows, checked once for the whole request before any campaign is processed.

What the activation checks

Check Detail

The activatable states

The activate column of the campaign transition table, and the validator only turns a denial into the HTTP 409 a caller expects. A running campaign is the only state that refuses it, plus the unreachable archived one. Every other state accepts it, because every run gets its own row and its own snapshot.

A campaign between daily runs also stops the run it owns

The campaign already holds its next run as a planned row, and the operator asks for a different run now. The service closes the old one with the user-stop reason, locally and with no command when it was still planned, or with a real stop when it had been dispatched. That happens before the new sequence number is drawn, so the stop takes the lower number. See the superseded run.

The bookable states

The booking column of the same table. That is not the same rule. A booked campaign accepts a new booking, because moving the instant of a run that has not started is an edit and not a second run.

The completeness check

Reported as one message listing every missing item: at least one device, a non-blank serial number on every device of the fleet, both durations above zero, and the settings the type calls for. The settings half branches on the type and the fleet half does not. A speed campaign needs both URLs and the download tier, and a latency campaign needs a host.

The two machine-driven entry points do not re-run the completeness check. They check one thing: the campaign still has its configuration row and the settings row of its type. Otherwise they skip the run and write a log line.

They run on a poller tick. A configuration that can no longer run comes back refused from the ACS. That closes the run on the normal path, and the run history shows it. Throwing would roll the tick back and re-claim the same row forever.

POST /FCC/stop

Stop one or more campaigns and the runs they own. One service is the only implementation of stop the live run, shared by the stop, the pause and the delete.

Request: the ids, required and non-empty, with no empty element. Answer: true, or an error.

A stopped campaign is not active.

This follows Group Update. It has no stopped status at all: its stop returns the group to the created state. The UI calls that state not active, because that is what the group is afterwards. The same was always true here and only the label said otherwise. A stop and a pause run identical code, neither can resume a run, and a later activation starts a new one. A stopped campaign is therefore in the same condition as a campaign that never ran.

The stopped state is not gone, and it now means one thing: the run was cut short and nobody asked for it. Only one transition writes it, and the three callers that could feed it all skip it for a user stop. The campaign list therefore gains a distinction it did not have.

The constant stays in the state filter of the campaign list. A portal that still sends it gets an empty page and not a refusal. The migration rewrites existing rows. A campaign in the stopped state becomes not active when a user stopped its newest run. A campaign with no run at all becomes not active too.

What one accepted stop writes, all in one transaction per campaign:

  1. The campaign transition. It lands in the not-active state and clears any booking.

  2. The run transition to the stopping state with the stop reason and the stop instant, for a campaign that owns a live run.

  3. The next command sequence number and a stop row in the outbox with a fresh key.

  4. One audit row with the user id of the caller.

They commit together or not at all. A stop whose sequence number was burnt by a rolled-back transaction would make every later command look stale to the ACS.

The run then stays in the stopping state until its devices drain or the stop grace expires. See The stop drain.

Stopping an already stopped campaign is a refusal

A campaign whose state does not accept a stop is refused per id. The error carries the reason of that refusal.

test id=43 cannot be stopped: test state NOT_ACTIVE does not accept USER_STOP

An answer of done would hide the state the operator is looking at. That is usually a campaign somebody else stopped a minute earlier. This is the one place a denial becomes an error rather than a log line, and that is exactly because a user asked for it.

The refused states are not active, stopped, completed, error and the unreachable archived one. The paused state is not among them. The accepted states are therefore running, booked, between daily runs, and paused.

A stop without a command is still a success

Two cases produce it, and both are successful stops.

  • There was no run at all. A booked campaign owns only a pending instant, and clearing it is the whole stop.

  • The run was still planned. No command ever reached the ACS, so there is nothing there to stop. The service closes the run locally and writes no command. A command would consume a sequence number for a run the ACS never heard of.

A UI that showed stopped for a published command and failed otherwise would report both of these as failures.

POST /FCC/pause

The same request and the same answer as the stop. One implementation serves both. Only the stop reason and the state the campaign lands in differ. The error wording names the action the operator asked for, so a failed pause does not read as a failed stop.

A pause is a stop.

It is the identical code path with the pause reason, and the campaign lands in the paused state. There is no pause command on the wire, so what reaches the ACS is an ordinary stop. The running measurements end. They are not suspended.

A resume is a plain activation, and it starts a new run. The new run gets its own row, sequence number, key and settings snapshot. Nothing resumes the paused run and nothing continues its iteration count. For a report a paused and resumed campaign is two runs, not one interrupted one.

The paused state therefore says one thing a stop does not: the operator means to come back to this campaign. The pause of Group Update says more than that, because it keeps the previous state and resumes its jobs. Nothing here does. That is why a stop reads not active and a pause keeps a state of its own.

The difference is entirely local, and one of the labels decides what happens next. The pause reason stops a later stop report from turning the pause into a stop.

A paused campaign can be stopped

A stop on a paused campaign is accepted and lands it in the not-active state.

It was not accepted once, and that was the defect. The paused state was evaluated by the branch that serves the closed states. It allows only the two activate events. An operator who had paused a campaign therefore had no way to close it. The only route was to activate it again and stop the new run. That started a whole new run on the fleet. The validator pointed the same way, refusing a new booking with stop it first. It could not be done either.

Nothing new reaches the ACS.

  • No command is written. The pause already sent one command per configuration. Those runs are draining, and the service leaves a draining run alone. A second command would consume a sequence number and repeat an instruction in progress.

  • The draining runs keep the pause reason. There is nothing to stamp again, and that reason is what keeps the later stop report from reaching the campaign, so a stopped-after-pause campaign cannot move to the stopped state.

  • Any pending instant is cleared. That is the only effect of this transition.

A pause of an already paused campaign stays a refusal, because nothing would change and the conflict names the state the operator is looking at.

Which of the two an operation is, is the job of the URL and not of a flag in the body. A flag would let a caller pause through the stop endpoint and make the audit trail unreadable.

DELETE /FCC/items

Remove one or more campaigns, stopping whatever they still have running first. A body on a delete is the bulk shape of the FT contract.

Request: the ids, with the same constraints as the stop. Answer: true, or an error.

A deletion is a UI removal, not an erasure

This is the central decision of the endpoint. What is left behind is not housekeeping left undone.

Table Fate Why

The campaign, its configurations, its settings and its fleet

Deleted

The definition of the campaign. That is what the operator asks to remove.

The runs

Kept

The run history. Each row carries its own settings snapshot precisely so a run stays readable after its campaign was edited or removed, and a report is built from those rows. A deletion would make measurements that were genuinely taken disappear from a regulatory record.

The outbox

Kept

It still has work to do. The stop written a few statements earlier is not sent yet, and a deleted row would leave the ACS measuring for a campaign that no longer exists.

The device states and both result tables

Kept

All three are keyed on the run and never on the campaign. That key stays resolvable, so the per-device status and the results of a deleted campaign stay readable.

The audit trail

Kept, with one delete row appended

The trail outlives the campaign. This is the one case where it is the only record that the campaign existed.

The campaign therefore disappears from every list and can no longer be run or edited. Its history does not disappear from the database. A campaign whose results must genuinely be erased needs a separate, explicitly destructive operation.

Nothing downstream is surprised by the missing campaign. The transition service already treats an absent campaign as a reachable case, and the watchdog closes a draining run by its own state and instant.

A delete stops the run and skips the campaign transition

The delete handler calls only the run half of the stop service.

Moving the campaign to a stopped state first would write a state nobody can ever read, because the row is deleted a few statements later. It would also refuse the campaigns that most need their run stopped. One case is a stopped campaign whose run is still draining. The other is a completed campaign that still carries a planned run. A conflict raised inside this transaction would be unrecoverable, because the stop service joins it.

The set of run states treated as live is therefore wider here: it includes the draining state. A draining run is invisible to a stop, because the stop already sent its command. A silent delete would leave a fleet measuring for a campaign nobody can see. Such a run gets no second command, and the service detects it so the answer can say so.

Visibility is resolved inside the delete transaction, unlike the stop path. A delete is irreversible. The access check and the delete therefore read the same row in the same transaction.

POST /FCC/devices/status

You send one campaign id, and you get six counters. The endpoint is read-only, and it reads the device states, never the measurements. They answer a different question.

Field Counts

completed

The device finished its measurement.

pending

The run is waiting on it, in the sent or the WAN-check state. The WAN sample is a step of the dispatch and not an outcome.

offline

The ACS could not reach it.

notSent

Nothing was sent to it: the run has not reached it yet, or it was stopped before it did.

failed

A real failure, and nothing else.

skipped

The measurement did not happen and nothing failed.

The service computes them in one grouped query and not in six counts. A run holds up to twenty thousand devices, and this screen refreshes while the operator watches it. A state no device is in does not come back and is rendered as zero.

The six are a projection of the nine stored states, and two of the nine have no category of their own.

Where those two land decides whether a compliance screen tells the truth. The rule each fold follows: never claim a measurement that was not taken, and never report a breach that did not happen.

  • Cross talk counts as skipped, never as failed. The line was already busy above the threshold, so the iteration measured the traffic of a neighbour and carries no usable figure. As a failure it would report a compliant line as breaching, and as completed it would claim a measurement nobody took.

  • A stopped device counts as not sent, never as failed. The operator halted the run between two steps, before anything was sent to that device.

The Group Update answer is a projection too: one of its states is counted in none of its six. The shape is not a claim that six states exist.

What is lost is lost only in this answer. All nine states stay in the table, every transition is logged, and cross talk is a measurement status in its own right in a report.

Three behaviours are worth knowing:

  • It names no run. The counters are always those of the newest run, because the question this screen asks is how is it going right now. The run id this endpoint once accepted is gone: the figures of an earlier run come from the report endpoints. That also removed an authorization boundary, because the device states are keyed on the run alone, so a caller naming a run id had to be stopped from reading the fleet of another domain by guessing one. The run is now reached only through the campaign.

  • A campaign that never ran answers six zeros, not a 404 about a campaign that plainly exists.

  • There is no total. It is the sum of the six, and a seventh field the contract does not name is a field a client has to be told to ignore.

The per-device grid this endpoint once carried is gone with it. In Group Update the per-device rows are a different read, served with the details of the group.

No other endpoint of this service answers which devices are offline, because the measurement report has no row for a device that measured nothing. If the run screen needs that table, it needs a path of its own.

Device endpoints

These endpoints read the ACS schema and write nothing. A fleet becomes a campaign only when the save stores it, and the save re-resolves the same selection through the same service.

The full mechanics of the read are on their own page: Device selection.

The resolve and the count each answer two request shapes on one path. The service tells them apart by the content type of the request. The JSON rules and the multipart rules therefore both apply to one path.

POST /FCC/manufacturerAndModelByTestType

This endpoint serves the first step of the wizard in one call. It answers the manufacturers and models the caller owns devices of. It also answers the tier presets of the chosen type and the device limit.

The request carries these fields.

Field Type Notes

type

SPEED or LATENCY, required

It selects the tier presets, not the models. See The test type does not narrow the catalog.

onlyOnline

Boolean

true hides a model with no online devices. The counters stay the real figures either way, because shrinking them would make the catalog and the resolved fleet describe different things.

domainIds

Number list

Narrows inside the scope of the caller. See An empty intersection selects nothing.

The answer carries these fields.

Field Notes

manufacturers

One entry per manufacturer, with its device count and its models. The count is the sum over the models, computed in Java, so the tree and its leaves cannot disagree. The buckets are grouped by name. See The catalog is grouped by manufacturer name.

tiers

The presets: a label and one or two rates. See Tiers are served, not hard-coded in the UI.

maxDevicesPerTest

The device limit, served so the wizard can refuse a selection before it asks the service to resolve one. It is not domain data and is returned even to a caller who can see no domain.

A model entry carries these fields.

Field Notes

modelId

The product class id. This is what this product calls a model.

model, productClassGroupId

The name and the group of the model.

protocol

The protocol name, taken from the group of the model. That is the only place the catalog carries one. It is empty when the model has no group row. That is the correct answer. The service never guesses a protocol here. It is a hint and not the authority: what decides whether a device can be measured is the per-device column.

deviceCount, onlineCount

The figures of the caller, not of the installation. Two operators of different domains see the same model with different numbers, and a model nobody in their domains owns is absent entirely.

connectionsDlMax, connectionsUlMax

From the capability table. An empty value means unconstrained, not zero and not one, so the UI must not narrow the input of the operator on the strength of an absent row.

supportsTimeBased

From the same row, and false when there is none. This is the time-based opt-in, and a UI should gate the choice on it. See [time-based-is-opt-in].

Example
POST /FCC/manufacturerAndModelByTestType
X-FT-Domain-Scope: LIST
X-FT-Domain-Ids: 17,18

{"type": "SPEED", "onlyOnline": false, "domainIds": [17]}
{
  "manufacturers": [
    {
      "manufacturerId": 4,
      "manufacturer": "Sagemcom",
      "deviceCount": 1840,
      "models": [
        {"modelId": 311, "model": "F@st 5657", "productClassGroupId": 12,
         "protocol": "TR181", "deviceCount": 1200, "onlineCount": 1043,
         "connectionsDlMax": 4, "connectionsUlMax": 2, "supportsTimeBased": false}
      ]
    }
  ],
  "tiers": [
    {"label": "100/20", "dlKbps": 100000, "ulKbps": 20000}
  ],
  "maxDevicesPerTest": 20000
}

An absent type is refused, because the two types serve different tier lists and a guess would offer an upload rate for a ping.

A caller with the scope LIST may name only invisible domains. That caller gets an empty manufacturer list, with the tiers and the limit still filled in. The answer is never an unfiltered catalog.

The catalog is grouped by manufacturer name

The service buckets the models by their resolved display name, without regard to case and whitespace, and not by the manufacturer id. The difference is not cosmetic.

The manufacturer id is nullable, and an empty one is precisely the case the group-name fallback exists for. Keying the buckets by it dropped every such model into one empty bucket. The bucket then carried whichever name sorted first. It showed one vendor name while it held the models of two other vendors, with the counts added up.

The name is also what the operator sees and picks by, and it is the only identifier every model of the catalog has.

The manufacturer id is reported only when every model of the bucket agrees on it.

Grouping by name means a bucket can legitimately hold rows of two different ids, or of none. Reporting one of them would tell the caller that a filter by id selects this bucket, and it would select part of it, or none.

An empty manufacturer id means this manufacturer is identified by name alone. A caller narrowing a selection to it sends the name and never the id.

An empty manufacturer name is its own case: the one bucket of models the ACS records no manufacturer for. Such models are never merged into a named bucket. The ACS records no manufacturer for these is an honest answer the operator can act on. Filing them under the name of a neighbour is a lie about whose hardware they are.

The test type does not narrow the catalog

The endpoint is named after the type and the parameter is required, and it still filters no model. Do not turn this into a filter.

Every device that can run a throughput diagnostic can also run a ping. No column of the ACS schema tells the two apart per model. A filter here would be invented. An invented filter removes models the operator owns and can measure.

What the type selects is the tier presets. Those are genuinely different for the two. The parameter stays in the contract so that the day a model capability does distinguish them, the frontend does not have to change. The capability table is not that day: it records connection ceilings and a time-based flag, and neither says anything about a ping.

Tiers are served, not hard-coded in the UI

One class is the single source of the list, and the frontend brief forbids the UI from carrying defaults of the service.

This one has a concrete reason. The pass rule compares a measurement against the same figure. A second copy in the UI would eventually decide that a campaign passed while this service decided it failed.

The wire carries Kbps and the label carries Mbps, and one Mbps is a thousand Kbps exactly, never 1024. The shared contract is explicit that a tier is never divided by 1024. A tier converted with a binary factor would move every threshold by 2.4 percent. That is precisely the size of margin a verdict turns on.

The labels are the tier as an operator says it out loud. That is also how it appears in a report.

A latency tier has no upload side. The upload field is empty and not a copy of the download figure. A ping is symmetric, and the tier only names the subscriber plan of the threshold.

Manual is a UI affordance, and a tier outside the list is a supported case.

There is no manual constant in the preset list and there never will be one. The list is an offer and not an allow-list: the provisioned tier of a subscriber is whatever their contract says.

The service therefore validates a tier for its sign only and never against the presets. A validator matching the list would refuse an ordinary plan and leave the operator with no way to measure it.

Zero is still refused, and that is not an inconsistency: a tier of zero makes every measurement infinitely over-performing and the success percentage meaningless.

POST /FCC/devices/resolve

Turn a selection into the fleet it names: one page of devices, and the figures the operator decides by.

The request carries these fields.

Field Type Notes

sourceType

CONDITION, INDIVIDUAL or FILE, required

Decides which half of the body the service reads. There is no default.

condition

Block

Read for a condition, and required there. For the two serial sources it is reduced to the online flag and the domain list. See Why one URL serves both JSON and an upload.

serials

Text list

Read for an individual selection, and required there. Trimmed and de-duplicated without regard to case, with your own spelling kept.

pageNumbers

Number

Defaults to the first page.

pageSize

Number

Defaults to the configured page size and is capped at the device limit, not at a page ceiling of its own. The wizard asks for the whole fleet in one call to save the campaign.

The condition block has eleven optional fields, combined with AND, and no two fields are ever combined with OR. They are listed with their predicates in The conditions.

The answer carries these fields.

Field Notes

items

One page, sliced in memory from the ordered full match. Each item carries the device id, the serial number, the model, the manufacturer, the domain, the online flag, the protocol, a support flag and the firmware.

pageDetails

The same page envelope the campaign list uses. The total is the whole match.

totalCount, onlineCount, unsupportedProtocolCount

Every counter describes the whole match, never the page. They are what the operator decides on, so a counter meaning on this page would understate a fleet by the page size.

countsByModel

Per-model counts over the whole match. A device without a product class gets a bucket with empty keys, so the per-model figures always add up to the total. See A device without a product class is a member of the fleet.

notFoundSerials, duplicateSerials

See Missing and duplicate serial numbers are two different defects.

One read serves the page, every counter and both serial reports. The service issues one count and one read, and derives everything else from the rows in hand. A device that goes online between two statements therefore cannot make the per-model counts disagree with the total.

Example
POST /FCC/devices/resolve
Content-Type: application/json
X-FT-Domain-Scope: LIST
X-FT-Domain-Ids: 17,18

{
  "sourceType": "CONDITION",
  "condition": {
    "manufacturerIds": [4],
    "modelIds": [311, 402],
    "onlyOnline": true,
    "domainIds": [17]
  },
  "pageNumbers": 1,
  "pageSize": 2
}

Refusals:

Rule Status Detail

sourceType is absent

400

Checked twice: by the validation on the record, and again in the service. The duplication is deliberate, because every branch switches on it, so a value that slipped past the annotation would be an internal error and a malformed body answered as a server fault.

A condition list whose entries are all empty

400

The message names the field and the count. Individual empty entries are stripped, and a list left with nothing is refused, because a dropped condition would widen the selection. See A list of empty entries is refused.

A protocol list with no valid name

400

The same rule one level up.

A condition source with no condition block

400

An absent block is not a selection of every device. The difference between the operator has not chosen yet and the operator chose the whole installation is twenty thousand devices.

An individual source with an empty serial list

400

The list is required there.

A file whose parse yields no serial number

400

An empty upload and an unreadable one have their own messages.

A condition list longer than 1000

400

The message names both figures. The serial list is chunked instead of refused, because it is sized by the fleet of the caller, and a condition list is sized by the catalog.

More distinct serial numbers than the device limit

400

Before any read.

A protocol name that is not a known constant

400

The message lists the allowed set. Note the spelling of the Technical Report 069 (TR-069) constant: no hyphen.

A selection above the device limit

400

See The selection limit is counted before any row is read.

No file part in a multipart request

400

The message states that the file part is required and the JSON part is not.

An upload above the limit

413

The message names the configured maximum. The upload was well formed, and there is nothing to correct except its size.

A part with an unsupported content type

415

Most often the optional JSON part without a content type of its own. The message asks for a content type per part.

POST /FCC/devices/count

Exactly the figures of the resolve with no page attached: the same request, the same sources, the same refusals and the same limit.

The answer carries the three counters, the per-model counts and the two serial reports.

It keeps the counters current while the operator changes the conditions. The wizard then does not carry a page of twenty thousand devices on every keystroke. It is also where the operator finds out a fleet is too large, before they ask for its rows.

The paging fields are accepted on the body, because it is the same record, and the service does not read them.

The selection limit is counted before any row is read

A condition over a large installation can select hundreds of thousands of devices. Reading all of them to find that out is the one way these endpoints can exhaust the service.

The service therefore runs the count first and the row read second.

selected = count(filter)
selected > ft.fcc.max-devices-per-test  ->  400, nothing is read

The message names both numbers on purpose.

the selection resolves to 48210 devices; a test accepts at most 20000.
Narrow the conditions or split the fleet into several tests

The operator needs the resolved figure to narrow the conditions. Too many without it is a dead end, because they cannot tell whether they are over by ten devices or by a factor of three.

Three consequences are worth knowing:

  • The limit is identical on the resolve, on the count and on the save, because all three go through one method. The count is where an operator normally meets it. That is the intended order.

  • The count is honest about the scope of the caller. On the one path with an in-memory domain narrowing, a plain count would count invisible devices, so the service falls back to the size of the narrowed set.

  • The serial list has its own earlier bound. More distinct serial numbers than the limit are refused before a statement is built, because such a file cannot resolve to a legal fleet whatever matches.

Missing and duplicate serial numbers are two different defects

Both are lists of serial numbers, both come from the same single read, and they mean opposite things. Neither causes a refusal on the wizard endpoints: nothing is silently dropped and nothing is silently refused.

Field What it is

notFoundSerials

Serial numbers no visible device carries. Matched without regard to case and reported in your own spelling. Empty for a condition selection. It asks for no serial number in particular.

duplicateSerials

Serial numbers that matched more than one device. Every matching device is still in the page and in the total.

Why the case rule is not cosmetic. The default MySQL collation compares serial numbers without regard to case, and the Oracle one does not. A serial number typed in lower case therefore resolves on one vendor and comes back missing on the other. The service makes the comparison in Java instead. Reporting your own spelling rather than the matched one is what lets you find the offending line in the file you uploaded.

Why a duplicate is possible at all. The device table is unique on the serial number together with the product class, and not on the serial number. One serial number legitimately exists on two product classes, and both rows are real devices the ACS can measure separately. Dropping one would shorten the fleet on a guess. Refusing the selection would block a legitimate fleet over an ACS column the operator cannot change. A compliance fleet that silently holds one household twice is a defect the operator has to see.

The wizard reports, and the save refuses.

The same resolution runs on both, and the save adds exactly one rule: an unresolved serial number is an HTTP 400.

Condition The wizard The save

Matched nothing visible

Reported, and the resolution continues

400, naming the count and the first 20 offenders in your own spelling

Matched more than one device

Reported, every match returned

Accepted, every match stored

The asymmetry is the whole design. On the wizard the operator is still choosing, and a list with three typos in it is a list they can fix. At save time the operator has finished choosing, and a fleet assembled from a file they believe is complete must not be silently shortened. A campaign may store 19000 of the 20500 serial numbers of the uploaded list. That is a report missing 1500 subscribers, and nothing later in the run would show it.

Unsupported devices are included and flagged

This ACS version cannot drive every management protocol. Such a device is still in the page, in the total, in the per-model counts and in the stored fleet. It is flagged, not removed, on three fields: the protocol name, a support flag, and a counter over the whole match.

What the operator is being warned about. An unsupported flag does not mean the device is rejected or that the campaign will fail. It means the device is a legitimate member of the fleet whose measurements will never arrive. The ACS accepts the command and reports the device as skipped with an unsupported reason, so the run closes with fewer measurements than devices. Discovering that after a 24-hour window closed is the failure this flag moves forward to the moment the fleet is chosen.

A filter would be worse in both directions. The device counts of the operator would disagree with the device list of the ACS. A fleet selected by condition would also leave out devices the operator believes they selected.

The supported set is the two CWMP protocols and the Technical Report 369 (TR-369) User Services Platform (USP) protocol. Both CWMP data models define the three diagnostics. That is why the newer one belongs here as much as the older one. The ACS also measures USP devices, for the TR-181 Device:2 data model only. A USP device is supported and is not counted in unsupportedProtocolCount. The support flag is false, and the counter counts a device, for any protocol other than TR-069, TR-181 and USP. Examples are MQTT, LWM2M and an unknown protocol. The ACS skips these devices with an unsupported reason.

Two coercions are deliberate:

  • An empty protocol column means the older CWMP protocol, not unknown. The column came long after the table, and a legacy device still carries an empty value. The ACS reads it the same way.

  • An id this build has not learned maps to unknown and is reported unsupported. That diverges from both neighbours. They coerce an unrecognised value to a supported protocol or to a sentinel. A device carrying a protocol id added to the ACS after this build is therefore shown as unsupported while the ACS may still be able to drive it. The service warns about a measurement it is not sure of. It never promises one in silence.

One point depends on the ACS and not on this service.

This service reports a USP device as supported. If the ACS is older, it still skips the USP device with an unsupported reason. Deploy the ACS before this service, or together with it.

A USP device that lacks the diagnostic command, or rejects it, ends in the device state ERROR with the reason DEVICE_FAULT. A CWMP device fault ends in the same way.

The protocol is also frozen with the fleet, so the same question can be answered about a finished run without a live read.

A device without a product class is a member of the fleet

The product class column of a device is nullable, so a device can exist without a model. The service finds such a device anyway. See A device without a model stays findable.

How the device is named What comes back

By its id, or by a serial number

It is found and returned, with empty model fields. It counts in the totals, it can be stored in a fleet, and it is measured like anything else, because nothing downstream needs a model to run a diagnostic.

By any model-based condition

It is excluded, in silence, because a comparison against an empty value is never true.

Such a device can therefore only enter a fleet by id or by serial number, never by narrowing. That difference is correct. An operator who picks all devices of one model has said nothing about a device without a model.

It gets its own bucket in the per-model counts, and that is what keeps the arithmetic true.

Dropping the rows without a model would make the per-model counts sum to less than the total. The entire job of that screen is to tell the operator how many subscribers a campaign covers. An operator compares 1198 against 1200. They cannot find the missing two, and they have no reason to suspect the grid.

Why one URL serves both JSON and an upload

The resolve and the count each have two handlers, on the same path and method, told apart by the content type.

Content type Handler Body

application/json

The JSON handler

The request record.

multipart/form-data

The upload handler

A required file part, plus an optional JSON part carrying the same record.

The framework dispatches on the content type. That is how one URL serves both. A second path would give the frontend two endpoints with the same counters, the same limit refusal and the same two serial reports. The second one is then the one that gets forgotten when a rule changes. Here one service method serves both, and the upload handler does nothing but turn the file into a request record.

The multipart variant forces the file source, whatever the optional JSON part claims, and reads that part for two things only.

Field Value

sourceType

The file source, unconditionally. A part claiming another source is overwritten, not honoured and not refused.

serials

The parsed contents of the file part. A serial list in the JSON part is discarded.

condition

Reduced to the online flag and the domain list. Every other field is dropped.

The paging

Taken from the JSON part as sent.

The upload is the selection. A file of serial numbers combined with a model condition that excluded half of them would resolve to a fleet the operator never uploaded. The serial numbers that the condition dropped would also come back as missing. That reads as your list is wrong, and the list was fine.

The two surviving fields contradict no serial list. They narrow it in ways the operator can reason about, and the domain list is their own scope. They could not widen it anyway.

POST /FCC/activate/devices/countByGroupConfigs

The impact figure of the activation screen, in the Group Update shape: configurations in, one count out.

{"configs": [{"id": 268, "manufacturer": "ALCL", "model": "Nokia WiFi Beacon 4",
              "sourceType": "All", "conditionId": null}]}

The body takes one more optional field, id: the id of the campaign that the screen edits.

id What the count does

Present

The count of All and Condition stays inside the domain bound of that campaign. See The fleet stays inside the domain of the campaign. If the campaign does not exist or the caller cannot see it, the endpoint answers HTTP 404 with FT code 9404.

Absent, or 0 or negative

The count stays inside the scope of the caller, as before. The service treats an id that is not positive as absent.

The id bounds what the screen shows. A client that omits it gets its own scope and never more. The save enforces the bound.

It is not the device count endpoint renamed, and both exist. They answer two different questions.

The device count This endpoint

What an inline selection resolves to: the condition the wizard built, the serial numbers somebody pasted, the file they uploaded.

What saved configurations target, by manufacturer and model name.

Answers the figures a selection needs, including the per-model counts the ceiling is checked against.

Answers one number.

The count is a sum over the configurations, not a union. Two configurations targeting one device count it twice. That is the arithmetic of Group Update, and it is the figure the dialog is built around: how much work each configuration is, added up. The other reading, how many distinct subscribers will be disturbed, is a different question and must not be served in place of this one.

Source type Counted as

All

Every visible device of the named manufacturer and model. A blank name is left out rather than matched as an empty string. The count stays inside the domains of the caller, and it is 0 when they can see no domain.

Individual and File

Zero. The client holds those lists and already knows their size, and the service would have to guess. The Group Update counter answers zero here too.

Condition

The saved condition, intersected with the manufacturer and the model of the configuration. That is what Group Update does too and what the save stores for that configuration. A condition this service does not fully translate is refused with a message, never counted as zero: a zero here is a lie an operator acts on, because the dialog would promise that activating the configuration touches nothing while it touches thousands.

absent

Refused. It decides what is counted, and a guess is how a dialog promises a number nobody asked for.

The Group Update counter also accepts a model name with a protocol label appended and strips it before matching. This service does not, because its own catalog never produces one: it returns the plain model name with the protocol in a separate field. A labelled name would match nothing.

POST /FCC/activate/devices/countByGroupIds

The other half of the impact figure: campaign ids in, one count out, and the simpler half.

It resolves nothing. The fleet of a campaign was resolved once, when it was saved, so the fleet table is the answer. This figure is therefore what the service will dispatch and not an estimate. The run uses exactly those rows. Group Update has to re-resolve instead, because a group keeps the source types of its children rather than a frozen list.

It is a sum over the campaigns, like its sibling: a device in two fleets is two pieces of work. Inside one campaign a double count is impossible, because the unique index forbids it.

An id the caller cannot see, or that does not exist, contributes nothing rather than failing the call. The domain predicate is inside the query, so the two cases are indistinguishable from outside. A count is not a place to disclose that a campaign exists in another domain.

A super-domain caller is served by a separate query with no domain predicate, not by an empty list. An absent domain list is exactly the shape that silently becomes a wildcard, and the scope object keeps the three outcomes apart on purpose.

Duplicate ids are collapsed.

Report endpoints

Four endpoints, all reads: the run list, the measurement page, the aggregate header and the export. Nothing here creates, updates or deletes anything, and there is no report table in the schema.

One filter resolver and one predicate builder serve all four. Every endpoint resolves the same filter body into the same internal filter, and every read is built from that one filter.

That is a correctness property and not an optimisation. A second resolution is how the number above the grid, the rows in it and the file an operator downloads come to describe different selections. See The report read path.

The unit of a report is a run

All four endpoints answer in terms of runs, never campaigns. A campaign with a recurrence produces several runs over a week, and run three has to be distinguishable from run one. Imported measurements arrive under the synthetic runs of the legacy import, so they line up in the same list as everything else.

Rules shared by the four

Rule Why

Cross talk is its own status, never a kind of failure

The WAN was busy above the threshold and the iteration carries no usable figure, so counting it as a breach would overstate non-compliance. Every counter and every filter treats it as a fourth, independent value.

Speed is reported in Kbps, never Mbps

Every tier, every threshold and every field of the contract is in Kbps. A conversion on the way out would put a rounding step between the stored measurement and the figure a report quotes. Rendering Mbps is a decision of the client, made once at the edge.

The after-stop flag is a filter, not a delete

A measurement that arrived after a stop is kept exactly as written, because it is a real measurement of a real device. A report excludes it by filtering, never by removing anything.

Every threshold in a row comes from the run snapshot

The tiers and the success criteria are read off the frozen settings of the run. That is what it was dispatched with. Reading them off the campaign would rewrite the parameters of a finished run on every later edit.

The filter speaks the measurement source dictionary

A measurement is streamed or imported, and a run is live or legacy. The run list enumerates runs, and the source it filters by is the measurement dictionary, translated exactly once. Sending the run spelling is refused before a filter is ever built. See Two different source dictionaries.

All four answer HTTP 503 while the result store cannot be read

The gate runs before anything else. An empty page would be indistinguishable from this campaign measured nothing. That is the one statement a report must never make by accident.

The shared filter

Field Type Notes

domainIds

Number list

Narrows inside the own scope of the caller and can only narrow it. Naming an invisible domain selects nothing at all. Once a campaign is named, the computed scope serves the authorization check only and is not applied as a per-row predicate: a fleet may legitimately hold devices of sub-domains, and filtering them out would hide part of a run the caller may read whole.

testId

Number

One campaign. Outside the visible domains it answers HTTP 404, never 403.

activationId

Number

One run. It must belong to the named campaign when both are given, or the request answers 404.

type

SPEED or LATENCY

Reads one table when given, and the union of both when absent.

manufacturer, modelIds

Text, number list

Resolved through the frozen fleet, never through the live ACS table. Both given at once narrows to models satisfying both. Imported rows are reachable by this filter only where the import wrote a fleet snapshot.

from, to

Instant

Inclusive bounds on the instant the device measured. See The period filter is two predicates.

source

The measurement dictionary

See the shared rules above.

statuses

Status list

Cross talk is never implied by a failure.

afterStop

Boolean

true only measurements after a stop, false only those before, absent no filter. See [report-list-afterstop-not-applicable].

cpeId, serial

Number, text

One device, resolved to the serial numbers it was frozen under. The result tables know a device by the serial number it carried when measured.

POST /FCC/reports/list

One page of runs, each with its five result counters.

The request carries the filter, an optional sort, and the paging. The sortable fields are whitelisted, and an unrecognised one is refused with the allowed set. The page size defaults to 25 and is capped at 500.

The answer carries one row per run:

Field Notes

The ids and the names

The campaign name and the domain are empty for a run whose campaign was deleted, because a deletion keeps the runs on purpose.

source

Translated from the run dictionary into the measurement dictionary, so the value shown is a value the next request may filter by.

The five instants

Four of them are nullable. See [report-list-default-sort].

deviceCount

The size of the fleet the run was dispatched with, not the number of devices that produced a measurement. An unsupported or offline device is counted here and appears in no result row.

The tiers and the success criteria

From the run snapshot.

The five result counters

One grouped query per result table over the whole page, never one count per run. The store holds tens of millions of measurements, and a count per run would be a scan per run.

The after-stop field narrows measurements, and a run has no single value of its own.

This endpoint accepts the field like every other endpoint and applies it wherever it reads result rows. That affects the five counters of a run, and it never removes the run itself from the page. Only the two endpoints that page and stream measurements can exclude individual rows by it.

The default sort is the creation instant, descending, and it is the only sortable field that is never empty.

Four of the others are nullable: a run that never started has no start instant, and one that was not stopped has no stop instant. The two database vendors place empty values at opposite ends of an ordered result by default. A sort by one of those columns therefore groups the runs without that instant differently per installation. A caller has no way to see that coming from the request alone.

POST /FCC/reports/results

One page of measurements, with a real total over the whole filtered set.

The request carries the filter and the paging. The page size defaults to 50 and is capped at 1000. The cap is higher than the one of the run list. A measurement row is smaller, and a grid shows far more of them.

There is no sort field on this request, and that is deliberate.

The order is fixed: the measurement instant followed by the natural de-duplication key of the result tables. Paging a store of tens of millions of rows needs a total, unique order. A weaker order repeats a row on one page and drops it from the next. Two requests over an ambiguous order do not split the selection reliably.

The tail of the fixed order is exactly the natural key that makes rows unique, so the order is both total and free.

The answer carries the common block plus exactly one of two blocks:

Block Present when Fields

speed

The speed type

The rate in Kbps, the two byte counters, the connection count and the two measurement instants. A row whose description is not blank is a device error: its status is OTHER and its rate is 0, while the byte counters and instants are the raw values the device reported (see device error).

latency

The latency type

The three round-trip values in milliseconds, nullable because a ping that lost every packet has no average and a zero would be indistinguishable from a sub-millisecond round trip. Plus the two packet counters, and the repetition count and block size the device actually used.

The other block is empty. That is what a positional union of the two tables means.

A campaign or a run the caller cannot see answers HTTP 404, never 403.

POST /FCC/reports/generate

The header figures of a report, over the same filter the measurement page uses.

The service computes them in one statement over the union and not in two sums. The distinct counts cannot be added per table without double-counting a device that appears in both a speed and a latency campaign.

The request carries the filter and nothing else.

Field Type Notes

total, success, failed, crossTalk, other

Number

Cross talk is its own counter.

deviceCount, activationCount

Number

Distinct serial numbers and runs across the whole selection.

firstStartedAt, lastStartedAt

Instant

Empty when the filter selects nothing.

speedAvgKbps, speedMinKbps, speedMaxKbps

Number

In Kbps.

latencyAvgMs

Number

The average of the per-iteration averages, over the iterations that have one. A ping that lost every packet contributes no value and does not pull the figure toward zero.

latencyMinMs, latencyMaxMs

Number

The two extremes.

This operation creates nothing and stores nothing, and repeating it is free and safe.

The schema holds no report table. This call produces the whole answer, and the same filter recomputes it identically every time. The downloadable file comes from the export, and the runs come from the run list.

The verb is POST and not PUT. An older client or an older snapshot that still says PUT is behind this service. A PUT states that a resource is created or replaced at the address, and this call creates nothing. Proxies, retry logic and caches are entitled to treat a write differently from a read, and this is a read.

It is a POST and not a GET for the same reason as the other three. The filter body is far too large for a query string.

POST /FCC/reports/export

The same rows the measurement page serves, in a file, streamed.

The request carries the filter and no paging, because an export is the whole selection. It also carries a required format, either a spreadsheet or a CSV file. The format is a field of the body and not a path extension. Both formats therefore pass the same filter resolution, access check and gate. A second path per format would be a second place for any of the three to be forgotten.

The answer is HTTP 200 with the content type of the format, a file name of the shape fcc-report-<scope>-<timestamp>.<ext>, and a raw byte stream. There is no JSON envelope and no page.

Nothing is accumulated anywhere: not a page, not a list, not a temporary file.

A row travels from the store into the writer and out to the caller on its own. The service reads 5000 rows at a time from the store. The UI Backend streams this answer through to the browser unchanged. A buffer on this side would remove the only reason for this shape.

That is also why the service does not use the usual spreadsheet library. Its in-memory model builds the whole book in memory, and its streaming variant spools the sheet to temporary files. That is the cost this shape avoids. The service assembles a minimal package by hand instead, with no shared string table and no style table. Instants are text in UTC and not spreadsheet date numbers, because such a number carries no zone and a regulatory extract needs one unambiguous instant. Numbers stay numbers, so the measurement columns can still be summed in a spreadsheet.

There is no content length, and that is the point of the endpoint. The size is unknown until the last row is read. A size up front would mean counting the rows twice, or building the whole file first.

Every refusal happens before the first byte.

The service checks the gate first, then the body, the domain scope and the named campaign or run. All four checks run in one read-only transaction, before the stream starts. The transaction covers the preparation and nothing more. The stream runs later and on another thread. A longer transaction would hold a connection for the minutes a large extract takes.

Once the status line is on the wire, nothing can become an error any more. A failure during the stream can only close the socket and write a log line naming the identifiers and the row count already written. The client then sees a truncated file with no error in it. See the truncated export in Troubleshooting.

The CSV format is UTF-8 without a byte order mark. A mark would help one spreadsheet reader guess the encoding and it would corrupt the first heading for every program that parses the file. That is what a compliance extract is mostly fed to. The encoding is stated in the content type instead.

The description column is untrusted device text in both formats. The CSV writer quotes the value and doubles an embedded quote. The spreadsheet writer escapes the markup characters. It also drops the characters the format forbids and keeps a valid pair whole.

Set a client timeout of at least five minutes. A large extract legitimately takes minutes to stream, and the server side of the same requirement is the asynchronous request timeout.

Status codes of the four

Status When

200

Answered. For the export, the status and the headers are sent before the body streams.

400

The body fails validation, names an unsupported enumeration constant, or carries an unrecognised sort field.

404

A named campaign or run the caller cannot see, or a run that does not belong to the named campaign. Never 403.

503

The result store cannot be read, unreachable or behind on its migrations.

Administration endpoints

The two tables are not authorized the same way

Table Read Write and delete Because

The model capabilities

Any caller

The scope ALL is required, 403 otherwise

The table is global for the installation. It is keyed by a model id and carries no domain, because a connection ceiling is a property of the hardware and constrains the campaigns of every domain alike.

The domain settings

Confined to the visible domains

Confined to the visible domains

The rows are domain-scoped. An operator changing the default test server of their own domain affects only their own future campaigns.

The scope rule on the capabilities is the whole access model there. This product has no role model at all.

Every caller the UI Backend lets through may do everything their scope permits. No permission bit in this service could express installation administrator, so the scope is the only boundary that exists.

Without this rule an operator of a single domain could raise or, far worse, lower the ceiling for every other operator of the installation. The refusal would then surface on the campaign of somebody else, naming a number they never typed.

Reads are deliberately open to any caller. The same ceilings are already visible through the wizard catalog. Hiding the administration view of numbers the wizard prints would protect nothing. It would also make the screen unusable for the operator who has to report the problem.

404 on a read, 403 on a write

For the domain settings, a row outside the visible domains reads as 404 and writes as 403. The asymmetry is deliberate.

Operation Status Reasoning

A read of an invisible domain

404

A read is an id the caller may have guessed. A 403 would confirm that a row exists for a domain they cannot see. A visible domain with no row is the same 404, and honestly so: this domain publishes no overrides and there is no record to show you are the same fact.

A write for an invisible domain

403

A write names its domain explicitly in the body. The caller already knows which domain they are asking about, so there is nothing to conceal, and a 404 would read as that domain does not exist and send an operator looking in the wrong place.

A delete naming an invisible domain

200, with the refusal in that item

The bulk envelope wins here, exactly as it does for the campaign delete. The reason text is the forbidden one and not the missing one, for the same argument: it is the status that is 200, not the semantics that changed.

The capability table has no such split, because it has no domain to conceal. Its read answers 404 purely for a model nobody has entered a row for.

That does not contradict the rule that a model without a row is unconstrained. What may this model be asked to do has an answer for every model, and show me the record somebody entered has none when nobody entered one. An empty row would leave the edit screen unable to tell no limits recorded from limits recorded as none.

/FCC/admin/model-capability

Four operations on the global capability table. See fcc_model_capability for the schema.

Operation Request Answer

POST /FCC/admin/model-capability

An optional model id list, capped at 1000, plus the paging

A page of rows, sorted by model id

POST /FCC/admin/model-capability/details

A required model id

One row, or 404

PUT /FCC/admin/model-capability

The row

The surrogate id of the row

DELETE /FCC/admin/model-capability

A required, non-empty model id list

One result per model id

A row carries the model id, the manufacturer and model names, the two ceilings, the time-based flag and the two audit instants.

The two names are read from the ACS for the ids of the page only, never for the whole table. That is what a join across two schemas would amount to. A capability row whose model was removed from the ACS renders with empty names and keeps its row. Three reasons: it is the data of the operator, the ACS is read through a read-only account, and that schema may be mid-migration. Destroying stored data because one read came back short is not a trade this service gets to make.

The upsert request carries four fields:

Field Type Notes

modelId

Number, required

It must exist in the ACS, checked on every write. This is the referential check the table cannot have as a foreign key, and it is worth making by hand: a row written against a mistyped id constrains nothing, forever, and is invisible, because every lookup of it is by an id no fleet will produce. The operator would see their limit saved and watch campaigns ignore it.

connectionsDlMax

Number

Between 1 and 4 when given, judged by the same method the campaign save uses. An empty value clears the ceiling and means unconstrained. It is not leave the stored value alone, because this request states the whole row.

connectionsUlMax

Number

The same for the upload direction.

supportsTimeBased

Boolean

Stored and acted on. Setting it is what opts a model into the time-based mode, and the campaign save refuses that mode over any model without such a record. An absent value is stored as false, so the column is an opt-in and never a restriction.

There is no row id and no create flag. The unique index makes one row per model the only possible state, so the model id is the key. A caller that had to know whether the row exists would be doing the work of the service.

Removing a row makes the model unconstrained again, and it changes no existing campaign.

The scope check is a whole-request refusal. It runs once, before the loop, so a caller who may not administer capabilities is not told forty times over which model ids exist.

/FCC/admin/domain-setting

Four operations on the per-domain level of the settings chain. See fcc_domain_setting for the schema and 404 on a read, 403 on a write for the two statuses.

Operation Request Answer

POST /FCC/admin/domain-setting

An optional domain list, plus the paging

A page of rows, sorted by domain id, narrowed to the scope of the caller

POST /FCC/admin/domain-setting/details

A required domain id

One row, or 404, both for a domain with no row and for one outside the scope

PUT /FCC/admin/domain-setting

The row

The surrogate id, or 403 for a domain outside the scope

DELETE /FCC/admin/domain-setting

A required, non-empty domain list

One result per domain id, with HTTP 200

The row carries seven values: the two URLs, the two thresholds, the two success criteria and the ping host.

Every field is nullable, and an empty value means this domain publishes no opinion on it. The campaign then falls through to the global default, or to nothing at all for the two URLs and the host. They have no level below the domain.

A write states the whole row. A field sent empty clears that override and sends the field back to its global default, rather than leaving the stored value alone. There is no partial update, because the screen renders every field and a caller that could omit one would have no way of clearing it.

The field rules are the campaign-level ones, called as the same methods:

Field Rule

The two URLs

Absolute, with the scheme http, https or ftp, and with a host.

The thresholds and the success criteria

Positive when present.

The ping host

Stored as given. It does not make the field optional on a campaign: the save still refuses a latency campaign with no host from either level. A domain default saves the operator from retyping the target of the provider, and it must not create a campaign that pings nothing.

One rule, one implementation. A default the campaign validator would reject must not be storable as a default. The refusal would otherwise surface later on every campaign of that domain, naming a value the operator never typed.

This is now a second gate rather than the only one, because the save validates the resolved record. The service keeps both checks. An administrator fixes the value on the administration screen. The campaign gate stops a row stored before this rule from reaching a run.

Editing or deleting a row changes no existing campaign.

The chain is walked once, when a campaign is saved. A campaign that already froze the old URL keeps measuring against it for the rest of its runs. That is the behaviour a report depends on.

That is also why the audit trail matters more here than for a campaign, not less. A campaign that was changed still carries its own settings and its own run history. A change to a domain setting leaves nothing behind in the campaigns it goes on to shape. A campaign saved after an edit looks as though the operator had typed those numbers. The audit row is the only record that they did not.

POST /FCC/admin/result-dead-letter/resend

Feed parked measurements back through the ingest path. Nothing here belongs to the normal flow of the portal. An operator uses these endpoints after an incident.

Request: a limit. Answer: how many measurements were resent.

Field Notes

limit

How many pending rows to read, oldest first. An empty or non-positive value means the configured batch size. That is also the ceiling. A larger value is clamped, because one call must not pull an unbounded backlog into the in-memory buffer and re-trigger the overflow the table absorbs.

resent

How many measurements were handed back to the ingest path. It is not the number of rows read, because unreadable rows are discarded and do not count as recovered. It is also not already in ClickHouse, because the ingest path writes asynchronously and a row whose write fails again is parked anew, as a new row.

The read takes the oldest pending rows first and leaves the late ones out. Each row then has one of two outcomes.

Row What happens

An unavailable-store row

Read from its payload and replayed through the ordinary ingest path, then marked as resent. The payload is the wire form, so the resend runs the same mapping a live message runs and cannot drift from it.

A row whose payload cannot be read

Marked as discarded with the parse error, and counted. It can never succeed, and such a row left pending would be read forever and would stay in front of the oldest-first read.

Late rows reach neither branch. They are written straight as discarded, and the read excludes them as well. A row from an earlier build that is still pending and late is skipped and counted. That counter is the one signal that the table holds rows the recovery path cannot use.

Each row is replayed under the instant of its own arrival, not under the clock of the resend.

The service groups the rows by their arrival instant and hands them to the ingest path one group per instant. Both the after-stop mark and the too late for the run rule are computed from that instant.

Take a measurement that arrived at 10:00 and a run stopped at 09:50. A resend at 14:00 would judge that measurement late and park it again as an excluded row. The original row is marked as resent at the same time.

Every parked measurement of every stopped run would therefore move from recoverable to excluded, by the call meant to recover it. The operator would be told the data was recovered at the exact moment it was thrown out.

The resend is itself refused while the result store cannot take rows.

Here the damage is immediate rather than hours away: the ingest path a resend feeds is the same path that parked these rows. With the store still unavailable every replayed measurement is parked straight back as a new row, and the table multiplies. The operator is told the rows were recovered, because resent means handed back and not stored. A schema behind on its migrations closes the same gate for the same reason.

There is no resend poller. This endpoint is the only trigger, nothing drains the table on a schedule, and there is no attempt ladder.

A backlog therefore sits there until an operator calls this endpoint, after the outage is over. Calling it while the store is still down parks the rows again.

Calling it more than once is safe: a resent row is not read again, and the de-duplication of the ingest path catches an overlap.

Import and export endpoints

See Configuration import and export for the document format and every rule behind these two. This section is the request and the answer only.

PUT /FCC/item/export

Stream the configuration of one campaign out as an XML document. The document carries the name, the domain, the recurrence, the timing, the configurations with their settings and the frozen fleet by serial number. It carries nothing that happened to the campaign afterwards: no booking, no state and no run history.

Request: one campaign id. That is the Group Update shape too.

The document format still carries several campaigns, and that is not a leftover. The root element holds several campaign elements, and the format describes what a document may contain. This endpoint decides what it writes, and the import reads one.

Answer: HTTP 200, the XML content type, a file name of the shape fcc-<campaign name>-<timestamp>.xml, and a streamed body. There is no content length, because the size is unknown until the last device is read. The fleet travels in pages of 1000 serial numbers, so a campaign of twenty thousand devices costs constant memory.

The file is named after the campaign, so an operator exporting five campaigns gets five distinguishable files rather than five timestamps a second apart. The name is sanitised and not quoted. Everything outside letters, digits and three punctuation marks collapses to a dash, and the result is cut to 80 characters. A name that leaves nothing falls back to the id.

A campaign name is 255 characters of whatever the operator typed. Three of those characters cause a problem outside the file. Those are a path separator, a quote that would end the header value early and a line break that would split the header.

Status When

200

The id existed, was visible and named no legacy campaign. The document then streams.

400

The id names a legacy campaign. It carries no configuration to export, or the body fails validation. Refused before the first byte.

404

The id does not exist, or exists outside the visible domains. Never 403.

Every check runs inside one read-only transaction before the stream is constructed. Once the status line is on the wire nothing can become an error any more, and the client sees a truncated file. That is the identical rule, for the identical reason, as the report export.

PUT /FCC/item/import

Read a configuration document into a campaign form. It creates nothing.

The reference endpoint of Group Update does exactly this: it parses the file and answers the form payload, un-saved. Its screen shows the form and the operator presses save. That is a different endpoint.

Request: multipart/form-data with the part file only. There is deliberately no raw XML variant of this path. The file name must end in .xml, checked by name so the message can say so.

Answer: the details object of a campaign. That is the body the save accepts. The import, the form and the save therefore speak one object.

Five fields of the answer are set by the import:

  • The id is empty, and that is what the save reads as create.

  • The state is not active. That is the state the save will create. An imported campaign never arrives running or with a history.

  • The activation type is Immediately, because the document carries no booking and an empty value would leave the radio of the form unset.

  • The source type of the configuration is Individual and the rest of the choice is empty. The document carries a fleet and not the selection that produced it, so no manufacturer, model or condition is invented from the devices that resolved.

  • The device list carries ids, resolved from the serial numbers of the document through the save path, scoped to the domains of the caller.

Status When

200

The document described one campaign and every serial number resolved. The answer is the form.

400

Everything the document can get wrong, at any point in the parse: a wrong file name, an empty or unreadable upload, a wrong root element, a bad format version, no campaign element, more than one campaign element, a missing type, a settings block that does not match the type, an unknown or repeated element, an element the format omits, a fleet above the device limit, and a serial number that matches no visible device. None of them can leave anything behind, because nothing is written.

413 or 415

The multipart upload itself, before the document is read.

500

A programming error and not a mistake of the caller: a record component of a type the reflective converter cannot carry. It propagates, so an operator sees an error rather than a message claiming their document was wrong for a reason that is not theirs to fix.

The legacy import endpoints

Three endpoints: a start, a status and a stop. They drive the import that replays the old FCC measurements into ClickHouse. See Legacy FCC import for what it reconstructs, and The legacy import runbook for the operator sequence.

All three are a POST, including the status call, and that one only reads. That is the style this whole service is written in.

They live in a controller of their own and not with the other administration endpoints. The other controller holds the endpoints of normal operation. This one holds a migration that you run once, watch and switch off afterwards. The two groups also differ in their access rule. Keeping them apart stops the weaker rule from reaching an endpoint that needs the stronger one.

All three require the scope ALL, reads included. That is stricter than any other endpoint of this service, including the administration endpoints, where only the writes demand it.

Three reasons apply, and each one is enough on its own.

  1. The import creates campaigns in arbitrary domains. An imported campaign takes the domain of the legacy group, never the domain of the caller, and the measurements go into an installation-wide table. A domain-scoped caller would be authorizing writes far outside their own scope.

  2. A partial import by a domain user would be permanent. The cursor and the watermark know nothing about domains, so a pass narrowed to one domain would still advance them past the rows of every other domain, and those rows could never be imported.

  3. The progress counters disclose the data volume of every other domain. A domain scope exists to withhold exactly that.

This product has no role model, so the scope ALL is the closest thing to an installation administrator the contract can express.

A missing or narrower scope answers HTTP 403 with FT code 9403, and the message states why. That is not the 9401 of a malformed identity header pair.

POST /FCC/admin/legacy-import/start

Every field of the request is optional.

Field Type Notes

kinds

A list of the two result kinds

Which legacy tables to import. An empty value means both. One worker imports them one after the other, and each carries its own cursor, so starting one alone is a legitimate way to retry a failed kind. Duplicates collapse.

dryRun

Boolean

Measures the remaining work, records it as the estimate, and returns without importing anything. It claims nothing, writes nothing and is not behind the result gate, so it is always safe to call, including during an import and during an outage.

batchSize

Number

Overrides the configured batch size for this run only, bounded at 100000. It is the unit of the two-phase commit, so a smaller value means more frequent commits and a smaller window to re-check after a crash, at the cost of throughput.

The remaining work is counted first and always, dry run or not. It is the only number that makes the progress readable as a fraction. Its cutoff comes from the current time rather than from the start instant of the pass. The count happens before the claim decides whether this start is a fresh pass or a resumed one.

A pass never reads up to the present. The newest measurements of about 25 hours are picked up by a later pass. That delay gives you a watermark that cannot skip a row. See Expect about 25 hours of lag.

The claim is all or nothing. If the second kind cannot be claimed the first is released again, because a start that answers 409 must not leave half an import running.

The answer is the status body. The call returns as soon as the kinds are claimed, and the pass runs on its own worker thread.

POST /FCC/admin/legacy-import/status

No request body. The answer carries whether a start is allowed, the configured zone, and one entry per result kind, always both.

The fields of an entry and how to read them are in Watch the progress.

The configured zone is the zone a new pass would read the legacy timestamps in. A pass under way keeps the zone recorded on its own row, because the day windows it already created were computed with it.

POST /FCC/admin/legacy-import/stop

An optional body with the kinds, and an empty value means both.

The stop is cooperative and returns at once. The service records the flag, and the worker notices it between two batches. The row then ends idle on a committed cursor, and the next start resumes from it. The stopping state in between exists so an operator can see the request was recorded.

There is deliberately no forced variant. A kill inside a batch is what the pending range and the recovery probe survive.

A stop of an import that is not running is not an error, because the next start clears the flag.

Status codes of the three

Status When

200

Answered. All three return the status body.

400

A start while the import is disabled, or a zone id Java does not know. An unparseable zone is refused rather than defaulted, because the legacy timestamps carry no offset and a wrong zone displaces every imported measurement. Also the ordinary body validation, including an unknown kind.

403

The scope is not ALL, on any of the three. See [legacy-import-requires-all-scope].

409

On a start only: the kind is already imported by a run with a fresh heartbeat, possibly on another service instance, because the claim is a database statement and not a process lock. It is a 409 and not a lock status, because the request is valid and will succeed as soon as the other run ends. The message names the holding run and its last heartbeat.

503

On a start only, and not for a dry run: the same gate every activation and report goes through. Beginning an import during an outage would read millions of rows, fail every insert, and leave a cursor past rows nothing wrote. A store that goes down during a run is not an error answer at all, because the pass ends cleanly on its last committed cursor.

Service-to-service endpoint

This endpoint is for the UI Backend and for no other client. It is not in docs/openapi/ft-fcc-service.yaml and not in /v3/api-docs, because the controller is hidden on purpose. A browser never reaches it: the UI Backend answers HTTP 404 with FT code 9210 for any /FCC/internal/** path. The UI Backend uses it to bound the device list of an FCC campaign. See No authentication of its own.

POST /FCC/internal/item/domain

Answer the domain where a campaign was created.

The identity rules of every /FCC/* path apply here without an exception. The caller sends the identity headers of the portal user. The answer depends on what that user can see, exactly as for POST /FCC/item/details. The header X-FT-Source is not required, because a static header adds no authentication.

{"id": 7}
Status Code Meaning

200

The body is {"domainId": 12}. The value is never null. 0 is the super domain.

400

9400

The id is missing or invalid.

403

9401

The identity headers are not satisfactory. See Two FT codes answer HTTP 403.

404

9404

The campaign does not exist or the caller cannot see it. The two cases look the same by design.

The UI Backend maps the answer and fails closed. It never turns a failed lookup into the whole scope of the caller.

Reserved, not used in this version

Endpoint Purpose Status

POST /FCC/internal/platform-event

Reserved. The ACS has no instance-level webhook, and a restart of the ACS is surfaced through a failure event and the watchdog instead. The path is behind the identity filter, like the rest of /FCC/internal.

Reserved