Skip to content

Using IntelMQ API


This section of the documentation is currently incomplete and will be added later.

Usage from programs

The IntelMQ API can also be used from programs, not just browsers. To do so, first send a POST-Request with JSON-formatted data to http://localhost/intelmq/v1/api/login/

    "username": "$your_username",
    "password": "$your_password"

With valid credentials, the JSON-formatted response contains the login_token. This token can be used like an API key in the Authorization header for the next API calls:

Authorization: $login_token

Here is a full example using curl:

  1. Authentication step:

    curl --location --request POST "http://localhost/intelmq/v1/api/login/" \
         --header "Content-Type: application/x-www-form-urlencoded" \
         --data-urlencode "username=$username"\
         --data-urlencode "password=$password"

  2. Using the login token to fetch data:

    curl --location "http://localhost/intelmq/v1/api/version" \
         --header "Authorization: 68b329da9893e34099c7d8ad5cb9c940"

The same approach also works for Ansible, as you can see here: