Is it possible to programmatically generate an API key using extrahop credentials?

Hello,

Is it possible to programmatically generate an API key using my extrahop credentials?

I am using java but am open to all options.

If this is not possible, my second option would be to use an html parsing library(JSOUP), to programmatically login, and then parse the api key value from the html.

Any suggestions are welcome.

Thank You

Hi - Welcome! You can do this via the REST API, but only for the setup account. ExtraHop REST API Guide

Strictly focusing on the “if possible” by ignoring other implications of the second option – that could be done from the /admin/api/ page by entering a description on the form then clicking generate. This works in JS:
var descrip = document.getElementById(‘id_description’);
descrip.value = “my description”;
document.forms[“create-key”].submit()

You can also, POST to /users to create a new api key and return it. ExtraHop REST API Guide