> 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 Machines/Instance Type associations

GET https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/instance/type/{instanceTypeId}/machine

Get all Machines for a given Instance Type

Org must have an Infrastructure Provider entity that owns the Instance Type and the Machine. User must have authorization role with `PROVIDER_ADMIN` suffix.

Reference: https://docs.nvidia.com/infra-controller/infra-controller/rest-api-reference/api-reference/instance-type/get-instance-type-machine-association

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: NVIDIA Infra Controller REST API
  version: 1.0.0
paths:
  /v2/org/{org}/nico/instance/type/{instanceTypeId}/machine:
    get:
      operationId: get-instance-type-machine-association
      summary: Retrieve all Machines/Instance Type associations
      description: >-
        Get all Machines for a given Instance Type


        Org must have an Infrastructure Provider entity that owns the Instance
        Type and the Machine. User must have authorization role with
        `PROVIDER_ADMIN` suffix.
      tags:
        - subpackage_instanceType
      parameters:
        - name: org
          in: path
          description: Name of the Org
          required: true
          schema:
            type: string
        - name: instanceTypeId
          in: path
          description: ID of the Instance Type
          required: true
          schema:
            type: string
            format: uuid
        - 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/V2OrgOrgNicoInstanceTypeInstanceTypeIdMachineGetParametersOrderBy
        - 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: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MachineInstanceType'
        '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:
    V2OrgOrgNicoInstanceTypeInstanceTypeIdMachineGetParametersOrderBy:
      type: string
      enum:
        - CREATED_ASC
        - CREATED_DESC
        - UPDATED_ASC
        - UPDATED_DESC
      title: V2OrgOrgNicoInstanceTypeInstanceTypeIdMachineGetParametersOrderBy
    Deprecation:
      type: object
      properties:
        attribute:
          type:
            - string
            - 'null'
          description: >-
            Name of the attribute that is deprecated. Omitted if queryParam or
            endpoint is being deprecated.
        queryParam:
          type:
            - string
            - 'null'
          description: >-
            Query parameter that is deprecated. Omitted if attribute or endpoint
            is being deprecated.
        endpoint:
          type:
            - string
            - 'null'
          description: >-
            API endpoint that is deprecated. Omitted if attribute or queryParam
            is being deprecated.
        replacedBy:
          type:
            - string
            - 'null'
          description: >-
            Name of the attribute, query parameter, or endpoint that replaces
            the deprecated item. Omitted if no replacement is available.
        takeActionBy:
          type: string
          format: date-time
          description: >-
            ISO datetime string for when the deprecated field will no longer be
            accepted or available in the API
        notice:
          type: string
          description: Message describing the deprecation
      description: >-
        Details of a particular deprecation in NVIDIA Infra Controller (NICo)
        API
      title: Deprecation
    MachineInstanceType:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: >-
            Deprecated: Use `machineId` when identifying a Machine/Instance Type
            association. This field will be removed on July 9th, 2026 0:00 UTC.
        machineId:
          type: string
        instanceTypeId:
          type: string
          format: uuid
        deprecations:
          type: array
          items:
            $ref: '#/components/schemas/Deprecation'
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
      description: Associates a machine with an Instance Type
      title: MachineInstanceType
    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
[
  {
    "machineId": "fm100ht4v4mce2qstjnl8970nnj3ie6ecek4mtjn27pea4kre5gsa49jg0g",
    "instanceTypeId": "41e36058-8403-4086-a9b8-39cb5bc9cb98",
    "created": "2019-08-24T14:15:22Z",
    "updated": "2019-08-24T14:15:22Z",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  },
  {
    "machineId": "fm100htrh18t1lrjg2pqagkh3sfigr9m65dejvkq168ako07sc0uibpp5q0",
    "instanceTypeId": "41e36058-8403-4086-a9b8-39cb5bc9cb98",
    "created": "2019-08-24T14:15:22Z",
    "updated": "2019-08-24T14:15:22Z",
    "id": "f690ffcd-06b7-430c-9c2a-b9afd18d77c3"
  }
]
```

**SDK Code**

```python example-1
import requests

url = "https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/instance/type/instanceTypeId/machine"

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/instance/type/instanceTypeId/machine';
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/instance/type/instanceTypeId/machine"

	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/instance/type/instanceTypeId/machine")

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/instance/type/instanceTypeId/machine")
  .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/instance/type/instanceTypeId/machine', [
  '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/instance/type/instanceTypeId/machine");
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/instance/type/instanceTypeId/machine")! 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()
```