> 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 Allocations

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

Retrieve all Allocations for the org.

Provider and Tenant roles are inferred from the org's membership. User must have authorization role with `PROVIDER_ADMIN` or `TENANT_ADMIN` suffix.

Results are returned from both Provider and Tenant perspectives when the org has both roles.

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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: NVIDIA Infra Controller REST API
  version: 1.0.0
paths:
  /v2/org/{org}/nico/allocation:
    get:
      operationId: get-all-allocation
      summary: Retrieve all Allocations
      description: >-
        Retrieve all Allocations for the org.


        Provider and Tenant roles are inferred from the org's membership. User
        must have authorization role with `PROVIDER_ADMIN` or `TENANT_ADMIN`
        suffix.


        Results are returned from both Provider and Tenant perspectives when the
        org has both roles.
      tags:
        - subpackage_allocation
      parameters:
        - name: org
          in: path
          description: Name of the Org
          required: true
          schema:
            type: string
        - name: infrastructureProviderId
          in: query
          description: Filter Allocations by Infrastructure Provider ID.
          required: false
          schema:
            type: string
            format: uuid
        - name: tenantId
          in: query
          description: Filter Allocations by Tenant ID.
          required: false
          schema:
            type: string
            format: uuid
        - name: siteId
          in: query
          description: >-
            Filter Allocations by Site ID.  Can be specified multiple times to
            filter on more than one Site ID.
          required: false
          schema:
            type: string
            format: uuid
        - name: id
          in: query
          description: >-
            Filter Allocations by ID.  Can be specified multiple times to filter
            on more than one ID.
          required: false
          schema:
            type: string
        - name: resourceType
          in: query
          description: >-
            Filter Allocations by Constraint Resource Type.  Can be specified
            multiple times to filter on more than one Constraint Resource Type.
          required: false
          schema:
            $ref: >-
              #/components/schemas/V2OrgOrgNicoAllocationGetParametersResourceType
        - name: status
          in: query
          description: >-
            Filter Allocations by Status.  Can be specified multiple times to
            filter on more than one Status.
          required: false
          schema:
            type: string
        - name: resourceTypeId
          in: query
          description: >-
            Filter Allocations by Constraint Resource Type ID.  Can be specified
            multiple times to filter on more than one Constraint Resource Type
            ID.
          required: false
          schema:
            type: string
        - name: constraintType
          in: query
          description: >-
            Filter Allocations by Constraint Type.  Can be specified multiple
            times to filter on more than one Constraint Type.
          required: false
          schema:
            $ref: >-
              #/components/schemas/V2OrgOrgNicoAllocationGetParametersConstraintType
        - name: constraintValue
          in: query
          description: >-
            Filter Allocations by Constraint Value.  Can be specified multiple
            times to filter on more than one Constraint Value.
          required: false
          schema:
            type: integer
        - name: query
          in: query
          description: >-
            Search for matches across all Sites. Input will be matched against
            name, description and status fields
          required: false
          schema:
            type: string
        - name: includeRelation
          in: query
          description: Related entity to expand
          required: false
          schema:
            $ref: >-
              #/components/schemas/V2OrgOrgNicoAllocationGetParametersIncludeRelation
        - 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/V2OrgOrgNicoAllocationGetParametersOrderBy'
        - 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/Allocation'
        '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:
    V2OrgOrgNicoAllocationGetParametersResourceType:
      type: string
      enum:
        - InstanceType
        - IPBlock
      title: V2OrgOrgNicoAllocationGetParametersResourceType
    V2OrgOrgNicoAllocationGetParametersConstraintType:
      type: string
      enum:
        - Reserved
        - OnDemand
        - Preemptible
      title: V2OrgOrgNicoAllocationGetParametersConstraintType
    V2OrgOrgNicoAllocationGetParametersIncludeRelation:
      type: string
      enum:
        - InfrastructureProvider
        - Tenant
        - Site
      title: V2OrgOrgNicoAllocationGetParametersIncludeRelation
    V2OrgOrgNicoAllocationGetParametersOrderBy:
      type: string
      enum:
        - NAME_ASC
        - NAME_DESC
        - STATUS_ASC
        - STATUS_DESC
        - CREATED_ASC
        - CREATED_DESC
        - UPDATED_ASC
        - UPDATED_DESC
        - SITE_NAME_ASC
        - SITE_NAME_DESC
        - TENANT_ORG_DISPLAY_NAME_ASC
        - TENANT_ORG_DISPLAY_NAME_DESC
        - INSTANCE_TYPE_NAME_ASC
        - INSTANCE_TYPE_NAME_DESC
        - IP_BLOCK_NAME_ASC
        - IP_BLOCK_NAME_DESC
        - CONSTRAINT_VALUE_ASC
        - CONSTRAINT_VALUE_DESC
      title: V2OrgOrgNicoAllocationGetParametersOrderBy
    AllocationStatus:
      type: string
      enum:
        - Pending
        - Registered
        - Deleting
        - Error
      description: Status values for Allocation objects
      title: AllocationStatus
    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
    AllocationConstraintResourceType:
      type: string
      enum:
        - InstanceType
        - IPBlock
      description: Type of the Resource that the Allocation Constraint applies to
      title: AllocationConstraintResourceType
    AllocationConstraintConstraintType:
      type: string
      enum:
        - Reserved
        - OnDemand
        - Preemptible
      description: >-
        Type of the Allocation Constraint. `Reserved` is the only constraint
        type supported by current implementation.
      title: AllocationConstraintConstraintType
    InstanceTypeStatus:
      type: string
      enum:
        - Pending
        - Registering
        - Ready
        - Deleting
        - Error
      description: Status values for Instance Type objects
      title: InstanceTypeStatus
    InstanceTypeSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        infrastructureProviderId:
          type: string
          format: uuid
        siteId:
          type: string
          format: uuid
        status:
          $ref: '#/components/schemas/InstanceTypeStatus'
      description: Describes a subset of core attributes of an Instance Type
      title: InstanceTypeSummary
    IpBlockSummaryRoutingType:
      type: string
      enum:
        - Public
        - DatacenterOnly
      title: IpBlockSummaryRoutingType
    IpBlockStatus:
      type: string
      enum:
        - Pending
        - Provisioning
        - Ready
        - Deleting
        - Error
      description: Status values for IP Block objects
      title: IpBlockStatus
    IpBlockSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        routingType:
          $ref: '#/components/schemas/IpBlockSummaryRoutingType'
        prefix:
          type: string
          description: Either IPv4 or IPv6 address
        prefixLength:
          type: integer
          description: 'Min: 1, Max: 32 for ipv4, 128 for ipv6'
        status:
          $ref: '#/components/schemas/IpBlockStatus'
      description: Describes a subset of core attributes of an IP block
      title: IpBlockSummary
    AllocationConstraint:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID of the Allocation Constraint
        allocationId:
          type: string
          format: uuid
          description: ID of the Allocation that contains the Allocation Constraint
        resourceType:
          $ref: '#/components/schemas/AllocationConstraintResourceType'
          description: Type of the Resource that the Allocation Constraint applies to
        resourceTypeId:
          type: string
          format: uuid
          description: >-
            ID of the Resource Type that acts as the source of the Allocation.
            For resource type: `InstanceType`, this is the ID of the Instance
            Type whose associated Machines are allocated to the Tenant. For
            resource type `IPBlock`, this is the ID of the Site level IP Block
            from where a prefix is allocated to the Tenant.
        constraintType:
          $ref: '#/components/schemas/AllocationConstraintConstraintType'
          description: >-
            Type of the Allocation Constraint. `Reserved` is the only constraint
            type supported by current implementation.
        constraintValue:
          type: integer
          description: >-
            Value of the Allocation Constraint. For resource type:
            `InstanceType`, this value represents number of Machines associated
            with the Instance Type that is allocated to the Tenant. For resource
            type `IPBlock`, this value represents the prefix length of the IP
            Block allocated to the Tenant.
        derivedResourceId:
          type:
            - string
            - 'null'
          description: ID of the allocated Tenant IP Block when resource type is IPBlock
        instanceType:
          $ref: '#/components/schemas/InstanceTypeSummary'
        ipBlock:
          $ref: '#/components/schemas/IpBlockSummary'
        created:
          type: string
          format: date-time
          description: Date/time when the Allocation Constraint was created
        updated:
          type: string
          format: date-time
          description: Date/time when the Allocation Constraint was last updated
      description: >-
        Constraints on an Allocation that specify limits for different resource
        types
      title: AllocationConstraint
    Allocation:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID of the Allocation
        name:
          type: string
          description: Concise and descriptive name of the Allocation
        description:
          type:
            - string
            - 'null'
          description: Detailed description of the Allocation
        infrastructureProviderId:
          type: string
          format: uuid
          description: ID of the Infrastructure Provider that created the Allocation
        tenantId:
          type: string
          format: uuid
          description: ID of the Tenant that received the Allocation
        siteId:
          type: string
          format: uuid
          description: ID of the Site where resources are allocated
        status:
          $ref: '#/components/schemas/AllocationStatus'
        statusHistory:
          type: array
          items:
            $ref: '#/components/schemas/StatusDetail'
        allocationConstraints:
          type: array
          items:
            $ref: '#/components/schemas/AllocationConstraint'
        created:
          type: string
          format: date-time
          description: Date/time when the Allocation was created
        updated:
          type: string
          format: date-time
          description: Date/time when the Allocation was last updated
      description: >-
        Specifies a group of resources on a Site that has been allocated to a
        Tenant
      title: Allocation
    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": "Echo Studios",
    "description": "Echo Studios resource allocation in SJC4",
    "infrastructureProviderId": "e94bcfda-f6cb-42e4-80ec-516811e5abbf",
    "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
    "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
    "status": "Pending",
    "statusHistory": [
      {
        "status": "Pending",
        "message": "Request received, pending processing",
        "created": "2019-08-24T14:15:22Z",
        "updated": "2019-08-24T14:15:22Z"
      }
    ],
    "allocationConstraints": [
      {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "allocationId": "9ec871ce-3363-4de2-8f79-062881067628",
        "resourceType": "InstanceType",
        "resourceTypeId": "a59ee688-b5e5-4606-9891-f4a605edacd3",
        "constraintType": "Reserved",
        "constraintValue": 10,
        "derivedResourceId": null,
        "instanceType": {
          "name": "x3.large",
          "infrastructureProviderId": "63c29416-8833-4eaf-9e1c-7c0173cc3150",
          "siteId": "c9f4f276-6f7a-4209-953c-2b9870ce7cc1",
          "status": "Ready"
        },
        "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/allocation"

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/allocation';
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/allocation"

	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/allocation")

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/allocation")
  .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/allocation', [
  '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/allocation");
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/allocation")! 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()
```