Legacy Wired Readout
curl --request POST \
--url https://{environment}.{customerId}.ch.locatee.com/LocateeServerCore/api/v1/switchPortEntries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"switchPortEntries": [
{
"connectedDevices": [
{
"dateTime": "2023-11-07T05:31:56Z",
"macAddress": "11:22:33:44:55:af",
"portLabel": "Gi0/0/91",
"vlan": {
"id": 977,
"name": "OFFICE-DESKS"
},
"user": {
"name": "foo.bar@baz.com"
},
"hostname": "MacBook-Pro-2.local"
}
],
"networkDeviceId": 12132,
"networkDeviceName": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
switchPortEntries: [
{
connectedDevices: [
{
dateTime: '2023-11-07T05:31:56Z',
macAddress: '11:22:33:44:55:af',
portLabel: 'Gi0/0/91',
vlan: {id: 977, name: 'OFFICE-DESKS'},
user: {name: 'foo.bar@baz.com'},
hostname: 'MacBook-Pro-2.local'
}
],
networkDeviceId: 12132,
networkDeviceName: '<string>'
}
]
})
};
fetch('https://{environment}.{customerId}.ch.locatee.com/LocateeServerCore/api/v1/switchPortEntries', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{environment}.{customerId}.ch.locatee.com/LocateeServerCore/api/v1/switchPortEntries"
payload = { "switchPortEntries": [
{
"connectedDevices": [
{
"dateTime": "2023-11-07T05:31:56Z",
"macAddress": "11:22:33:44:55:af",
"portLabel": "Gi0/0/91",
"vlan": {
"id": 977,
"name": "OFFICE-DESKS"
},
"user": { "name": "foo.bar@baz.com" },
"hostname": "MacBook-Pro-2.local"
}
],
"networkDeviceId": 12132,
"networkDeviceName": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Ingress - Legacy
Legacy Wired Readout
Send information about a collection of network switches as SwitchPortEntries.
POST
/
LocateeServerCore
/
api
/
v1
/
switchPortEntries
Legacy Wired Readout
curl --request POST \
--url https://{environment}.{customerId}.ch.locatee.com/LocateeServerCore/api/v1/switchPortEntries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"switchPortEntries": [
{
"connectedDevices": [
{
"dateTime": "2023-11-07T05:31:56Z",
"macAddress": "11:22:33:44:55:af",
"portLabel": "Gi0/0/91",
"vlan": {
"id": 977,
"name": "OFFICE-DESKS"
},
"user": {
"name": "foo.bar@baz.com"
},
"hostname": "MacBook-Pro-2.local"
}
],
"networkDeviceId": 12132,
"networkDeviceName": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
switchPortEntries: [
{
connectedDevices: [
{
dateTime: '2023-11-07T05:31:56Z',
macAddress: '11:22:33:44:55:af',
portLabel: 'Gi0/0/91',
vlan: {id: 977, name: 'OFFICE-DESKS'},
user: {name: 'foo.bar@baz.com'},
hostname: 'MacBook-Pro-2.local'
}
],
networkDeviceId: 12132,
networkDeviceName: '<string>'
}
]
})
};
fetch('https://{environment}.{customerId}.ch.locatee.com/LocateeServerCore/api/v1/switchPortEntries', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{environment}.{customerId}.ch.locatee.com/LocateeServerCore/api/v1/switchPortEntries"
payload = { "switchPortEntries": [
{
"connectedDevices": [
{
"dateTime": "2023-11-07T05:31:56Z",
"macAddress": "11:22:33:44:55:af",
"portLabel": "Gi0/0/91",
"vlan": {
"id": 977,
"name": "OFFICE-DESKS"
},
"user": { "name": "foo.bar@baz.com" },
"hostname": "MacBook-Pro-2.local"
}
],
"networkDeviceId": 12132,
"networkDeviceName": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
A batch can contain an arbitrary amount of SwitchPortEntries (>1), but it has to be ensured that the readout of an individual networkDevice (i.e. Switch) is always complete. Otherwise, the error object has to be populated with the details about the error.
A list of switchPortEntries.
Show child attributes
Show child attributes
Response
Successful Operation

