The 22.4.1 release of Gateway includes a new experimental GraphQL API Client. Harness the power and flexibility of GraphQL to fetch BlueCat Address Manager data simply and efficiently. You can access the GraphQL API Client through the BlueCat Python Library.
Gateway GraphQL functionality is not intended or planned for large data set retrieval. It is meant to improve efficiency in the retrieval of small but relevant data when needed.
Documentation for supported GraphQL interfaces can be found in BlueCat Address Manager on the Administration tab, in GraphQL API Lab section.
To access Gateway's GraphQL API Client from the BlueCat Python Library, use the following call:
import json from bluecat_libraries.address_manager._graphql import Client with Client("<bam_url>/graphql") as client: client.authenticate(<username>, <password>) data = client.execute("query { configurations { name } }") print(json.dumps(data, sort_keys=True, indent=4))
Here, query { configurations { name } } is an example of a GraphQL query. You can replace it with any GraphQL query that you want to experiment with.