Skip to content

Identify employees most at risk of being phished

Get the Group ID

To begin, it is necessary to get the group ID. This can be done by listing all groups:

The endpoint allow a set of query parameters to filter and paginate the results:

  • the base URL: https://api.arsen.co
  • the route: groups
Terminal window
curl --request GET \
--url 'https://api.arsen.co/v1/groups?filter[name]=$eq:sales' \
--header 'x-api-key: <<AUTH_TOKEN>>' \
--header 'Content-Type: application/json'

The result should be like the following example:

{
"status": "success",
"pagination": {
"totalItems": 1,
"totalPages": 1,
"currentPage": 1,
"itemsPerPage": 100,
"nextPage": null,
"prevPage": null
},
"data": {
"groups": [
{
"id": "jkP6Bcn40dARdfyeXfFj",
"name": "sales",
"type": "standard",
"score": 49,
"employeeCount": 93,
"identityDirectory": null,
"createdAt": "2023-11-14T14:51:25.994Z"
}
]
}
}

The response provides the group and its ID.

Get the Employees

The next step is to list the employees in this group. Sorting by score and applying a result limit will ensure only the desired data is returned.

The endpoint also has options for retrieving results

  • the base URL: https://api.arsen.co
  • the route: employees
Terminal window
curl --request GET \
--url 'https://api.arsen.co/v1/employees?filter[groupIds]=$eq:4p6pCZXocEPONBGnGQFm&sort[score]=asc&filter[language]=$eq:it&limit=5&page=1' \
--header 'x-api-key: <<AUTH_TOKEN>>' \
--header 'Content-Type: application/json'

The response provides a list of employees retrieved based on the criteria.

{
"status": "success",
"pagination": {
"totalItems": 639,
"totalPages": 64,
"currentPage": 1,
"itemsPerPage": 100,
"nextPage": null,
"prevPage": null
},
"data": {
"employees": [
{
"id": "g42nJVcl28Nh7ywhABn9",
"email": "[email protected]",
"firstName": "Rebecca",
"lastName": "Starling",
"language": "it",
"score": 12,
"identityDirectory": "microsoft",
"groupIds": ["jkP6Bcn40dARdfyeXfFj", "fIzKBgn4EdzRd7yrx9d2"],
"createdAt": "2023-02-04T14:51:25.997Z"
}
// ...
]
}
}