import requests
url = "https://api.lumos.com/apps"
headers = {
"accept": "application/json",
"authorization": "Bearer <YOUR_API_TOKEN>"
}
response = requests.get(url, headers=headers)
response_page = response.json()
while len(response_page["items"]):
for app in response_page["items"]:
print("---------------------------")
# The Lumos ID for this app.
id = app["id"]
# The ID of the service associated with this app. e.g. slack.com
app_class_id = app["app_class_id"]
print(f"app_class_id: {app_class_id}")
# The ID of the specific application instance associated with this app.
instance_id = app["instance_id"]
print(f"instance_id: {instance_id}")
# The user friendly label of this app.
user_friendly_label = app["user_friendly_label"]
print(f"user_friendly_label: {user_friendly_label}")
# The status of this app.
status = app["status"]
print(f"status: {status}")
# The sources Lumos used to discover this app
sources = app["sources"]
print(f"sources: {sources}")
response = requests.get(
url, headers=headers, params={"size": 50, "page": response_page["page"] + 1}
)
response_page = response.json()