API & Integration Documentation
1. API Overview
The Northbound API exposes a RESTful API that allows clients to:
-
Authenticate and obtain JWT tokens
-
Manage device provisioning and configuration
-
Query device status and information
-
Configure network services
-
Monitor service status
2. API Design Principles
The API follows these design principles:
-
RESTful: Resources are identified by URLs and manipulated using standard HTTP methods
-
Stateless: Each request contains all necessary information
-
JSON-based: Request and response payloads use JSON format
-
Versioned: API versioning supports backward compatibility
-
Documented: OpenAPI/Swagger documentation is provided
JSON request field names are matched case-insensitively, matching the legacy .NET REST API. The canonical casing shown in the OpenAPI/Swagger schema is PascalCase (for example Parameters, Key, Value, Creator), but lowercase or mixed-case variants deserialize identically.
|
|
Breaking change in 1.0.1 — The custom key/value list on Because unknown JSON fields are ignored rather than rejected, a client that keeps sending Custom parameter keys are validated: only
The rename restores parity with the .NET contract rather than diverging from it, so it is not listed under Differences from Legacy .NET API: after the change the After column matches the .NET column on every row above. The
It completes DEV-2419, which corrected the same typo on the response side. |
3. Authentication
The Northbound API is secured via a custom JWT filter (FTApiJwtFilter) that intercepts incoming HTTP requests and delegates token validation to the AuthService.
3.1. Token Extraction
-
The filter reads the authentication token from the HTTP header named by
Authorization(IOT_AUTH_HEADER defined inCommonRegistry). -
Requests to
/api/System/Token, non-API endpoints, and HTTPPOSTrequests are excluded from filtering.
3.2. Token Validation
-
For protected endpoints, the filter invokes:
authService.authorizeFromHeader(token)to validate the token and populate the Spring Security context.
3.3. Unauthorized Handling
-
After the filter chain, if the response status is
401 Unauthorizedand noWWW-Authenticateheader is present, the filter adds:WWW-Authenticate: Basic realm="<soapUrl>"wheresoapUrlis injected from theapi.soap.urlproperty. -
If
AuthServicethrowsFriendlyUnauthorizedUserException, the filter:-
Clears the
SecurityContextHolder. -
Sets response status to
401. -
Sets
Content-Typetoapplication/json. -
Serializes an error response via Jackson
ObjectMapperusing:authService.buildErrorResponse(e)
-
3.4. Configuration
-
api.soap.url(set through theNBI_SOAP_URLenvironment variable, defaultFTACSWS) sets the SOAP base URL and realm for authentication challenges. -
Whether authentication is required at all is the
api.settings.authsetting, managed in FT Configs Service (see ISP and Authentication Settings). -
Ensure
FTApiJwtFilteris registered as a Spring component to apply this security logic to all API requests.
4. API Endpoints
For detailed API documentation, please refer to the OpenAPI/Swagger documentation available at:
-
Swagger UI:
http://<server>/iot-webservice/swagger-ui/index.html-
Use the environment selector in the top‐right to switch between:
-
-
REST API (auto‐generated from code annotations)
-
SOAP API (hand-crafted OpenAPI spec for all SOAP operations)
The Swagger UI provides:
-
Interactive documentation for all API endpoints (REST and SOAP)
-
Request and response schemas for each endpoint
-
The ability to try out API calls directly from the browser
-
Authentication requirements and methods
-
Parameter specifications and constraints
|
The Swagger UI is the most up-to-date source of API documentation as it is automatically generated from the application’s code annotations and includes the full SOAP API specification. |
5. Error Response Format
All error responses follow a standardized format.
5.1. SOAP/XML Format
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ServerWSResponse xmlns="http://www.friendly-tech.com">
<ServerWSResult>
<ErrorCode>100</ErrorCode> <!-- 100 = success; other codes = failure -->
<Message/> <!-- error message, if any -->
</ServerWSResult>
</ServerWSResponse>
</soap:Body>
</soap:Envelope>
5.2. JSON Format
{
"errorCode": 100,
"message": ""
}
The same error codes and meanings apply in JSON responses.
Error Code |
Enum |
Description |
100 |
SUCCESS |
|
200 |
FAIL |
Operation failed |
201 |
NO_CPE |
No CPE |
201 |
USER_EXISTS |
Username already exists |
201 |
USER_NOT_EXISTS |
Username does not exist |
202 |
NO_DB |
No database available |
203 |
INCORRECT_REQUEST |
Incorrect request |
203 |
INCORRECT_REQUEST_STRUCTURE |
Incorrect request structure or non-writable parameter |
204 |
GENERAL |
General error |
205 |
NO_ACS |
No ACS available |
206 |
NO_CPE_NEW_SN |
No CPE for new serial number |
207 |
NO_CPE_CURR_SN |
No CPE for current serial number |
208 |
NO_TRANSACTIONS |
No transactions found (Java-only; see Unified "No transactions found" Error (ErrorCode 208)) |
401 |
UNAUTHORISED |
Wrong username or password |
ErrorCode=208 (NO_TRANSACTIONS, No transactions found) is a Java-only code introduced by DEV-2484 (with PO sign-off). It does not exist in the legacy .NET API, which used 203 for the same transaction-not-found cases. See Unified "No transactions found" Error (ErrorCode 208).
|
6. Validation
The API implements validation for request payloads:
-
Required Fields: Fields marked as required must be present
-
Field Formats: Fields must have the correct format (e.g., IP addresses, MAC addresses)
-
Enumerations: Fields with enumerated values must contain valid values
-
Range Constraints: Numeric fields must be within valid ranges
Business-rule validation failures are reported in the response body as an ErrorCode in the 20X range with an HTTP 200 status, not as a 400 Bad Request — see Error Response Format. A request body that cannot be read is treated the same way and returns ErrorCode=203 (Incorrect request structure) with an HTTP 200 status: that covers a JSON syntax error, an empty or absent body, a root value that is not an object (see Malformed JSON Body Rejected Uniformly (ErrorCode 203)), and a value that fails to bind on a field without a lenient deserializer (see Unbindable Member Value Rejected (ErrorCode 203)).
|
A value that cannot be read as the field’s declared type is coerced to
On The outcome after coercion differs per field because the binding layer decides nothing: it only produces A boolean field carrying the lenient deserializer accepts exactly what the legacy .NET binder accepts: the Fields outside this table are not covered by the mechanism, and their behavior has to be read per field and per endpoint rather than assumed from the table. Two worked examples, both for
Extending the coercion to the remaining numeric and boolean fields — |
7. Differences from Legacy .NET API
The Java Northbound API is a port of the legacy .NET Northbound API. Wherever practical, behavior is kept identical. In a small number of places the Java port intentionally diverges from the .NET reference to eliminate historical inconsistencies, clarify contracts, or simplify maintenance. This section documents those intentional differences so integrators relying on the legacy behavior can update their clients.
|
Governing principle. Port parity is the default, not an absolute rule:
The goal is a correct, maintainable API — not a bug-for-bug replica. Every entry below is an intentional, reviewed deviation, not an oversight. |
|
As a rule, only |
7.1. FTGetDeviceParameters, FTGetDeviceParametersWithTasks and parameters-check-exist
The api.settings.request.parameters-check-exist setting applies to FTGetDeviceParameters and FTGetDeviceParametersWithTasks on both SOAP and REST (POST /api/Parameter and POST /api/Parameter/GetDeviceParametersWithTasks). The .NET API applies it only on SOAP (DEV-3050). The .NET REST transport always checks the names.
With Source=0, the response after the wait is always a fresh read from the database. This matches the .NET SOAP readFromDb behavior. Previously the Java API could return the values read before the request when the task finished before polling began. Per-parameter error entries (blank or unknown names) are not included in the response after the Source=0 wait. This is the same as .NET SOAP.
7.2. TransactionId Validation
Endpoints that accept TransactionId reject non-positive values (0 and negative numbers) with a uniform rule across both REST and SOAP transports.
Affected endpoints:
-
POST /api/Task/Pending/Transaction/ SOAPFTGetCPEPendingTasksByTransaction -
POST /api/Parameter/Transaction/ SOAPFTGetDeviceParametersByTransID -
POST /api/Transaction/ SOAPFTGetTransactionStatus -
POST /api/Diagnostic(get-by-transaction) / SOAPFTGetDiagnosticByTransaction
Behavior:
-
TransactionIdmust be a positive integer (> 0). -
Invalid values (
0, negative numbers, ornullwhere the field is required) are rejected before any database access. -
Response carries the typed response body with default values (empty collections or zero counts), HTTP status
200, and the error fields set as below.
| Field | Value |
|---|---|
|
|
|
|
| Endpoint | Input | .NET (REST / SOAP) | Java (REST & SOAP) |
|---|---|---|---|
|
|
REST: |
|
|
|
REST: |
|
|
|
REST: |
|
|
|
REST: |
|
Rationale: the .NET message variation is a historical artifact of the legacy codebase, not a documented contract. The Java port standardises on a single, unambiguous message while preserving the ErrorCode=203 contract that clients rely on. Related tickets: DEV-1714, DEV-1715, DEV-1717.
The Diagnostic get-by-transaction endpoint is aligned with the same rule (DEV-2491). Legacy .NET REST already guarded non-positive TransactionId with this exact message (DiagnosticController.cs); legacy .NET SOAP had no up-front guard, so transid ⇐ 0 fell through to an empty result and returned Transaction <value> not found (Diagnostic.cs). The Java port unifies both transports on TransactionId must be a positive number. In addition, an empty REST "TransactionId" previously crashed deserialization (HTTP 500, ErrorCode 204); it is now rejected as ErrorCode 203 before any database access, consistent with the sibling endpoints.
A non-numeric REST "TransactionId" (for example "AA981") is handled the same way (DEV-2501). Previously it crashed Jackson body deserialization and returned HTTP 500, ErrorCode 204; it is now leniently deserialized to null and rejected by the same guard as empty and non-positive input — HTTP 200, ErrorCode 203, TransactionId must be a positive number. This matches legacy .NET, where a value that cannot bind to the request’s long TransactionId property leaves it at its 0 default, which the TransactionId ⇐ 0 guard then rejects with the same message. The lenient deserializer is written against the Jackson 3 API (tools.jackson.*), which is what Spring Boot 4 uses for the REST message converters.
This currently applies to three of the required-TransactionId REST endpoints: POST /api/Diagnostic, POST /api/Transaction, and POST /api/Parameter/Transaction. The fourth required endpoint, POST /api/Task/Pending/Transaction, is not yet covered: its request field is inherited by the optional list endpoints (POST /api/Task/Pending, /Failed, /Rejected), whose legacy long? semantics treat a missing/non-numeric TransactionId as "operate on all". Unifying it therefore depends on an unresolved product decision and is deferred.
For a valid, positive TransactionId that does not correspond to any stored transaction, the Java port distinguishes a missing transaction from an existing transaction that simply has no tasks — on both REST and SOAP transports:
-
Transaction row absent →
ErrorCode=208,No transactions found(see Unified "No transactions found" Error (ErrorCode 208)). -
Transaction exists but has no tasks in the caller’s scope →
ErrorCode=203,There are no tasks for Transid <value>.
Legacy .NET SOAP (FTGetTransactionStatus) already drew this distinction; legacy .NET REST did not — it returned the no-tasks message for both cases. The Java port aligns both transports on the SOAP behavior. HTTP 200 is unchanged in every case. Since DEV-2484 the transaction-not-found case carries the new ErrorCode=208 (No transactions found) instead of 203; the "exists but no tasks" case keeps ErrorCode=203.
| Scenario | .NET (REST / SOAP) | Java (REST & SOAP) |
|---|---|---|
Positive |
REST: |
|
Positive |
REST: |
|
Rationale: distinguishing "the transaction does not exist" from "the transaction has no tasks" gives callers an actionable, unambiguous message and makes REST consistent with SOAP. DEV-2484 (with PO sign-off) further standardises every transaction-not-found response onto the single new ErrorCode=208 (No transactions found); see Unified "No transactions found" Error (ErrorCode 208). Related tickets: DEV-2444, DEV-2484.
7.3. Absent or Empty Parameter Name
Several parameter-bearing operations reject a parameter that carries a Value but no Name (empty or null) with ErrorCode=203 (INCORRECT_REQUEST), whereas the legacy .NET API returns ErrorCode=204 (GENERAL) for the same input. The behavior is the same on REST and SOAP.
| Operation | REST / SOAP | .NET (REST & SOAP) | Java (REST & SOAP) |
|---|---|---|---|
Add object parameter |
|
|
|
Set parameters |
|
|
|
Create diagnostic |
|
|
|
Rationale: a parameter without a Name is a malformed request structure, so 203 (INCORRECT_REQUEST) is the semantically correct code. In the .NET implementation this scenario never reaches request-structure validation — the empty name is caught earlier, during payload-to-domain conversion (the ToDeviceParam conversion in the controller layer, before the business layer), as a generic exception that falls through to the catch-all 204 (GENERAL); the explicit 203 check inside the .NET business layer is unreachable dead code. The Java port keeps the more accurate 203. The Message wording differs across the three operations on the Java side (FTAddObject matches the .NET text exactly; FTSetParameters and FTCreateDiagnostic carry an operation-specific prefix) — only the ErrorCode is contractually relevant. Related tickets: DEV-2416 (FTAddObject), DEV-2458 (FTSetParameters; FTCreateDiagnostic identified during the same registry consolidation).
7.4. FTGetCPEByIP With a Malformed Stored STUN Address
GET /api/Device/ByIp / SOAP FTGetCPEByIP may, on a second STUN resolution attempt, read a device’s stored UDPConnectionRequestAddress from the database. When that stored value is malformed and cannot be parsed as a URI, the Java port returns ErrorCode=203 (INCORRECT_REQUEST) with the parser error message, whereas the legacy .NET API lets the raw UriFormatException fall through to the catch-all ErrorCode=204 (GENERAL). The behavior is the same on REST and SOAP.
Unlike the absent-parameter-name cases, the malformed value here originates from stored device data, not from a request field, so this path is only reachable for a device whose persisted STUN address is already corrupt.
| Scenario | .NET (REST & SOAP) | Java (REST & SOAP) |
|---|---|---|
|
|
|
Rationale: an unparseable stored address is a structural data problem, so 203 (INCORRECT_REQUEST) is more precise than the generic 204 the .NET catch-all produces. Related ticket: DEV-2458 (identified during the ErrorCode-divergence registry consolidation).
7.5. Whitespace-Only Serial Number
Endpoints that require a device serial number reject a whitespace-only Sn (for example " ") as an incorrect request, whereas the legacy .NET API treats a whitespace string as a real serial and proceeds to a device lookup that then fails as "device not found".
Affected endpoints: every REST/SOAP operation that resolves a device by serial number. The serial constraint is uniform across the API (@NotBlank on the shared Device.Sn), so an absent, empty, or whitespace-only serial is always rejected before any database access. Pending-transactions retrieval (POST /api/Transaction/Task/Pending / SOAP FTGetCPEPendingTransactions) was the last endpoint brought into line with this rule.
Behavior:
-
An absent or empty
SnreturnsErrorCode 203on both transports — identical to .NET. -
A whitespace-only
Snalso returnsErrorCode 203in the Java port, whereas .NET returnsErrorCode 201(NO_CPE) becausestring.IsNullOrEmpty(" ")isfalse, so the value reaches the device lookup and misses. -
Response carries the typed response body with default values, HTTP status
200, and the fields below.
| Field | Value |
|---|---|
|
|
|
|
| Input | .NET (REST & SOAP) | Java (REST & SOAP) |
|---|---|---|
Absent or empty |
|
|
Whitespace-only |
|
|
|
For an absent or empty serial the Java port already returned the correct |
Rationale: a serial made only of whitespace is not a usable identifier, so treating it as a malformed request (203) is both more correct and keeps serial validation uniform across every serial-bearing endpoint. .NET’s acceptance of a whitespace serial is an artifact of string.IsNullOrEmpty. Related tickets: DEV-2422, DEV-2454.
7.6. FTGetUserDetailsFromDevice Device-Not-Found Message
When FTGetUserDetailsFromDevice receives a well-formed but non-existent devicesn, the device does not resolve to a CPE, so both transports return ErrorCode 201 (NO_CPE). The ErrorCode is identical to the .NET contract; only the Message text differs. In the .NET reference the message originates in the BLL device lookup (Device.FindBySerial), which throws a differently-worded FTExceptionNoCpe in each of the two separate .NET projects, so the wire text is not even consistent between .NET transports. The Java port uses a single shared service method for both transports and emits one uniform device-not-found message.
Affected endpoints:
-
SOAP
FTGetUserDetailsFromDevice -
REST
POST /api/UserInfo(get user details by device serial)
Behavior:
-
Device existence is resolved against the CPE registry (by serial number), independently of whether a customer/user-info record exists.
-
A
devicesnthat resolves to no device returnsErrorCode 201(NO_CPE), HTTP200, with the user data fields nil. -
A
devicesnthat resolves to more than one device returnsErrorCode 203(INCORRECT_REQUEST_STRUCTURE) with the uniform messageMust be only 1 CPE. -
A
devicesnthat resolves to exactly one device but has no stored user info returnsErrorCode 100(SUCCESS) with the user data fields nil (parity with the empty .NETUser). -
The
Messageis the standard Java device-not-found text used by everyNO_CPE-bearing endpoint.
| Field | Value |
|---|---|
|
|
|
|
| Input | .NET | Java (REST & SOAP) |
|---|---|---|
Non-existent |
SOAP: |
|
Rationale: the contract-critical ErrorCode is preserved identically (201 / NO_CPE). A single shared Java service method (findUserInfoByDeviceSerial) serves both transports and therefore cannot reproduce the per-transport message wording of the two distinct .NET codebases (which differ from each other in casing, quoting, and a leading space). The Java port emits the project-wide device-not-found message (buildDeviceNotFoundMessage), keeping the message consistent with every other NO_CPE endpoint in the API. Related ticket: DEV-2423.
The same single-shared-service reasoning applies to the multiple-CPE case (ErrorCode 203): the .NET codebases word it differently per transport (SOAP Must be only 1 CPE, REST Must be only 1 Device). The Java port emits one uniform message, Must be only 1 CPE, on both transports. ErrorCode 203 is identical to .NET. Related ticket: DEV-2423.
7.7. Unified "No transactions found" Error (ErrorCode 208)
DEV-2484 (with PO sign-off) introduces a new, Java-only error code — ErrorCode=208 (NO_TRANSACTIONS), Message=No transactions found — and routes every "the requested transaction was not found" case onto it. The message is a fixed constant: it does not embed the TransactionId.
|
This is an intentional divergence from .NET. The legacy .NET API has no |
Endpoints unified onto ErrorCode=208 for a positive TransactionId that does not correspond to any stored transaction (REST and SOAP alike):
| Endpoint (REST / SOAP) | Not-found trigger | Previous wording (superseded) |
|---|---|---|
|
No pending task matches and the transaction exists in none of the four task tables |
|
|
The transaction row is absent ( |
|
|
No diagnostic entries exist for the transaction |
|
The "transaction exists but simply has no tasks" case is deliberately excluded from this unification: Transaction / FTGetTransactionStatus keeps returning ErrorCode=203 / There are no tasks for Transid <value> in that case (see TransactionId Validation above). The 208 code means "no such transaction", not "no tasks".
| Field | Value |
|---|---|
|
|
|
|
HTTP status |
|
Rationale: a single, unambiguous error code and message for "the transaction does not exist" is easier for integrators to detect programmatically than the previous mix of 203 messages that overlapped with unrelated INCORRECT_REQUEST cases, and dropping the echoed TransactionId from the message avoids leaking the queried id back on the wire. Related ticket: DEV-2484 (supersedes the wording of DEV-2444, DEV-2467, DEV-2491 on these paths).
7.8. Pending Tasks: Non-Existent TransactionId
Complements TransactionId Validation. That rule covers non-positive TransactionId values (rejected before any database access). This rule covers a positive but non-existent TransactionId on the pending-tasks retrieval path.
Affected endpoints (all four share a single service method, so the behaviour is identical across them):
-
POST /api/Task/Pending/ SOAPFTGetCPEPendingTasks -
POST /api/Task/Pending/Transaction/ SOAPFTGetCPEPendingTasksByTransaction
Behavior:
-
When a positive
TransactionIdis supplied and no pending task matches, the service checks whether the transaction exists at all (any task in the pending, completed, failed, or rejected tables — mirroring the legacy .NETIsTransactionExists). -
If the transaction does not exist, the response carries
ErrorCode=208(No transactions found) andMessage=No transactions found, with the typed response body and an emptytaskslist, HTTP status200. Since DEV-2484 this uses the new unifiedErrorCode=208instead of the earlier203/Transid <value> doesn’t exist; see Unified "No transactions found" Error (ErrorCode 208). -
If the transaction exists but simply has no pending tasks, the response is an empty-
SUCCESS(ErrorCode=100) body — no error. OnTask/Pending/Transaction/FTGetCPEPendingTasksByTransactiontheMessagefield carriesNo pending task foundin this case (DEV-2618); onTask/Pending/FTGetCPEPendingTaskstheMessagestays empty. See Pending Tasks by Transaction: "No pending task found" Message.
| Field | Value (positive, non-existent TransactionId) |
|---|---|
|
|
|
|
|
empty list |
Supersedes the DEV-1931 decision for this path. DEV-1931 generalised the pending endpoints to always return an empty SUCCESS when no pending task matched (aligning them with Task/Failed and Task/Rejected); doing so suppressed the legacy error for a non-existent transaction. DEV-2467 restored an error for the positive-non-existent-transaction case only, while keeping DEV-1931’s valid part (no TransactionId, or an existing transaction with no pending tasks, still returns empty SUCCESS). DEV-2484 then replaced the 203 / Transid <value> doesn’t exist wording of that error with the unified ErrorCode=208 / No transactions found.
As a result, Task/Pending now diverges from Task/Failed and Task/Rejected: the failed/rejected path has no IsTransactionExists gate in .NET either (legacy GetTasksFromSql), so those endpoints keep returning empty SUCCESS for a non-existent transaction. This divergence is itself faithful to the legacy .NET behaviour. Related tickets: DEV-2467 (restores the error), DEV-2484 (unifies it on 208), DEV-1931 (superseded on this path).
7.9. Pending Tasks by Transaction: "No pending task found" Message
Complements Pending Tasks: Non-Existent TransactionId. That rule covers a positive but non-existent TransactionId (ErrorCode=208). This rule covers a positive TransactionId that exists but has no pending tasks, on the by-transaction retrieval path only.
Affected endpoints:
-
POST /api/Task/Pending/Transaction/ SOAPFTGetCPEPendingTasksByTransaction
Behavior: when the transaction exists (it has at least one task in the pending, completed, failed, or rejected table) but no pending task matches, the response carries ErrorCode=100 (SUCCESS) and Message=No pending task found, with the typed response body and an empty tasks list, HTTP status 200.
| Field | .NET | Java |
|---|---|---|
|
|
|
|
|
|
|
empty list |
empty list |
HTTP status |
|
|
In the legacy .NET API this endpoint resolves to the single-argument GetCPEPendingTasks(long transId) overload, whose getPendingQueueForDevice throws FTExceptionIncorrectRequestStructure("No pending task found") — ErrorCode=203 — for any empty result, conflating "transaction not found" with "transaction found, no pending tasks". The Java port shares one service method between Task/Pending and Task/Pending/Transaction, and (per DEV-2484, PO sign-off) already keeps ErrorCode=100 for the "exists but no pending tasks" case rather than reverting to the .NET 203 conflation; DEV-2618 adopts only the .NET message text (No pending task found) for that case, so the code stays 100 while the message becomes actionable.
The plain Task/Pending / FTGetCPEPendingTasks endpoint is deliberately excluded: it keeps the empty Message (the generalised empty-SUCCESS from DEV-1931), matching Task/Failed and Task/Rejected. Only the by-transaction endpoint carries the message.
Rationale: ErrorCode=100 remains correct because the transaction was found, so clients keying off ErrorCode are unaffected; the added message gives integrators the same human-readable hint the legacy API produced without reintroducing the 203 conflation the 208 contract was designed to remove. Related tickets: DEV-2618 (this message), DEV-2484 (the 208 contract this builds on), DEV-2467, DEV-1931 (superseded on this path).
7.10. Diagnostic "Time in seconds" Metric
For a completed Get Diagnostic result (POST /api/Diagnostic / SOAP FTGetDiagnostic), the Java port enriches the parameter list with three calculated objects — Time in seconds, File size in MB, and Average speed in Mbps — computed from the device’s BOMTime/EOMTime timestamps and the transferred byte count. File size in MB and Average speed in Mbps are computed with the same formulas as the .NET reference and agree with it except at exact rounding midpoints (see the rounding note below); Time in seconds differs by definition.
| Value | .NET (REST & SOAP) | Java (REST & SOAP) |
|---|---|---|
Definition |
|
Total elapsed seconds of the interval (fractional) |
Example: 10-second interval |
|
|
Example: 31-microsecond interval (fast/local transfer) |
|
|
Rationale: the .NET TimeSpan.Seconds component discards whole minutes and all sub-second precision, so a 90-second diagnostic reports 30 and a sub-second diagnostic reports 0 — neither reflects the actual duration. The Java port reports the true total elapsed time. This divergence became observable only after DEV-2476: previously a sub-millisecond BOMTime/EOMTime interval was truncated to a millisecond-precision java.util.Date, so the three calculated objects were dropped entirely (see the ticket). DEV-2476 restores nanosecond-precision duration handling, which activates this code path and surfaces the intentional Time in seconds difference documented here. Related tickets: DEV-2476 (precision fix), BUG-DG-003 (the Time in seconds divergence).
|
Rounding mode. |
7.11. FindDeviceAdvanced Empty-Value Error Message
For POST /api/Device/FindDeviceAdvanced / SOAP FTFindDeviceAdvanced, when a parameter carries a valid Name but an empty Value (for example zip with ""), the Java port returns the error Message without the single trailing space that the legacy .NET API leaves on the assembled message. ErrorCode=203 (INCORRECT_REQUEST) is identical on both sides. The behavior is the same on REST and SOAP.
| Scenario | .NET (REST & SOAP) | Java (REST & SOAP) |
|---|---|---|
|
|
|
Rationale: the .NET implementation throws its StringBuilder output verbatim, keeping the trailing space produced by its per-segment format string. The Java port strips the single outer trailing space for a cleaner client-facing message; inter-segment spacing of multi-error messages is preserved. Only cosmetic whitespace differs — the wording and ErrorCode are unchanged. Note that the verbose Valid parameter names: … hint is appended only when a parameter name is invalid (matching the .NET isAnyInvalid gate), not on the empty-value path. Related ticket: DEV-2507.
7.12. Task StartTime Parsing (Date-Only, Offset, Malformed)
For the three optional StartTime task-list endpoints — POST /api/Task/Pending, POST /api/Task/Failed, POST /api/Task/Rejected (SOAP FTGetCPEPendingTasks / FTGetCPEFailedTasks / FTGetCPERejectedTasks) — the REST StartTime is now bound as a raw string and parsed in the controller, converging on the legacy .NET REST behaviour where the field is a string parsed with Convert.ToDateTime inside a try/catch. This aligns REST with the SOAP transport, which already parsed the raw XML string.
| Input | .NET (REST) | Java (REST & SOAP) |
|---|---|---|
Date-only ( |
Accepted, start of day |
HTTP |
ISO local / offset date-time |
Accepted |
HTTP |
Blank or absent |
No date filter |
HTTP |
Malformed ( |
Empty result |
HTTP |
Previously a date-only or offset StartTime crashed the default ISO_LOCAL_DATE_TIME deserializer and returned HTTP 500 / ErrorCode 204 — the Jackson 2 @JsonDeserialize on the request field was silently ignored by the Spring Boot 4 Jackson 3 (tools.jackson) message converter. Malformed input is deliberately not coerced to null (which would silently drop the date filter and return an unfiltered list); it returns ErrorCode 204 with the parser message, fail-closed.
An StartTime carrying an explicit UTC offset is normalized to the ACS server-local wall-clock (the deploy timezone) before being stored against the naive created column, matching the legacy .NET writer’s server-local DateTime — the same storage basis as the device-activity window (DEV-2433). Related ticket: DEV-2488.
7.13. Device Not Unique — Message Form
When a device lookup that carries the Sn / Oui / ModelName discriminators matches more than one stored device, both the legacy .NET API and the Java port reject the request with ErrorCode 201 (NO_CPE). The ErrorCode is identical to .NET; only the Message text differs, and it structurally cannot be made identical.
Affected endpoints:
-
POST /api/Device/Activity(REST only — no SOAP operation exists) -
POST /api/Device/History(REST only — no SOAP operation exists) -
POST /api/Device/Info/ SOAPFTGetDeviceInfo
Behavior:
-
A duplicate match is rejected before the ISP access check, matching the legacy
load()ordering. -
Response carries the typed response body, HTTP status
200, and the error fields set as below.
| Field | Value |
|---|---|
|
|
|
|
| Input | .NET (REST) | Java (REST & SOAP) |
|---|---|---|
|
|
|
|
|
|
|
|
|
Rationale: the .NET message is rendered from an already-loaded database row, so it carries an ID=<n> prefix and spells the serial, OUI, and model as stored — including a Model name segment even when the client never sent one. The Java port composes the message from the request values it actually received, so those database-side details are unavailable to it. The Oui is uppercased in the message, matching the .NET constructor which uppercases OUI before the message is rendered. Related ticket: DEV-2619.
7.14. Oui Matched Against Manufacturer Name
Device lookups that filter on Oui match the value against both the product class OUI and the manufacturer name, unconditionally.
Affected endpoints: every endpoint resolving a device by Sn + Oui + ModelName, including POST /api/Device/Activity, POST /api/Device/History, and POST /api/Device/Info / SOAP FTGetDeviceInfo.
| .NET | Java |
|---|---|
Matches the manufacturer name only when the |
Always matches either the product class OUI or the manufacturer name; there is no equivalent setting. |
Consequence: a request whose Oui carries a manufacturer name rather than an OUI resolves a device in the Java port, whereas the .NET reference in its default configuration returns ErrorCode 201. The query lives in the shared api-orm library and is not overridable from this service, so closing the gap requires a change there. Related ticket: DEV-2619.
7.15. Absent UserInfo Block Accepted
A device-mutation request that omits the UserInfo block entirely but carries custom parameters is accepted and applied, answering ErrorCode 100 (SUCCESS). The legacy .NET REST API answers ErrorCode 204 (GENERAL) for the same input.
Affected endpoints:
-
PUT /api/UserInfo/ SOAPFTUpdateDeviceInfo -
POST /api/Device(device creation carrying only custom parameters) / SOAPFTCreateDevice
Behavior: the block is treated as present-but-empty. Every field falls back to its stored device value exactly as an explicitly empty block would, the custom parameters are written, and the response is a normal success. The all-input-null guard is unaffected: a request that omits UserInfo and carries no usable parameter is still rejected with ErrorCode 203 (INCORRECT_REQUEST, All input parameters are null), byte-identical to the .NET business layer.
| Input | .NET REST | .NET SOAP | Java (REST & SOAP) |
|---|---|---|---|
|
|
|
|
|
|
|
|
Rationale: the .NET REST 204 is not a decision but an unhandled crash. UserInfoController.cs:45-57 dereferences request.UserInfo.Cust1 while assembling the custs map, before the business layer is reached at :60; with the block absent this raises a NullReferenceException, which ConvertApi.SetErrorCode maps through its final else branch to Result.GeneralError. The .NET SOAP transport cannot exhibit the fault at all, because FTUpdateDeviceInfo takes flat string arguments (ACSWS.cs:1780-1788) rather than a nullable object, and its business-layer guard (Device.cs:2127-2133) passes whenever custs is non-empty — so .NET SOAP already succeeds on the semantically equivalent input. The Java port therefore aligns REST with SOAP on both implementations rather than reproducing a null-dereference crash. Made reachable by DEV-2620, which bound the Parameters array for these bodies; before that change such a request was rejected by the all-input-null guard and never reached the dereference. Related ticket: DEV-2620.
7.16. Device Creation With the Wait Disabled and UserInfo Supplied
With api.settings.request.timeout.device-create set to 0 or less (wait disabled), a device-creation request that also carries UserInfo fields or custom parameters answers ErrorCode 100 (SUCCESS). The .NET reference answers ErrorCode 204 (GENERAL) for the same input.
Affected endpoints:
-
PUT /api/Device/ SOAPFTCreateDevice -
PUT /api/Device/NonTR/ SOAPFTCreateNonTRHTTPDevice
Behavior: with the wait disabled the Java port does not look the new device up, so it never dereferences a missing device. It sends the UserInfo fields and custom parameters to ACS by serial number and, on FTCreateDevice only, sets the login password, then answers 100. The .NET reference returns no device object when the wait is disabled (Device.cs:1458-1459 REST, Device.cs:1428-1429 SOAP), then calls dev.UpdateDeviceInfo on it (DeviceController.cs:609 REST, ACSWS.cs:1074 SOAP; NonTR: DeviceController.cs:407, ACSWS.cs:960). This raises a NullReferenceException, which is mapped to GeneralError (204), and AcsUser.SetLoginPassword (DeviceController.cs:614, ACSWS.cs:1079) never runs. The device itself is already created in ACS on both implementations. The NonTR endpoints set no login password on either side.
| Input | .NET (REST & SOAP) | Java (REST & SOAP) |
|---|---|---|
No |
|
|
|
|
|
With the wait disabled, ErrorCode 100 means that ACS accepted the create request, not that the device was confirmed. ACS can skip a create without reporting an error: an OUI longer than six characters on FTCreateDevice / PUT /api/Device with api.settings.request.device-create.product-class-check disabled is dropped by ACS, and the request still answers 100. This is the same on .NET. The NonTR endpoints always send the OUI FTHTTP, so they cannot reach this case.
Defaults: the Java port waits 5 seconds by default; the setting is managed in FT Configs Service (see Request Handling Settings). The .NET code treats an absent CreateDeviceTimeout setting as 0 (Device.cs:1458 REST, :1428 SOAP); the shipped .NET Settings.xml sets it to 5000 ms. Related ticket: DEV-3257.
7.17. Comma Decimal Separator Accepted for Coordinates
The latitude and longitude custom parameters accept both the comma and the dot as decimal separator, on every endpoint that writes a coordinate and on every endpoint that filters by one. The value is normalized to the dot form before it is stored or compared, so it is always read back with a dot and a comma-form filter selects exactly the same devices as its dot form.
Affected endpoints — write path:
-
PUT /api/UserInfo/ SOAPFTUpdateDeviceInfo -
POST /api/Device/ SOAPFTCreateDevice
Affected endpoints — search path:
-
POST /api/Device/FindDeviceAdvanced/ SOAPFTFindDeviceAdvanced -
POST /api/Device/UserInfo/ SOAPFTFindDevice
Behavior: a coordinate is validated after the separator is normalized, and the normalized form is what reaches storage or the SQL predicate. Because coordinates are persisted as a numeric column, GET /api/UserInfo / SOAP FTGetUserDetailsFromDevice returns the dot form regardless of which separator was submitted.
| Aspect | .NET REST | .NET SOAP | Java (REST & SOAP) |
|---|---|---|---|
Accepted |
No — |
Yes — |
Yes — |
Stored form |
n/a |
|
|
| Endpoint | .NET REST | .NET SOAP | Java (REST & SOAP) |
|---|---|---|---|
|
No — |
No — |
Yes — |
|
No — |
Yes — |
Yes — |
The .NET search path is not uniform, which is why the two rows differ. FindDeviceAdvanced validates parameter names only and lets the value reach the business layer, where Device.FindDeviceAdvanced (FT.FTACSWS.BLL/Device.cs:466-469) calls Gui.ConvertToDouble; that helper throws a plain Exception (FT.FTACSWS.BLL/Helper/FileName.cs:16-23), which both ConvertApi.SetErrorCode (ConvertApi.cs:218-250) and ConvertWSDL.SetErrorCode (ConvertWSDL.cs:236-268) map through their final else branch to Result.GeneralError. FTFindDevice and Device/UserInfo instead validate in getCusts before the business layer, and there the two transports differ: SOAP normalizes the separator in place (ACSWS.cs:1762) and therefore accepts the comma, while the REST copy has that same line commented out (DeviceController.cs:530) and rejects it with a typed FTExceptionIncorrectRequestStructure. The Java port applies one rule everywhere instead of reproducing that three-way split.
Rationale: the .NET reference is internally inconsistent here. On the write path, .NET SOAP normalizes in place before storing (ACSWS.cs:1763, item.Value = item.Value.Replace(",", "."), stored at :1766), whereas the equivalent .NET REST line is commented out (DeviceController.cs:531), leaving the value to be validated by Gui.doubleTryParse (FT.FTACSWS.BLL/Helper/FileName.cs:10-14), which parses with InvariantCulture and AllowDecimalPoint only and therefore rejects the comma. On the search path the same split reappears one layer down: FindDeviceAdvanced and FTFindDeviceAdvanced copy the submitted value verbatim into the filter map (DeviceController.cs:120-247, ACSWS.cs:671-791) and let Device.FindDeviceAdvanced convert it with Gui.ConvertToDouble (FileName.cs:16-23), which delegates to the same comma-rejecting doubleTryParse and throws on failure, so the whole request ends as 204; FTFindDevice and Device/UserInfo reuse their transport’s own getCusts copy and therefore inherit its normalize-or-not decision, giving 100 on SOAP and 203 on REST.
The Java port takes .NET SOAP’s write-path behavior and applies it uniformly to both transports and to both the write and the search path, giving one rule — accept either separator, always store, compare and return the dot form — instead of a per-transport, per-path split. On the search path this also corrects a silently wrong result set: the Java port previously dropped a comma-form coordinate filter without an error, returning 100 together with devices that do not match the requested coordinate. Normalizing makes the filter apply instead of vanish; for the comma form the ErrorCode is unchanged by this correction (100 before and after — only the returned device list changes). A genuinely unparsable coordinate is a different input class and is now rejected rather than dropped — see Unparsable Coordinate Rejected on the Search Path. The write-path normalization additionally closes a latent defect: the Java port previously validated the comma form (by replacing before parsing) but stored the original string, which then reached the ACS client’s Double.valueOf conversion and failed with ErrorCode 204. Related ticket: DEV-2620.
7.18. Unparsable Coordinate Rejected on the Search Path
A latitude or longitude search filter whose value is not a number in either separator form — latitude=abc — is rejected with ErrorCode 203 (INCORRECT_REQUEST_STRUCTURE, message Custom parameter latitude must be correct double). It is never silently dropped.
Affected endpoints:
-
POST /api/Device/FindDeviceAdvanced/ SOAPFTFindDeviceAdvanced -
POST /api/Device/UserInfo/ SOAPFTFindDevice
An absent value — the Value member omitted, or an empty string — is a different input class and is not affected by this entry. On Device/UserInfo / FTFindDevice and on the write paths it leaves the coordinate unapplied rather than rejecting it as malformed; on FindDeviceAdvanced / FTFindDeviceAdvanced it never reaches this rule at all, because the advanced-search parameter validation rejects it first with ErrorCode 203 and the message Parameter latitude without value. Its full behavior, including the case where it is the request’s only content, is documented in Custom Parameter Without a Value. A whitespace-only value, however, IS covered here: it is an invalid double (as it is in .NET, whose Gui.doubleTryParse parses with AllowLeadingSign | AllowDecimalPoint and no whitespace flag, FT.FTACSWS.BLL/Helper/FileName.cs:10-14), so it is rejected with 203 on the write path and on both search paths alike.
| Endpoint | .NET REST | .NET SOAP | Java (REST & SOAP) |
|---|---|---|---|
|
|
|
|
|
|
|
|
Rationale: the divergence is confined to FindDeviceAdvanced, and it exists because .NET is internally inconsistent about this exact input. On its FTFindDevice route .NET already answers 203, from a typed FTExceptionIncorrectRequestStructure raised in getCusts (ACSWS.cs:1763-1765, DeviceController.cs:531-533) before the business layer is reached. On its FindDeviceAdvanced route no such check exists, so the value reaches Device.FindDeviceAdvanced (Device.cs:466-469) and Gui.ConvertToDouble throws a plain Exception (FileName.cs:16-23) that both SetErrorCode mappers fold into the catch-all Result.GeneralError. The 204 is therefore an unhandled crash, not a decision — the same pattern already recorded for FTAddObject / FTSetParameters / FTCreateDiagnostic. The .NET write path also answers 203 for this input (DeviceController.cs:531-533), as does the Java write path (DeviceInfoService.getCusts). Rather than reproduce a split in which the same malformed coordinate yields 203 on three routes and 204 on a fourth, the Java port answers 203 everywhere.
The alternative — dropping the predicate, as the Java port did before this change — was rejected outright: it returns ErrorCode 100 alongside devices that do not match the requested coordinate, so the caller receives a wrong result set with no indication that its filter was discarded. Related ticket: DEV-2620.
7.19. Custom Parameter Without a Value
A custom parameter sent without its Value member — {"Name": "cust11"} or {"Name": "latitude"} — is skipped. It is never written, and it never counts towards the "request carries something" check that the device-mutation and device-search endpoints perform. For latitude and longitude an empty-string Value is treated identically to an absent one, on the write path and on the search path alike.
A whitespace-only Value such as " " is NOT an absent value and is NOT skipped: it is an invalid double, so it is rejected with ErrorCode 203 (INCORRECT_REQUEST_STRUCTURE, Custom parameter latitude must be correct double) on every path — UserInfo write, Device/UserInfo search and FindDeviceAdvanced search. This is parity, not a divergence: .NET’s Gui.doubleTryParse parses with AllowLeadingSign | AllowDecimalPoint and no whitespace flag (FT.FTACSWS.BLL/Helper/FileName.cs:10-14), so a whitespace string fails there too. On the write path the rejection is raised during per-entry validation, i.e. before the all-parameters-empty guard, so such a request can never reach the clear-account branch.
Affected endpoints:
-
PUT /api/UserInfo/ SOAPFTUpdateDeviceInfo -
POST /api/Device/UserInfo/ SOAPFTFindDevice -
POST /api/Device/ SOAPFTCreateDevice -
POST /api/Device/NonTR/ SOAPFTCreateNonTRDevice -
POST /api/Device/FindDeviceAdvanced/ SOAPFTFindDeviceAdvanced— for the whitespace case only; an absent or empty value is already rejected there by the advanced-search parameter validation (Parameter latitude without value.,ErrorCode 203)
| Endpoint | .NET REST | .NET SOAP | Java (REST & SOAP) |
|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
For cust11-cust20 the outcome is observationally identical to .NET on the create endpoints (100 either way): .NET keeps the null in its dictionary, Java skips it, and neither writes a value.
Behavior of the two name-level failures is parity, not divergence, and is listed here only because it shares this code path: a parameter with a null Name and a parameter whose name repeats an earlier one are both rejected with HTTP 200 and ErrorCode 204 (GeneralError), carrying the legacy .NET messages verbatim — Value cannot be null. + CRLF + Parameter name: input for the null name (from Regex.IsMatch(null)), and An item with the same key has already been added. for the duplicate (from Dictionary.Add). The CRLF of the null-name message is byte-identical in the REST (JSON) envelope; in the SOAP envelope the CR is subject to XML end-of-line normalization (XML 1.0 §2.11) and may arrive as LF. ErrorCode is identical on both transports and is what clients should branch on.
Name comparison for the duplicate check is case-insensitive, so Latitude and latitude in one request collide. The whitelist, however, is case-sensitive in .NET and in the Java port alike, and it is evaluated BEFORE the duplicate check — both references validate the entry and only then call custs.Add (DeviceController.cs getCusts, ACSWS.cs:1750-1771). So [cust11, Cust11] is a whitelist rejection 203, not a duplicate 204, while [Latitude, latitude] — both of which pass validation — is the duplicate 204. A parameter whose Name is present but blank is a third input class: it keeps the whitelist rejection 203 (INCORRECT_REQUEST_STRUCTURE, Custom parameter name must be cust11-cust20, latitude or longitude), exactly as .NET does, because Regex.IsMatch("") does not throw.
Rationale: the .NET reference is internally inconsistent — .NET SOAP dereferences the coordinate unguarded (ACSWS.cs:1758) and crashes with a catch-all 204, while .NET REST has its if (string.IsNullOrEmpty(item.Value)) continue; commented out (DeviceController.cs) and therefore keeps a null in the custs dictionary. Reproducing the .NET REST form in Java is not an option: a null in custs makes custs non-empty, which bypasses the all-parameters-empty guard of FTUpdateDeviceInfo and sends the request on to clearAccountInfo, erasing the device’s stored account data on a request that asked to write a coordinate. Skipping the entry instead keeps the guard intact, so a request whose only content is a valueless coordinate is correctly reported as empty (203) rather than silently destructive. The Java port applies one rule to both transports, as it does for the related coordinate handling in Comma Decimal Separator Accepted for Coordinates. Related tickets: DEV-2438, DEV-2415.
7.20. Malformed JSON Body Rejected Uniformly (ErrorCode 203)
A request body that cannot be read at all — a JSON syntax error such as a bare unquoted token ({"EventTypeValueChange": Tru}), an empty or absent body, or a root value that is not an object — is rejected uniformly on every REST endpoint with HTTP 200, ErrorCode 203 (INCORRECT_REQUEST_STRUCTURE), Message Incorrect request structure, and the endpoint’s typed response body (any collection serialized as an empty array). No field binds and the request object is absent.
This entry covers only that class. A body that IS readable but carries one value that cannot bind to its field is a different input class, documented in Unbindable Member Value Rejected (ErrorCode 203).
This mirrors the legacy .NET behavior for the overwhelming majority of endpoints: a malformed body makes the .NET model binder yield a null request, and the first action step — Session.CreateSession(request, …) (Session.cs:233-234) — throws FTExceptionIncorrectRequestStructure("Incorrect request structure"), which ConvertApi.SetErrorCode (ConvertApi.cs:237-238) maps to Result.IncorrectRequestStructure (203) at HTTP 200. For every endpoint that calls CreateSession first, the Java 203 is therefore parity, not a divergence. Related ticket: DEV-2623.
|
Two endpoints are an intentional divergence (PO sign-off, DEV-2623): the Java port’s uniform
The divergence is deliberate: a single, structurally correct code for "the body could not be read" is more useful to integrators than reproducing .NET’s two accidental outcomes (an unhandled |
7.21. ACS Timeout and ACS Transport Failures (ErrorCode 205)
Endpoints: every REST and SOAP operation that calls the ACS. The group update operations (CreateGroupUpdate, DeleteGroupUpdate, GroupUpdateActivate, GroupUpdatePause, GroupUpdateStop) also change their HTTP status.
Behavior: the API applies api.settings.timeout.acs as the response timeout of every ACS call. If the ACS times out, cannot be reached, or answers with an HTTP error other than 500 instead of a SOAP response, the API returns ErrorCode 205 (NO_ACS) with HTTP 200. A SOAP fault from the ACS is not a transport failure. A SOAP fault keeps its existing result, which is ErrorCode 204 or, for the group update operations, HTTP 500.
| Case | .NET API | Java API |
|---|---|---|
|
REST uses the plain ACS timeout. Only SOAP adds 10 seconds. |
REST and SOAP wait |
|
|
The API waits 120 seconds. |
Negative |
The call throws an error and returns |
The API treats the value as |
ACS cannot be reached (DNS, connection reset, TLS) |
The |
One |
ACS answers with an HTTP error other than 500 and no SOAP response |
|
|
ACS does not accept the connection |
The timeout limits the whole request. |
CXF limits connection setup to a fixed 30 seconds. |
Group update operations, ACS unreachable, timed out, or HTTP error other than 500 |
Not applicable. |
HTTP |
Details:
-
A timeout always returns
MessageThe operation has timed out. -
The whole ACS call ends after
api.settings.timeout.acsseconds. If the ACS does not accept the connection, the call ends after 30 seconds at the latest. -
If
api.settings.timeout.acsis greater than 30, an ACS that does not accept the connection stops the call earlier than in .NET. -
If a
pushfails in transport, the API returns205and does not report the device as offline. -
A response with HTTP
500and a body that is not a SOAP message is read as a SOAP fault. It keeps the existing result:ErrorCode 204, or HTTP500on the group update operations. -
The API reads
api.settings.timeout.acsfor every call, so a change applies without a restart.
Rationale: the Java port ignored api.settings.timeout.acs and returned 204 for ACS transport failures. This behavior restores the .NET contract. The reason phrase is removed from the HTTP error text because it can contain the ACS address. The group update change follows FRD_10258 sections 7.1 to 7.4 and 7.7 to 7.9, and the Product Manager decision of 2026-10-16. On CreateGroupUpdate, a timeout does not prove that the ACS rejected the request, so the campaign may exist. Check before you retry. Related ticket: DEV-3246.
7.22. ACS SOAP Fault Message Text
Endpoints: every REST and SOAP operation that calls the ACS, when the ACS answers with a SOAP fault. The ErrorCode is identical to .NET (204, GENERAL); only the Message text can differ.
Behavior: the CXF client rebuilds the stack trace that the ACS sends in the fault detail as a chain of causes under the fault. The Java API returns the deepest message in that chain that carries information. It skips an empty message, the literal text null (also in the rebuilt form <package>.<Name>Exception: null or …Error: null), and a message that a wrapper copied from its cause. A cause class outside java.lang keeps its class name as a prefix, for example java.util.concurrent.CancellationException : Device is offline. If no cause carries information, the Message is the fault string. If the fault string is empty as well, it is the API’s own error text for the operation, or Unknown error when there is none. The .NET API always returns the fault string.
| Case | .NET API | Java API |
|---|---|---|
ACS fault whose deepest cause has no message (for example an ACS-side timeout of a direct device read) |
The fault string. |
The fault string. Earlier Java versions returned |
Direct parameter read of a device that does not answer the connection request |
The fault string |
|
ACS fault without a stack trace in the detail |
The fault string. |
The fault string. |
ACS fault caused by a Hazelcast error, for example when the ACS has lost its Hazelcast connection |
The fault string, such as |
|
The offline case needs api.device.parameters.retrieval.method set to Directly and api.settings.timeout.push greater than 0, both managed in the FT Configs Service, and a request that reads from the device (Source=0) without IgnoreDeviceIsOffline.
Rationale: the Java API returned the text of the deepest cause before this change as well, so the divergence from the .NET fault string is not new; this entry documents it. The deepest cause usually names the actual problem, such as Device is offline, while the fault string can be a generic word such as get. Skipping empty, null, and copied texts stops the API from returning null for an ACS fault and keeps REST and SOAP identical. Related ticket: DEV-3282.
7.23. Unbindable Member Value Rejected (ErrorCode 203)
A body that parses but carries one value that cannot bind to its field — {"Rpc": "0"} where Rpc is a boolean, {"TransactionId": "abc"} where it is a number, an array or an object where a scalar is expected — is answered with HTTP 200, ErrorCode 203 (INCORRECT_REQUEST_STRUCTURE), Message Incorrect request structure, and the endpoint’s typed response body, unless the field carries a lenient deserializer (the table in Validation), in which case the value is treated as absent and binding continues. "Binding continues" is not "the request succeeds": the resulting ErrorCode is whatever the operation’s own validation then produces, which for DELETE /api/Provision with no remaining true flag is its own 203, Neither of the flags is set — the same answer .NET gives there for an existing device (ProvisionController.cs:92-100), though the Java port reaches it without resolving the device first (Provision Removal: Flags Validated Before the Device Is Resolved). The per-field table states the outcome per operation.
The legacy .NET REST API behaves differently: its media-type formatter installs a serializer error handler (BaseJsonMediaTypeFormatter.cs:270-278), so a member that fails to bind is skipped (JsonSerializerInternalReader.cs:1888-1893, which calls HandleError / reader.Skip() at :2600-2616), left at its CLR default, and the rest of the request binds. The operation then runs as if that one field had been omitted.
| Input | .NET REST behavior | Java port |
|---|---|---|
An unbindable value on a field listed in the Validation coercion table |
member skipped, binding continues, the operation’s own validation decides |
identical — parity |
An unbindable value on any other field |
member skipped, request proceeds |
HTTP |
Rationale: reproducing .NET’s per-member recovery everywhere would make malformed input select destructive defaults. An unbindable TransactionId on DELETE /api/Task/Pending becomes "no transaction filter", which deletes all pending tasks for the device; an unbindable ScheduledStart on a group update becomes "no start time", which makes the ACS start the campaign immediately. Both are silent, and both act on data. The Java port therefore fails closed by default and opts individual fields into the .NET behavior only once their null has been shown to be harmless and equal to the .NET default — which is why the coercion table is a list of fields rather than a global rule. Fields still waiting for that review (Push, WaitResponse, EndSession, DeletePrevious, Wan, Lan, the IsGetParameter* flags, IgnoreDeviceIsOffline, Reprovision, Priority) answer 203 today.
Clients keying off ErrorCode see 203 where .NET answered the operation’s own code; a client that wants a field ignored must omit it rather than send an unreadable value. Related tickets: DEV-2991, DEV-2501, DEV-2622, DEV-2623.
7.24. Provision Removal: Flags Validated Before the Device Is Resolved
Applies to: DELETE /api/Provision and SOAP FTRemoveCPEProvisionData (both transports share one service method, so the behaviour is identical).
Behavior. The at-least-one-flag guard runs before the device is resolved. A request in which no flag is true — including one that carries none of Data/Obj/Rpc/File at all, and one whose only flag is unbindable (see Unbindable Member Value Rejected (ErrorCode 203)) — is answered with HTTP 200, ErrorCode 203 (INCORRECT_REQUEST), Message Neither of the flags is set, whether or not the device exists. The serial number, Oui and ModelName are never looked up on that path.
The legacy .NET API resolves the devices first and checks the flags second, on both transports: FT.FTACSWS.BLL.Device.Devices(…) at ProvisionController.cs:88 (REST) and ACSWS.cs:2429 (SOAP), followed by the flag guard at ProvisionController.cs:92-100 and ACSWS.cs:2433-2441. Both call sites carry the comment first - check cpes / second - check flags (BT-3989). Because the device lookup throws FTExceptionNoCpe for a serial that does not resolve (FT.FTACSWS.BLL/Device.cs:290 in the REST project, :286 in the SOAP project), .NET answers 201 (NO_CPE) in that case and never reaches its own flag guard.
| Input | .NET (REST & SOAP) | Java (REST & SOAP) |
|---|---|---|
Non-existent |
|
|
Existing device, no flag |
|
Same — parity |
Non-existent |
|
Same — parity |
Absent, empty or whitespace-only |
|
|
|
This is the removal operation only. The provisioning check operation ( |
Rationale: the FRD REST specification (§6.4) marks Data, Obj, Rpc and File as Optional* with the note "at least one of these parameters must be set". A request that sets none of them therefore violates the request structure, and 203 (INCORRECT_REQUEST) is the correct answer for it irrespective of the device. .NET’s 201 on that input is a consequence of its statement order rather than a decision about the contract — it reports a device problem for a request that was never well-formed. The order was reviewed on DEV-2489 (the REST twin of the same report) and the product decision was to keep the structural check first; the reporter withdrew the defect on that basis. Clients keying off ErrorCode must therefore not read 203 here as "the device exists": on this operation nothing is known about the device until at least one flag is true. Related tickets: DEV-2489, DEV-2931, BT-3989. The same validate-first order applies, for the same reason, to four further operations — see Request Structure Validated Before the Device Is Resolved.
7.25. Request Structure Validated Before the Device Is Resolved
Applies to: PUT /api/Diagnostic / SOAP FTCreateDiagnostic, PUT /api/Object / FTAddObject, DELETE /api/Object / FTDeleteObject, and DELETE /api/Task/Pending / FTDeletePendingTasks. Each pair shares one service method, so REST and SOAP behave identically. The same rule on provision removal is documented separately in Provision Removal: Flags Validated Before the Device Is Resolved.
Behavior. Every request-structure check that does not need the device runs before the device is resolved, and a failure is answered with HTTP 200 and ErrorCode 203 whether or not the device exists. The serial number, Oui and ModelName are not looked up on that path, and no ACS call is made. The checks in this class are:
-
FTCreateDiagnostic—SetParametersabsent, empty, or containing no parameter that has both aNameand aValue; any parameter that isnull, or carries a blankNameor a blankValue; any blank entry inGetParameterNames; an absent or unsupported diagnosticsName. -
FTAddObject— anObjectNamethat does not end with a dot, when parameter checks are enabled (api.settings.request.parameters-check-exist); with the checks off the dot is not enforced (DEV-2624). -
FTDeleteObject— anObjectNamethat does not denote a specific instance. -
FTDeletePendingTasks— a positiveTransactionIdfor which no pending task exists.
The DTO-level constraints are part of this class and behave the same way: they are evaluated before the method body and therefore also before the device is resolved. A whitespace-only or absent serial number is the one member of that group with its own entry, Whitespace-Only Serial Number, because it is rejected by the serial constraint itself.
The legacy .NET API resolves the device first and validates second on all four operations: ACSWS.cs:2946-2962 (FTCreateDiagnostic), :2007-2009 (FTAddObject), :2056-2057 (FTDeleteObject), :1389-1390 (FTDeletePendingTasks), and DiagnosticController.cs:81-85 on .NET REST. Because its device lookup throws FTExceptionNoCpe for a serial that does not resolve, .NET answers 201 (NO_CPE) in that case and never reaches its own structure checks.
| Input | .NET (REST & SOAP) | Java (REST & SOAP) |
|---|---|---|
Non-existent |
|
|
Existing device with the same structural defect |
|
Same — parity |
Non-existent |
|
Same — parity |
|
One check on
|
Rationale: validating the request structure first is the cheaper and faster answer. A request that is going to be rejected anyway costs no device lookup and no ACS round trip, which keeps a malformed or abusive caller from consuming database and ACS capacity and shortens the response the caller waits for. .NET’s 201 on such input is a consequence of its statement order rather than a decision about the contract — it reports a device problem for a request that was never well-formed. Clients keying off ErrorCode must therefore not read 203 on these operations as "the device exists": nothing is known about the device until the request structure is valid. On FTDeletePendingTasks the pre-lookup check is itself a database query, so there the saving is the device resolution and the ACS path rather than all I/O. The order was reviewed and confirmed as the product decision on DEV-2932, consistently with the earlier ruling on provision removal (DEV-2489, DEV-2931) and with DEV-2416, where a request missing a mandatory parameter was confirmed to belong to 203 irrespective of the .NET comparison. Related tickets: DEV-2932, DEV-2489, DEV-2931, DEV-2416.
7.26. SOAP Request That Cannot Be Unmarshalled (ErrorCode 203)
Applies to: SOAP, every operation of the endpoint /ACSWS. REST is not affected.
Behavior. If the SOAP request cannot be unmarshalled, the Java port answers HTTP 200. The body is the operation’s response element with ErrorCode (or ResponseCode) 203 (INCORRECT_REQUEST) and one of two fixed messages. The message is Invalid request: too many repeated elements in a single element (at most 50000 are supported) when one XML element holds more repeated child elements than the endpoint supports. The message is Invalid request: unexpected or malformed element for every other unmarshalling failure. Unmarshalling fails on an unknown or malformed element, and on an empty, whitespace-only, xsi:nil or non-numeric value in a numeric field. Example: an empty <transid/> in FTGetTransactionStatus.
The root element of the 203 body has the same name as the success response element of the operation, for example FTGetTransactionStatusResponse. The name is taken from the service model.
| Input | .NET SOAP behavior | Java port |
|---|---|---|
Empty |
SOAP fault, HTTP |
HTTP |
Element entirely absent, for example no |
The member keeps its default, for example |
Same — parity. This is not an unmarshalling failure, so no |
Client note: namespace. The success response is in the namespace xmlns="http://www.friendly-tech.com/". The root element of the 203 body has no namespace. This keeps the bytes already shipped for the Group Update operations. A namespace-strict client may not bind the 203 body to its response type. Such a client must read the body as plain XML, or treat an unbindable response as 203.
Rationale: the raw soap:Fault carries parser diagnostics (Unmarshalling Error: …). Exposing them to clients is information disclosure (CWE-209). A constant message and a machine-readable 203 give the client a stable contract. Before DEV-3007 this handling existed only for the Group Update family (DEV-2524); every other operation still returned HTTP 500 with a raw soap:Fault. Related tickets: DEV-2524, DEV-3007.
7.27. SOAP Element Names Are Case-Sensitive
Applies to: SOAP, every operation of the endpoint /ACSWS. This is parity, not a divergence — it is stated here because the opposite rule holds on REST and the two are easy to confuse.
Behavior. SOAP body element names are matched case-sensitively, exactly as in the legacy .NET ASMX service, whose method parameter names are the element names. REST is the opposite: JSON field names are matched case-insensitively (see the note in API Design Principles, DEV-2436). A SOAP element whose spelling differs from the published one in case only is an unknown element, so the request does not unmarshal and the answer is HTTP 200 with ErrorCode 203 as described in SOAP Request That Cannot Be Unmarshalled (ErrorCode 203). The 203 message is constant and deliberately does not name the offending element (CWE-209), so a client cannot tell a misspelled element from any other malformed body: the published spelling is the only contract.
The serial and model element names are not uniform across operations, and this too is inherited from the .NET original:
| Operations | Element names |
|---|---|
|
|
Every other operation that takes a device serial |
|
OUI is spelled the same everywhere. Each operation’s accepted spellings are listed under "Request fields (SOAP body)" in the SOAP OpenAPI document (soap-api.yaml), and a guard test checks that document against the element names the endpoint actually publishes. Making SOAP element matching case-insensitive would be a change to the wire contract of every operation of the endpoint, and is not planned. Related tickets: DEV-3060, DEV-2436, DEV-3007.
8. API Documentation
The API is fully documented using OpenAPI 3.0 (Swagger):
-
Swagger UI: Available at
http://[server]/iot-webservice/swagger-ui/index.html -
OpenAPI JSON: Available at
http://[server]/iot-webservice/v3/api-docs -
OpenAPI YAML: Available at
http://[server]/iot-webservice/v3/api-docs.yaml
The OpenAPI documentation is generated automatically from annotations in the controller classes, ensuring that it’s always up-to-date with the actual implementation. The Swagger UI provides a user-friendly interface for exploring and testing the API.
9. External Integrations
The ACS integration flow follows this general pattern:
9.1. ACS Client Configuration
The ACS client is configured in the application:
acs:
url: ${ACS_WEB_SERVICE_HOST}
port: ${ACS_WEB_SERVICE_PORT}
username: ${ACS_WEB_SERVICE_USER}
password: ${ACS_WEB_SERVICE_PASSWORD}
9.2. ACS Integration Endpoints
The application communicates with the Auto Configuration Server (ACS) system through SOAP API calls to manage and provision devices.
The integration is implemented via the FtAcsApiClient class which encapsulates all ACS-related operations.
9.3. Device Management Endpoints
| Operation | Method | Description |
|---|---|---|
Create Device |
|
Creates a new device in the ACS with specified manufacturer, model, OUI, protocol type, and serial number |
Create Non-TR Device |
|
Creates a non-TR-069 compliant device with custom configuration URL, login, and password |
Clear Account Info |
|
Clears the account information associated with a specified device serial number |
Update User Info |
|
Updates detailed user information including custom fields, login credentials, geographic data, and contact details |
Add Device To Blacklist |
|
Adds devices to a blacklist based on serial numbers, manufacturer, and model |
Delete Device From Blacklist |
|
Removes devices from a blacklist based on serial numbers, manufacturer, and model |
9.4. Device Configuration Endpoints
| Operation | Method | Description |
|---|---|---|
Set Device Parameters |
|
Sets or updates parameter values on devices with options for prioritization, grouping, and provisioning |
Set Parameters Without Task |
|
Sets device parameters without creating a task for immediate application |
Get Parameter Data |
|
Retrieves parameter data from devices with options to specify which aspects to fetch (names, values, attributes) |
Get Parameter Data Directly |
|
Reads parameter data directly from the device without a task round-trip; CWMP devices only (TR-069 / TR-098 / TR-181), used when |
Add CPE Object |
|
Creates a new object in the device’s data model with specified parameters |
Delete CPE Object |
|
Removes an object from the device’s data model |
9.5. Device Operations Endpoints
| Operation | Method | Description |
|---|---|---|
Reboot CPE |
|
Issues a reboot command to devices with options for prioritization and pushing |
Reset CPE |
|
Issues a factory reset command to devices |
Reprovision CPE |
|
Triggers reprovisioning of devices with options for customizing what aspects to reprovision |
Invoke RPC Method |
|
Invokes a custom RPC method on devices with specified content |
Invoke RPC Without Task |
|
Invokes a custom RPC method without creating a task for immediate execution |
Invoke Method |
|
Invokes a system-defined method on devices with parameter values |
Push Device |
|
Initiates a connection request to a device with specified timeout |
9.6. File Management Endpoints
| Operation | Method | Description |
|---|---|---|
Download Files |
|
Initiates file downloads to devices with options for authentication, delivery method, and post-download actions |
Upload Files |
|
Initiates file uploads from devices to a specified URL |
Backup |
|
Creates a device backup and uploads it to a specified location |
Restore |
|
Downloads and applies a backup to restore device configuration |
9.7. Group Update Endpoints
Group Update orchestrates the same set of tasks across many devices grouped by manufacturer/model and selected by All, an existing Condition filter view, or Individual serial numbers. The endpoints are documented in detail (request/response fields, behavior, errors and examples) on a dedicated page: Group Update API.
| Operation | Path | Description |
|---|---|---|
|
Create a new group update campaign |
|
|
Delete an existing group update campaign |
|
|
Create a device filter condition for group updates |
|
|
Delete a device filter condition |
|
|
List all group update tasks |
|
|
List predefined conditions |
|
|
Retrieve details of a specific group update |
|
|
Retrieve details of a specific condition |
|
|
Start execution of a group update |
|
|
Pause an active group update |
|
|
Stop a group update completely |
9.8. Diagnostics Endpoints
| Operation | Method | Description |
|---|---|---|
Create Diagnostic |
|
Create a diagnostic session with input parameters and output parameter names to collect |
9.9. Error Handling
ACS operations are wrapped in error handling that transforms exceptions into consistent API error responses with appropriate codes:
-
Success operations return transaction IDs where applicable
-
Errors are logged and wrapped in
FtApiExceptionwith appropriate error codes -
Connection issues to ACS result in
NO_ACSerror codes