Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ hide:
- toc
---

{% if enable_swagger_openapi %}

![Omnissa Intelligence](assets/logos/favicon-dark.svg){ align=right }

The Omnissa Intelligence (formerly Workspace ONE Intelligence) V2 API documentation describes how to query and extract data for use in other business intelligence tools. It also helps with building General Data Protection Regulation (GDPR) compliant tools and applications with REST APIs.
Expand Down Expand Up @@ -155,3 +157,17 @@ Refer to **Table 1. API Call Limits Per Organization** in the PDF for Standard,
1. Follow **[Authentication](Authentication.md)** to configure a service account and retrieve tokens.
2. Explore endpoints in **[REST APIs](REST-APIs.md)**.
3. Compare payloads using **[Sample responses](API-sample-responses.md)**.

{% else %}

![Omnissa Intelligence](assets/logos/favicon-dark.svg){ align=right }

The Omnissa Intelligence API documentation describes how to query and extract data for use in other business intelligence tools. It also helps with building General Data Protection Regulation (GDPR) compliant tools and applications with REST APIs.

## Documentation and Reference

| Name | Link |
| --- | --- |
| API Documentation for Omnissa Intelligence V2 | [Download PDF](https://developer.omnissa.com/omnissa-intelligence-apis/guides/DHUB-APIDocumentationforOmnissaIntelligence-V2-130326-183145.pdf){ .md-button } |

{% endif %}
44 changes: 44 additions & 0 deletions hooks/site_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
"""Site hooks for toggling Swagger/OpenAPI documentation."""

SWAGGER_OPENAPI_PAGES = (
"Authentication.md",
"REST-APIs.md",
"API-sample-responses.md",
)

SWAGGER_OPENAPI_NAV = (
{"Overview": "index.md"},
{"Authentication": "Authentication.md"},
{"REST APIs": "REST-APIs.md"},
{"Sample responses": "API-sample-responses.md"},
)


def _is_swagger_openapi_enabled(config):
return bool(config.get("extra", {}).get("enable_swagger_openapi", False))


def on_config(config):
if _is_swagger_openapi_enabled(config):
config["nav"] = list(SWAGGER_OPENAPI_NAV)
return config

config["nav"] = ["index.md"]
config["extra_javascript"] = [
script
for script in config.get("extra_javascript", [])
if "swagger-token-bridge" not in script
]
return config


def on_files(files, config):
if _is_swagger_openapi_enabled(config):
return files

for page in SWAGGER_OPENAPI_PAGES:
file = files.get_file_from_path(page)
if file is not None:
files.remove(file)

return files
10 changes: 6 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ plugins:
# Customization
extra:
homepage: https://omnissa.com
# When true, show Authentication, REST APIs (Swagger/OpenAPI), and sample responses.
enable_swagger_openapi: false

hooks:
- hooks/site_config.py

extra_css:
- assets/stylesheets/extra.css
Expand Down Expand Up @@ -145,9 +150,6 @@ markdown_extensions:
- toc:
permalink: true

# Navigation
# Navigation (expanded by hooks/site_config.py when enable_swagger_openapi is true)
nav:
- Overview: index.md
- Authentication: Authentication.md
- REST APIs: REST-APIs.md
- Sample responses: API-sample-responses.md
Loading