External API Contract (REST)
*Status:* v1.0 authoritative · Owner: Backend team · Last reviewed: 2026-06-26
This is the outward-facing REST API that other systems consume: OSS/BSS, integrators and partner services
(repositories ft-northbound-api, ft-service-api, ft-provision-api). Backend engineers and integrators read it.
The living contract is the OpenAPI spec (springdoc / Swagger UI). The rules below are the FT conventions that the spec must follow
(see also the Java standard, J13).
| FT has two API surfaces. Do not mix them. The internal UI↔BE API is POST-RPC (see the Internal API Contract). The external API is this page. |
The contract
| Element | Shape | Notes |
|---|---|---|
Style |
REST: |
|
DTOs |
Request |
No |
Ack and error envelope |
|
The external catalog. It is distinct from the internal |
Error transport |
HTTP |
External layer (J13). In ft-northbound-api: |
Auth |
|
See J15 |
Docs |
OpenAPI via springdoc: |
A public endpoint without OpenAPI is incomplete. |
Error codes of StatusResponse
errorCode |
Meaning |
|---|---|
|
Success. The operation was performed successfully. |
|
No CPE |
|
No DB |
|
Incorrect request structure, non-writable parameter or node |
|
General error |
|
No ACS |
|
No CPE for NewSN |
|
No CPE for CurrSN |
Source: the comment of StatusResponse in ft-provision-api, file src/main/java/com/friendly/provisionportal/nbi/response/StatusResponse.java:11-21. CPE means customer premises equipment (the device). ACS means Auto Configuration Server.
The JSON property names in that class are ErrorCode and Message (StatusResponse.java:33,40). The Java field names are errorCode and message.
ft-northbound-api and ft-service-api use the class of the same name from the shared library, ft-libs/shared-dto/src/main/java/com/friendly/shareddto/api/base/response/StatusResponse.java, with the same codes and the same JSON names.
One exception: ProvisionController in ft-provision-api answers in an older shape (Result with 100 or 200, Message, Bid, Status). New code does not copy it.
Operations: verb per kind (REST)
| Operation | Verb | Path and body | Response |
|---|---|---|---|
List or query |
|
|
|
Get by id |
|
|
|
Create |
|
|
|
Update |
|
|
|
Delete |
|
|
|
Action (RPC-like) |
|
|
|
The verb follows the semantics of the operation, but the northbound surface is action-heavy. Many operations are POST or PUT with a request DTO in the body, not REST with a resource id in the path. Use GET for a simple read without side effects. Use POST when the read needs a filter body. The sources define no further criterion for GET or POST.
|
Validation and errors
The Java standard defines the implementation (J13, HTTP APIs). Use @Valid or @Validated at the boundary. Use one global @RestControllerAdvice per service. Do not use a try/catch in a controller. Never leak stack traces. On this surface the advice maps a domain or validation error to HTTP 200 plus a StatusResponse.
Stability and change control
|
Outside systems consume this API. Treat every change as breaking by default.
|
| Back to Internal API (UI↔BE), Java standard and Overview. |