NMX Services Registration
In order for NMX-M to receive network telemetry and control information, NMX-M needs to register with NMX-T and NMX-C.
This can be accomplished by sending a POST request to the nmx/v1/services API using the following format:
Example POST Request:
{
"Name": "Some-Name",
"Description": "This is a description.",
"ServiceType": "TELEMETRY",
"ServiceConnectionInformation": {
"Address": "1.1.1.1",
"PortNumber": 8001
}
}
Equivalent cURL Command:
curl --request POST \
--url https://NMX_M-IP/nmx/v1/services \
--header 'Authorization: Basic cnctdXNlcjpOdmlkaWExMg==' \
--header 'Content-Type: application/json' \
--data '{
"Name": "Some Name",
"Description": "Sample Description",
"ServiceType": "CONTROLLER",
"ServiceConnectionInformation": {
"Address": "10.188.47.166",
"PortNumber": 9370
}
}'
Note: The Authorization header will use either rw-user or ro-user along with the corresponding password.
To retrieve the status of all registered services, perform a GET request to the same API.
Example Response:
[
{
"Status": "UP",
"Description": "Description",
"Address": "1.1.1.1",
"UpSince": "2000-01-23T04:56:07.000+00:00",
"Name": "Name",
"ApplicationUUID": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Version": "Version",
"StatusInfo": "StatusInfo",
"ServiceType": "TELEMETRY",
"ID": "551137c2f9e1fac808a5f572",
"ClusterDomainUUID": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"PortNumber": 8001,
"RegisteredAt": "2000-01-23T04:56:07.000+00:00"
}
]
Equivalent cURL Command:
curl --request GET \
--url https://NMX-M-IP/nmx/v1/services \
--header 'Authorization: Basic cnctdXNlcjpOdmlkaWExMg=='
Note: The Authorization header will use either rw-user or ro-user along with the corresponding password.
You can filter the response to retrieve only Telemetry or Controller services. For example, the following command retrieves only Telemetry services:
curl --request GET \
--url https://NMX-M-IP/nmx/v1/services \TELEMETRY&offset=0&limit=1' \
--header 'Authorization: Basic cnctdXNlcjpOdmlkaWExMg=='