Client Disconnection
Disconnecting a client in OZmap who's connected to a Box and a Splitter can be done in two ways:
Disconnect the Client's Fiber (keeping the client in the Box): In this case, the client will be disconnected from the Splitter but remain linked to the Box.
Disconnect the Client from the Box (removing the drop cable): With the drop cable removed, the client will be fully disconnected from both the Splitter and the Box.
Example
Below, we present an example of how to perform each of the disconnection processes mentioned before. For this, we will use the following property from OZmap, which will be used to illustrate both types of disconnection:
{
"observation": "",
"drop": "665a0b258ce829001532be3b",
"tags": [],
"cables": [],
"towers": [],
"kind": "Property",
"box": "665a099ad502780021370a59",
"address": "RUA TEST OZMAP",
"client": {
...
},
"creatorData": {
"id": "65d645dc76afab0014bbc9d1",
"name": "test_ozmap",
"username": "test_ozmap"
},
"connections": [
{
"id": "665a099ad502780021370a61",
"kind": "Splitter",
"port": 1,
"name": "Splitter 1",
"implanted": true,
"fiber": "665a0b258ce829001532be3c"
}
]
...
}
Disconnect the Client's Fiber (keeping the client linked to the Box)
In this case, the client is disconnected from the Splitter but remains linked to the Box. To perform this operation, the drop cable ID (in this example, '665a0b258ce829001532be3b
'), located in the 'drop' property of the property, is required.
To disconnect the client's fiber, make the following request to OZmap:
curl --location --request POST 'https://sandbox.ozmap.com.br:9994/api/v2/cables/665a0b258ce829001532be3b/fibers/disconnect' \
--header 'Authorization: AUTHORIZATION_KEY'
The expected response will be a status 204 No Content, confirming that the fiber disconnection was completed.
Disconnect the Client from the Box (removing the drop cable)
In this case, besides disconnecting the client's fiber, the drop cable will also be removed, completely disconnecting the client from the box.
Now, we will remove the drop cable in OZmap, which will simultaneously disconnect the client from the fiber. This procedure will be performed through a cascading delete, using the query cascade=true
. By deleting the drop cable, the fiber will also be removed if it is connected. To execute this process, make the following request to OZmap, providing the drop cable ID (in this example, '665a0b258ce829001532be3b
') and the query cascade=true
:
curl --location --request DELETE 'https://sandbox.ozmap.com.br:9994/api/v2/cables/665a0b258ce829001532be3b?cascade=true' \
--header 'Authorization: AUTHORIZATION_KEY'
The expected response will be a status 204 No Content, confirming the cable was successfully removed.