Push network flow data
POST
/k8s/agents/{clusterId}/network-flows
const url = 'https://shoehorn.example.com/api/v1/k8s/agents/example/network-flows';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"flows":[{"source":"example","destination":"example","port":1,"protocol":"example","bytes_sent":1}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://shoehorn.example.com/api/v1/k8s/agents/example/network-flows \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "flows": [ { "source": "example", "destination": "example", "port": 1, "protocol": "example", "bytes_sent": 1 } ] }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” clusterId
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
flows
Array<object>
object
source
string
destination
string
port
integer
protocol
string
bytes_sent
integer
Example generated
{ "flows": [ { "source": "example", "destination": "example", "port": 1, "protocol": "example", "bytes_sent": 1 } ]}Responses
Section titled “ Responses ”Network flows received