Skip to content

API

You can operate and automate all functions of our portal via our comprehensive API.

Authorization

You can obtain your API key in your profile under the "API Keys" tab. If the API Key field is still empty, click on the symbol next to the respective tenant and then on "Generate Key". Copy the created API key to the clipboard.

For authentication, use the "Authorization" header with the content "Token "

Python3 Example
#!/usr/bin/env python3
import requests
import os

API_KEY = os.getenv("API_KEY")
BASE_URL = "http://edgeportal.edgeops.de/api"
API_VERSION = "v1"

def main() -> None:
    me = get_me()
    print(f"Hello, {me['first_name']} {me['last_name']}")

def get_me() -> dict:
    return api_get(application="multi-tenancy", endpoint="user/me")

def get_api_url(application:str, endpoint:str) -> str:
    return f"{BASE_URL}/{application}/{API_VERSION}/{endpoint}"

def api_get(application:str, endpoint:str) -> dict:
    headers = {
        "Authorization": f"Token {API_KEY}"
    }
    url = get_api_url(application=application, endpoint=endpoint)
    response = requests.get(url, headers=headers)
    return response.json()

if __name__ == "__main__":
    main()

API Documentation

You can find complete and interactive documentation of all API endpoints here.