You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently Rubrik SDK for PowerShell covers REST API implementation for workflow automation which is great! In newer CDM releases GraphQL is being introduced for some of the endpoints and would be nice to have those available with Rubrik SDK for PowerShell.
Describe the solution you'd like Get-RubrikOrganization.ps1 will fetch data for all organizations with REST, would be really useful to have the equivalent of this request with GraphQL, the example below is a query with GraphQL to retrieve all organizations.
As a next item, GranphQL provides the filtering option that will enhance further the performance of requests to endpoints by returning only desired data, the example below return the first 3 organizations containing string org in the name. The first filter can be open to return all matching names.
Is your feature request related to a problem? Please describe.
Currently Rubrik SDK for PowerShell covers REST API implementation for workflow automation which is great! In newer CDM releases GraphQL is being introduced for some of the endpoints and would be nice to have those available with Rubrik SDK for PowerShell.
Describe the solution you'd like
Get-RubrikOrganization.ps1 will fetch data for all organizations with REST, would be really useful to have the equivalent of this request with GraphQL, the example below is a query with GraphQL to retrieve all organizations.
curl 'https://<node-ip>/api/internal/graphql' -H 'authorization: Bearer <rubrik-token>' -H 'content-type: application/json;charset=UTF-8' -H 'accept: application/json, text/plain, */*' -H 'referer: https://b-0766-lb.rubrik-lab.com/web/bin/index.html' --data-binary '{"query":"query OrganizationSummary(\n $name: String,\n $isGlobal: Boolean,\n $sortBy: String,\n $sortOrder: String,\n $first: Int,\n $after: String,\n) {\n organizationConnection(\n name: $name,\n isGlobal: $isGlobal,\n sortBy: $sortBy,\n sortOrder: $sortOrder,\n first: $first,\n after: $after\n ) {\n nodes {\n id\n name\n isGlobal\n exclusivenessLevel\n admins {\n id\n name\n }\n envoyStatus\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n","variables":{"sortBy":"name","sortOrder":"asc","isGlobal":false }} ' --insecure
As a next item, GranphQL provides the filtering option that will enhance further the performance of requests to endpoints by returning only desired data, the example below return the first 3 organizations containing string org in the name. The first filter can be open to return all matching names.
curl 'https://<IP>/api/internal/graphql' -H 'authorization: Bearer <rubrik-token>' -H 'content-type: application/json;charset=UTF-8' -H 'accept: application/json, text/plain, */*' -H 'referer: https://b-0766-lb.rubrik-lab.com/web/bin/index.html' --data-binary '{"query":"query OrganizationSummary(\n $name: String,\n $isGlobal: Boolean,\n $sortBy: String,\n $sortOrder: String,\n $first: Int,\n $after: String,\n) {\n organizationConnection(\n name: $name,\n isGlobal: $isGlobal,\n sortBy: $sortBy,\n sortOrder: $sortOrder,\n first: $first,\n after: $after\n ) {\n nodes {\n id\n name\n isGlobal\n exclusivenessLevel\n admins {\n id\n name\n }\n envoyStatus\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n","variables":{"sortBy":"name","sortOrder":"asc","first":3,"name":"org","isGlobal":false}}' --insecure
Describe alternatives you've considered
The available alternative at this moment is to use GraphQL with bash.
The text was updated successfully, but these errors were encountered: