Download The Workspace

Transcript
Appendix C. FlowTraq Web API
Reference
The FlowTraq Web API provides a RESTful interface for for retrieving NetFlow data from a FlowTraq
Server in JSON format for use by third-party applications. This API defines two methods of retrieving
data:
1. NetFlow data processed into specific FlowTraq views
2. Raw NetFlow session records as stored by FlowTraq
Authentication
An API authentication token is required for all requests. Authentication tokens must be generated for
each client through the FlowTraq command line tools. To request the token, send an HTTP request
such as:
POST https://example.com/flowtraq/api/v1/auth
Request Parameters
Parameter Name
Value
Default Value
Notes
server
string
"localhost"
The FlowTraq server
address.
port
number
9640
The FlowTraq server
port.
username
string
required
Username of a user on
the Flowtraq server.
password
string
required
Password of the Flowtraq server user.
Response Parameters
The response will contain either the resulting auth token or an error message:
Parameter Name
Value
Notes
auth_token
string
Only returned if authentication
successful.
error
string
Only returned if authentication
failed.
Example
For example, using curl in a shell command:
$
curl
"https://example.com/flowtraq/api/v1/auth"
"username=admin&password=admin"
131
-d