Invoke-RubrikGraphQLCall
SYNOPSIS
Provides generic interface to make Rubrik GraphQL API calls
SYNTAX
Default
Invoke-RubrikGraphQLCall -Body <String> [-Server <String>] [-api <String>] [<CommonParameters>]Node
Invoke-RubrikGraphQLCall -Body <String> [-ReturnNode] [-Server <String>] [-api <String>] [<CommonParameters>]JSON
Invoke-RubrikGraphQLCall -Body <String> [-ReturnJSON] [-Server <String>] [-api <String>] [<CommonParameters>]DESCRIPTION
The Invoke-RubrikGraphQLCall allows users to make raw API endpoint calls to the Rubrik GraphQL interface. To find out more about the GraphQL endpoint take a look at the Rubrik GraphQL Playground project that is hosted on GitHub: https://github.com/rubrikinc/graphql-playground
EXAMPLES
EXAMPLE 1
Will retrieve the total count of VMware vCenter Servers connected to the Rubrik cluster as a PowerShell object
EXAMPLE 2
Returns the number of protected and unprotected VMware VM objects as a JSON string
EXAMPLE 3
Returns the 'jbrasser-win' VM on the local Rubrik cluster as a JSON string, while displaying Verbose information
EXAMPLE 4
Returns the 'jbrasser-lin' VM on the local Rubrik cluster as the VM Object, using a variable as input for vmwareVirtualMachineConnection
EXAMPLE 5
Returns all VMware VMs on the Rubrik Cluster and displays the individual objects by using the -ReturnNode parameter
EXAMPLE 6
Returns informations on Rubrik Organizations, filtered by name in ascending order and only including organizations with 'org' in their name property. Returns the individual organization objects using the -ReturnNode parameter
EXAMPLE 7
Queries all hosts with volumegroups for the SLA set on that specific volumegroup. Returns 3 properties: hostname, volumegroup, volumegroupsla
EXAMPLE 8
Gives a count of Protected, Unprotected, NoSla & DoNotProtect for cloudNativeVms, hypervVms, linuxHosts, managedVolumes, mssqlDbs, nasShares, nutanixVms, oracleDbs, vcdVapps, vms, windowHosts
PARAMETERS
-Body
GraphQL Body to send to GraphQL endpoint
-ReturnJSON
Return the JSON object instead of converting it to PowerShell custom objects
-ReturnNode
Return the objects in the Node(s) property rather than returning the output as a single custom Object
-Server
Rubrik server IP or FQDN
-api
API version
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
NOTES
Written by Jaap Brasser for community usage Twitter: @jaap_brasser GitHub: jaapbrasser
RELATED LINKS
Last updated
Was this helpful?