> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/infra-controller/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/infra-controller/_mcp/server.

# Retrieve all SSH Key Groups

GET https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/sshkeygroup

Retrieve all SSH Key Groups for the current Tenant.

Org must have a Tenant entity. User must have authorization role with `TENANT_ADMIN` suffix.

Reference: https://docs.nvidia.com/infra-controller/infra-controller/rest-api-reference/api-reference/ssh-key-group/get-all-ssh-key-group

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: NVIDIA Infra Controller REST API
  version: 1.0.0
paths:
  /v2/org/{org}/nico/sshkeygroup:
    get:
      operationId: get-all-ssh-key-group
      summary: Retrieve all SSH Key Groups
      description: >-
        Retrieve all SSH Key Groups for the current Tenant.


        Org must have a Tenant entity. User must have authorization role with
        `TENANT_ADMIN` suffix.
      tags:
        - subpackage_sshKeyGroup
      parameters:
        - name: org
          in: path
          description: Name of the Org
          required: true
          schema:
            type: string
        - name: siteId
          in: query
          description: Filter SSH Key Groups by Site ID
          required: false
          schema:
            type: string
        - name: instanceId
          in: query
          description: Filter SSH Key Groups by Instance ID
          required: false
          schema:
            type: string
        - name: status
          in: query
          description: Status filter for the SSH Key Groups
          required: false
          schema:
            $ref: '#/components/schemas/V2OrgOrgNicoSshkeygroupGetParametersStatus'
        - name: query
          in: query
          description: >-
            Search for matches across all Sites. Input will be matched against
            name field
          required: false
          schema:
            type: string
        - name: includeRelation
          in: query
          description: Related entity to expand
          required: false
          schema:
            $ref: >-
              #/components/schemas/V2OrgOrgNicoSshkeygroupGetParametersIncludeRelation
        - name: pageNumber
          in: query
          description: Page number for pagination query
          required: false
          schema:
            type: integer
            default: 1
        - name: pageSize
          in: query
          description: Page size for pagination query
          required: false
          schema:
            type: integer
        - name: orderBy
          in: query
          description: Ordering for pagination query
          required: false
          schema:
            $ref: '#/components/schemas/V2OrgOrgNicoSshkeygroupGetParametersOrderBy'
        - name: Authorization
          in: header
          description: >-
            ```

            export JWT_BEARER_TOKEN="<jwt-bearer-token>"


            # Example org name: "acme-inc

            export ORG_NAME=<org-name>


            # Use the JWT bearer token in your API request auth header:

            curl -v -X GET -H "Content-Type: application/json" -H
            "Authorization: Bearer $JWT_BEARER_TOKEN"
            https://nico-rest-api.nico.svc.cluster.local/v2/org/$ORG_NAME/nico/user/current

            ```
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SshKeyGroup'
        '403':
          description: >-
            Error response when user is not authorized to call an endpoint or
            retrieve/modify objects
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NICoAPIError'
servers:
  - url: https://nico-rest-api.nico.svc.cluster.local
    description: Kubernetes Cluster
