This page will help you get started with Fluency V6 API.
Fluency exposes many of its API's for use externally. In fact, nearly every call/action made by the Fluency Web interface can be replicated using the API.
Using Fluency's API requires an API Token. This token can be created from the Fluency Web interface. From the Main menu, select the API Token option, under the User Admin section.
The API Endpoint is the same as the URL used to access the Fluency Web interface. It should be in the following format, unless a custom URL format was used for the deployment.
https://{company-name}.cloud.fluencysecurity.com/api/{api-name}
Authentication
An authentication / login test can be used to check the validity of the Endpoint / Credential configuration. The username/password is the same as those used for the Fluency interface.
Note: This step is not necessary if using the Fluency API Token for authentication.
cURL example
curl -X POST "https://test.cloud.fluencysecurity.com/api/auth/userList" -H "Fluencytoken: b23d7bd2-c388-4257-7d05-61704b76a3a8" -H "Content-Type: application/json" -d '{"kargs":{}}'
Response
{
"verdict":"OK",
"response":{
"sessionToken":"b23d7dd2-c388-4257-7d04-61704b76a3a8",
"publicKey":"AELXKtPN",
"userName":"Admin",
"createdOn":"0001-01-01T00:00:00Z",
"roles":[
"admin"
],
"status":"succeed",
"fullName":"Fluency Admin",
"rights":"admin",
"email":"[email protected]",
"organization":"fluencysecurity.com",
"name":"[email protected]",
"preference":{
"timezone":{
"value":"America/New_York",
"policy":"Server"
}
},
"timezone":"America/New_York",
"profile":null
}
}
Note: The sessionToken in the response can be used like the permanent API Token in following calls.
List users
The auth/userList API call lists the current users of the Fluency interface.
Note the "Fluencytoken:" value specified in the POST Header: (If using the API Token, use that instead of the sessionToken from the above authentication call.)
-H "Fluencytoken: b23d7bd2-c388-4257-7d05-61704b76a3a8"
cURL example
curl -X POST "https://test.cloud.fluencysecurity.com/api/auth/userList" -H "Fluencytoken: b23d7bd2-c388-4257-7d05-61704b76a3a8" -H "Content-Type: application/json" -d '{"kargs":{}}'
Response
{
"verdict":"OK",
"response":{
"users":[
{
"username":"[email protected]",
"email":"[email protected]",
"firstName":"admin",
"lastName":"admin",
"organization":"SecurityDo",
"rights":"admin",
"restricted":false,
"disabled":true,
"lastLogin":"2021-08-06T20:22:53.810894154Z",
"passwordDate":"0001-01-01T00:00:00Z",
"preference":{
"timezone":{
"value":"Etc/GMT",
"policy":"GMT"
}
},
"roles":[
"admin"
],
"dataPolicies":null,
"APIPolicies":null,
"profile":null
}
]
}
}
Additional Examples
For more complete examples, and to see the Fluency API in action, enable the
Debug Console / Web Developer Tools on the Browser when using the Fluency
interface. The web requests captured in the console/tools should show the exact
behavior of the API.