Skip to content

Calling the REST api

To interact with omnimion programatically, generate an API key and then encode it to base64 and use it in the Authorization header of a request as shown in this Python example:

import requests
response = requests.get("https://omnimion.com/admin/me", headers={"Authorization": "Bearer NDRjNTFmNDUtN2ZiZS00NzUzLWI4YjAtNjhjODEzZDRhZWUw"})
data = response.json()

You can also add the api key as a URL query parameter. This is useful for example when using Omnimion map tiles. The above get request would look like this:

import requests
response = requests.get("https://omnimion.com/admin/me?token=NDRjNTFmNDUtN2ZiZS00NzUzLWI4YjAtNjhjODEzZDRhZWUw")
data = response.json()