A seguir será descrito o processo para localizar um imóvel conectado a uma porta de um Splitter, com base nas informações disponíveis do próprio Splitter.
Passos do Processo
Identificar as portas dos Splitter e obter a fibra conectada à porta
Identificar quais portas do Splitter possuem conexão, verificando o campoconnectables.output
.Obter a fibra conectada à porta
A partir do ID da fibra conectada na porta do Splitter, buscar os dados da mesma.Obter dados do cabo referente a fibra
Através do campoparent
da fibra, identificar o cabo responsável pela conexão.Obter os detalhes do imóvel
A partir do ID do imóvel obtido nas informações do cabo, buscar os dado do mesmo.
➡️ Exemplo
Para esse exemplo será usado os dados do seguinte SplitterThe following describes the process to locate a property connected to a Splitter port based on the available information from the Splitter itself.
Process steps
Identify the splitter ports and obtain the fiber connected to the port
Identify which Splitter ports are connected by checking theconnectables.output
field.Retrieve the fiber connected to the port
Using the ID of the fiber connected to the Splitter port, retrieve its data.Obtain cable data from the fiber
Using theparent
field of the fiber, identify the cable responsible for the connection.Retrieve property details
Using the property ID obtained from the cable information, retrieve the property data.
➡️ Example
In this example will be used the following Splitter data:
Code Block | ||
---|---|---|
| ||
{ "isBalanced": true, "orientation": "right", "label": "", "attenuation": [ 10.5, 10.5, 10.5, 10.5, 10.5, 10.5, 10.5, 10.5 ], "implanted": true, "isDrop": true, "kind": "Splitter", "parent": "67100ab7f7c87615f2b9386f", "project": "662f84e9e736c00021effccd", "name": "Splitter 1", "splitterType": "5da61085493d9c00066653f5", "connectables": { "input": [ null ], "output": [ null, "67126f35f7c87615f2b951b0", null, null, null, null, null, null ], "id": "677ff4f2de2d97f28054edbb" }, "ratio": { "output": 8, "input": 1, "id": "677ff4f2de2d97f28054edd3" }, "size": 1, "id": "67100ab7f7c87615f2b93874" ... } |
Identificar as portas dos Splitter e obter a fibra conectada à porta
Nos dados do Splitter, há a propriedade "connectables", que se refere às conexões de entrada e saída do Splitter. Dentro dessa propriedade, o campo "output" corresponde às portas de saída do Splitter, que, neste caso, são 8 portas.
Uma porta com valor "null" indica que não possui conexão, enquanto uma porta conectada exibirá o ID da fibra associada. Neste exemplo, a porta 2 possui uma conexão, e o ID da fibra que realiza essa conexão é "67126f35f7c87615f2b951b0".
Obter dados da fibra conectada à porta
...
Identify the Splitter Ports and Obtain the Fiber Connected to Each Port
The Splitter data includes a connectables
property that specifies its input and output connections. The output
field represents the Splitter's output ports, which in this case include 8 ports.
A port with a
null
value indicates no connection.A port with a value displays the ID of the connected fiber.
In this example, port 2 has a connection with the fiber ID 67126f35f7c87615f2b951b0
.
Retrieve the fiber connected to the port
To fetch the details of the fiber with ID 67126f35f7c87615f2b951b0
, use the following request to the fibers
endpoint:
Code Block |
---|
curl --location 'https://exemplo.ozmap.com.br:9994/api/v2/fibers/67126f35f7c87615f2b951b0' \ --header 'Authorization: OZMAP_KEY' |
A resposta esperada para essa chamada éThe expected response is:
Code Block |
---|
{ "isDrop": true, "connectors": [ "67100ab7f7c87615f2b93874" ], "kind": "Fiber", "name": "L1-F1", "parent": "67126f35f7c87615f2b951af", "project": "662f84e9e736c00021effccd", "fiberNumber": 1, "createdAt": "2024-10-18T14:22:45.579Z", "updatedAt": "2024-10-18T14:22:45.782Z", "id": "67126f35f7c87615f2b951b0" } |
Nos dados da fibra, é possível identificar a propriedade "parent" que contém o ID “67126f35f7c87615f2b951af”, que se refere ao ID do cabo referente a fibra.
Obter dados da cabo referente a fibra
Para obter os dados do cabo de ID “67126f35f7c87615f2b951af” será realizada a seguinte chamada para a rota “cables”, segue a chamadaThe parent
property indicates the ID 67126f35f7c87615f2b951af
, which corresponds to the cable of this fiber.
Obtain cable data from the fiber
To retrieve the details of the cable with ID 67126f35f7c87615f2b951af
, use the following request to the cables
endpoint:
Code Block |
---|
curl --location 'https://exemplo.ozmap.com.br:9994/api/v2/cables/67126f35f7c87615f2b951af' \ --header 'Authorization: OZMAP_KEY' |
A resposta esperada para essa chamada éThe expected response is:
Code Block |
---|
{ "tags": [], "positionsProcessed": true, "orientationA": "left", "orientationB": "right", "kind": "Drop", "boxA": "67100ab7f7c87615f2b9386f", "boxB": "67126f35f7c87615f2b951ad", "implanted": true, "poles": [ { "reserve": 0, "id": "67100ab7f7c87615f2b93870" } ], "project": "662f84e9e736c00021effccd", "cableType": "5d83b2fcd846ae365237b3a1", "hierarchyLevel": 3, "looseNumber": 1, "fiberNumber": 1, "ducts": [], "loss": 0, "ground_length": 0.032974573633413246, "length": 0.032974573633413246, "altitude_length": null, "createdAt": "2024-10-18T14:22:45.431Z", "updatedAt": "2025-01-09T16:07:52.680Z", "id": "67126f35f7c87615f2b951af" } |
Nos dados do cabo, é possível observar as propriedades "boxA" e "boxB", que indicam os elementos aos quais o cabo está conectado. Nesse caso, "boxA" representa a Caixa no qual o Splitter está localizado, enquanto "boxB" refere-se ao imóvel conectado.
Portanto o ID “67126f35f7c87615f2b951ad” presente na proprieade “boxB” se refere ao imóvel conectado a porta 2 do Splitter.
Obter os detalhes do imóvel
Para obter os do imóvel de ID “67126f35f7c87615f2b951ad” será realizada a seguinte chamada para a rota “properties”, segue a chamadaThe boxA
and boxB
properties indicate the elements connected to the cable:
boxA
represents the box where the Splitter is located.boxB
corresponds to the property connected to the port.
The ID 67126f35f7c87615f2b951ad
in boxB
refers to the property connected to port 2 of the Splitter.
Retrieve property details
To fetch the property details for ID 67126f35f7c87615f2b951ad
, use the following request to the properties
endpoint:
Code Block |
---|
curl --location 'https://exemplo.ozmap.com.br:9994/api/v2/properties/67126f35f7c87615f2b951ad' \ --header 'Authorization: OZMAP_KEY' |
A resposta esperada para essa chamada éThe expected response is:
Code Block |
---|
{ "observation": "", "drop": "67126f35f7c87615f2b951af", "tags": [], "cables": [], "towers": [], "kind": "Property", "client": { "certified": false, "status": 0, "observation": "", "tags": [], "implanted": true, "onu": { "user_PPPoE": "", "serial_number": "", "mac_address": "", "id": "677ff458933efcf4ecbe0aa7" }, "kind": "ftth", "code": "263655-2", "name": "Example", "createdAt": "2024-10-18T14:22:44.997Z", "updatedAt": "2025-01-09T16:07:52.074Z", "id": "67126f34f7c87615f2b951aa" }, "box": "67100ab7f7c87615f2b9386f", "address": "AVENIDA15 Street EXAMPLEexample, "creatorData": { "id": "65d645dc76afab0014bbc9d1", "name": "integracaointegration_sgp_test", "username": "integracao_sgpintegration_test" }, "project": "662f84e9e736c00021effccd", "pole": "67100ab7f7c87615f2b93870", "coords": [ -48.5252896811811, -27.57688076201291 ], "createdAt": "2024-10-18T14:22:45.328Z", "updatedAt": "2025-01-09T16:10:25.998Z", "id": "67126f35f7c87615f2b951ad", "lng": -48.5252896811811, "lat": -27.57688076201291, "connections": [ { "id": "67100ab7f7c87615f2b93874", "kind": "Splitter", "port": 2, "name": "Splitter 1", "implanted": true, "fiber": "67126f35f7c87615f2b951b0" } ] } |