FAQ: Can I set the license key using the API?

Yes, through our GraphQL API (you need to be a root user). Below is a curl example to get you going.

Here's an example:

ini
HUMIO_BASE_URL=<example: https://example.com>
API_TOKEN=<you can find this in your account details>
LICENSE=<your license string>

curl ${HUMIO_BASE_URL}/graphql \
   -H "Authorization: Bearer ${API_TOKEN}" \
   -H "Content-type: application/json" \
   -d @- << EOF
  {"query":"mutation {updateLicenseKey(license: \"${LICENSE}\") {__typename}}"}
EOF