components:
  schemas:
    V2OrgOrgNicoSshkeygroupGetParametersStatus:
      type: string
      enum:
        - Syncing
        - Synced
        - Error
        - Deleting
      title: V2OrgOrgNicoSshkeygroupGetParametersStatus
    V2OrgOrgNicoSshkeygroupGetParametersIncludeRelation:
      type: string
      enum:
        - Tenant
      title: V2OrgOrgNicoSshkeygroupGetParametersIncludeRelation
    V2OrgOrgNicoSshkeygroupGetParametersOrderBy:
      type: string
      enum:
        - NAME_ASC
        - NAME_DESC
        - STATUS_ASC
        - STATUS_DESC
        - CREATED_ASC
        - CREATED_DESC
        - UPDATED_ASC
        - UPDATED_DESC
      title: V2OrgOrgNicoSshkeygroupGetParametersOrderBy
    SshKey:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the key
        name:
          type: string
        org:
          type: string
        tenantId:
          type: string
          format: uuid
        fingerprint:
          type: string
          description: SHA256 fingerprint of the public key
        created:
          type: string
          format: date-time
          description: Date/time when the SSH key was created
        updated:
          type: string
          format: date-time
          description: Date/time when the SSH key was last updated
      description: Details of SSH public key
      title: SshKey
    SiteCapabilities:
      type: object
      properties:
        nativeNetworking:
          type: boolean
        networkSecurityGroup:
          type: boolean
        nvLinkPartition:
          type: boolean
        flow:
          type: boolean
        imageBasedOperatingSystem:
          type: boolean
      description: Boolean flags to indicate features supported by a Site
      title: SiteCapabilities
    SiteStatus:
      type: string
      enum:
        - Pending
        - Registered
        - Error
      description: Status values for Site objects
      title: SiteStatus
    SiteSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          description: Name of the Site
        infrastructureProviderId:
          type: string
          format: uuid
        isSerialConsoleEnabled:
          type: boolean
          description: Indicates if Serial Console is enabled for the Site by the Provider
        isOnline:
          type: boolean
          description: Indicates if the Site is currently reachable from Cloud
        capabilities:
          $ref: '#/components/schemas/SiteCapabilities'
        status:
          $ref: '#/components/schemas/SiteStatus'
      description: >-
        SiteSummary contains a subset of data for Site object, used when nesting
        in other objects
      title: SiteSummary
    SshKeyGroupSiteAssociationStatus:
      type: string
      enum:
        - Syncing
        - Synced
        - Pending
        - Error
        - Deleting
      description: Status values for SSH Key Group Site Association objects
      title: SshKeyGroupSiteAssociationStatus
    SshKeyGroupSiteAssociation:
      type: object
      properties:
        site:
          $ref: '#/components/schemas/SiteSummary'
        status:
          $ref: '#/components/schemas/SshKeyGroupSiteAssociationStatus'
        version:
          type:
            - string
            - 'null'
          description: Version of the Key Group on Site
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
      description: Describes the relationship between an SSH Key Group and a Site
      title: SshKeyGroupSiteAssociation
    SshKeyGroupStatus:
      type: string
      enum:
        - Syncing
        - Synced
        - Error
        - Deleting
      description: Status values for SSH Key Group objects
      title: SshKeyGroupStatus
    StatusDetail:
      type: object
      properties:
        status:
          type: string
        message:
          type:
            - string
            - 'null'
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
      description: Describes the details of a status transition for a resource
      title: StatusDetail
    SshKeyGroup:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the SSH Key Group
        name:
          type: string
          description: Name of the SSH Key Group
        description:
          type:
            - string
            - 'null'
          description: Description for the SSH Key Group, optional
        org:
          type: string
          description: Organization this SSH Key Group belongs to
        tenantId:
          type: string
          format: uuid
          description: ID of the Tenane the SSH Key Group belongs to
        version:
          type:
            - string
            - 'null'
          description: Version of the SSH Key Group
        sshKeys:
          type: array
          items:
            $ref: '#/components/schemas/SshKey'
          description: SSH Keys associated with this SSH Key Group
        siteAssociations:
          type: array
          items:
            $ref: '#/components/schemas/SshKeyGroupSiteAssociation'
          description: Sites the SSH Key Group is synced to
        status:
          $ref: '#/components/schemas/SshKeyGroupStatus'
          description: Status of the SSH Key Group
        statusHistory:
          type: array
          items:
            $ref: '#/components/schemas/StatusDetail'
          description: History of the SSH Key Group states
        created:
          type: string
          format: date-time
          description: Date/time when the SSH key was created
        updated:
          type: string
          format: date-time
          description: Date/time when the SSH key was last updated
      description: Describes the model that groups SSH Keys
      title: SshKeyGroup
    NiCoApiErrorSource:
      type: string
      enum:
        - nico
      description: Source of the error.
      title: NiCoApiErrorSource
    NiCoApiErrorData:
      type: object
      properties: {}
      description: Additional data about the error
      title: NiCoApiErrorData
    NICoAPIError:
      type: object
      properties:
        source:
          $ref: '#/components/schemas/NiCoApiErrorSource'
          description: Source of the error.
        message:
          type: string
          description: Message describing the error
        data:
          oneOf:
            - $ref: '#/components/schemas/NiCoApiErrorData'
            - type: 'null'
          description: Additional data about the error
      description: Describes the error response from NVIDIA Infra Controller REST API
      title: NICoAPIError
  securitySchemes:
    JWTBearerToken:
      type: http
      scheme: bearer
      description: >-
        ```

        export JWT_BEARER_TOKEN="<jwt-bearer-token>"


        # Example org name: "acme-inc

        export ORG_NAME=<org-name>


        # Use the JWT bearer token in your API request auth header:

        curl -v -X GET -H "Content-Type: application/json" -H "Authorization:
        Bearer $JWT_BEARER_TOKEN"
        https://nico-rest-api.nico.svc.cluster.local/v2/org/$ORG_NAME/nico/user/current

        ```

```

## Examples



**Response**

```json
[
  {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "reno-integration-sre",
    "description": "SRE access SSH keys for Reno Integration",
    "org": "wdksahew1rqf",
    "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
    "version": "fbc692b61ffef6fbfc38a3833f6b7e7ae508da75",
    "sshKeys": [
      {
        "id": "ff06da79-707a-4069-8623-211d49ae96c8",
        "name": "sre-ssh-reno",
        "org": "wdksahew1rqf",
        "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
        "fingerprint": "CaK2yoj5fDOhf1swM2kFyjQrd3bwZfDYlWnVjBHgveQ",
        "created": "2019-08-24T14:15:22Z",
        "updated": "2019-08-24T14:15:22Z"
      }
    ],
    "siteAssociations": [
      {
        "site": {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "sjc-central-1",
          "infrastructureProviderId": "5f2cc306-76e9-4fca-9186-950c9ef9a74e",
          "isSerialConsoleEnabled": true,
          "isOnline": true,
          "capabilities": {
            "nativeNetworking": false,
            "networkSecurityGroup": true,
            "nvLinkPartition": false,
            "flow": false,
            "imageBasedOperatingSystem": false
          },
          "status": "Registered"
        },
        "status": "Syncing",
        "version": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
        "created": "2019-08-24T14:15:22Z",
        "updated": "2019-08-24T14:15:22Z"
      }
    ],
    "status": "Syncing",
    "statusHistory": [
      {
        "status": "Syncing",
        "message": "Group is being synced to Sites",
        "created": "2019-08-24T14:15:22Z",
        "updated": "2019-08-24T14:15:22Z"
      }
    ],
    "created": "2019-08-24T14:15:22Z",
    "updated": "2019-08-24T14:15:22Z"
  }
]
```

**SDK Code**

```python Example 1
import requests

url = "https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/sshkeygroup"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Example 1
const url = 'https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/sshkeygroup';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Example 1
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/sshkeygroup"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Example 1
require 'uri'
require 'net/http'

url = URI("https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/sshkeygroup")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Example 1
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/sshkeygroup")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Example 1
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/sshkeygroup', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Example 1
using RestSharp;

var client = new RestClient("https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/sshkeygroup");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Example 1
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/sshkeygroup")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```