Axon REST documentation

Hi,

I’m looking for documentation to use Axon Server using REST. For example I would like to request the stored events.
Does it exist?

Hi Robert,
yes, you can open the “/swagger-ui.html” page on the Axon Server HTTP port (for example, “http://localhost:8024/swagger-ui.html”) to get an overview of all endpoints on the REST interface. The “events-rest-controller”, at “/v1/events” is probably what you are looking for.

Cheers,
Bert Laverman

Thanks Bert,

What should I do if /v1/events never returns?
I actually noticed the Axon Server web interface also never shows the events when queried. So I thought I would try the REST interface directly. I’m running Axon 4.3.5 in a docker.

If you’re querying the REST API, I suppose you use a class like HttpClient or such. You can set a timeout on such queries. The amount of time Axon Server will need to gather events really depends on the size of your event store, performance of the storage and such. If you are just trying to see if your event is stored correctly, then the GUI should do fine, but it has a timeout and may return nothing withing that time if the eventstore is too large. You can improve the search performance from the GUI if you include a time constraint, e.g. “aggregateIdentifier = “” | last 5 days”.

Cheers,
Bert

Hi Bert,

I only have a few events stored. For some reason Kaspersky is causing this HTTP request to my docker container to never return.
So my problem is not related to Axon Server.