Hi,
I would like to create a user to use the indexer API for, amongst other things, querying events.
I understand that this cannot be done with the manager API, but it is possible to create a cULR like the following:
curl -u wazuh-wui:wazuh-wui -k -X GET "https://IP_WAZUH:55000/wazuh-alerts-*/_search
{
"size": 20,
"sort": [
{
"timestamp": {
"order": "desc"
}
}
],
"_source": [
"timestamp",
"agent.id",
"agent.name",
"rule.id",
"rule.level",
"rule.description",
"decoder.name",
"location",
"full_log"
],
"query": {
"match_all": {}
}
}"
Could you help me create a user with read-only permissions to use the API?
I understand that this would be similar to the wazuh-wui user but with read-only access, meaning it would not allow any changes to be made to Wazuh.
Thank you
OK, I’ve managed to follow those steps.
But is that enough to be able to use the API?
Is there any documentation on how to query events via the API?
From what I’ve read and understood, I can’t do that with this documentation: https://documentation.wazuh.com/current/user-manual/api/reference.html