Created
March 11, 2020 21:01
-
-
Save drew-russell/2d2fad76ca7c094bcdddd37b7970fe3d to your computer and use it in GitHub Desktop.
Example Python script that calls the Rubrik CDM GraphQL Service using the Rubrik Python SDK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rubrik_cdm | |
rubrik = rubrik_cdm.Connect(node_ip, username, password, enable_logging=True) | |
operation_name = "ClusterDetails" | |
query = """ | |
ClusterDetails($clusterID: String!) { | |
cluster(id: $clusterID) { | |
version | |
} | |
} | |
""" | |
variables = { | |
"clusterID": "me" | |
} | |
cluster_details = rubrik.query(query, operation_name, variables) | |
print(cluster_details) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment