# List Resource Restrictions

List resource restrictions the caller is permitted to manage.

## cURL

```bash
curl --request GET \
  --url 'https://api.arize.com/v2/resource-restrictions?limit=50' \
  --header 'Authorization: Bearer <token>'
```

## Python

```python
import requests

url = "https://api.arize.com/v2/resource-restrictions?limit=50"

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

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

print(response.text)
```

## JavaScript (Fetch)

```javascript
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.arize.com/v2/resource-restrictions?limit=50', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

## PHP

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, [\
  CURLOPT_URL => "https://api.arize.com/v2/resource-restrictions?limit=50",\
  CURLOPT_RETURNTRANSFER => true,\
  CURLOPT_ENCODING => "",\
  CURLOPT_MAXREDIRS => 10,\
  CURLOPT_TIMEOUT => 30,\
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\
  CURLOPT_CUSTOMREQUEST => "GET",\
  CURLOPT_HTTPHEADER => [\
    "Authorization: Bearer <token>"\
  ],\
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
```

## Go

```go
package main

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

func main() {

url := "https://api.arize.com/v2/resource-restrictions?limit=50"

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(string(body))
}
```

## Unirest (Java)

```java
HttpResponse<String> response = Unirest.get("https://api.arize.com/v2/resource-restrictions?limit=50")
  .header("Authorization", "Bearer <token>")
  .asString();
```

## Ruby

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

url = URI("https://api.arize.com/v2/resource-restrictions?limit=50")

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

## Possible Responses

- **200**: Success
- **400**: Invalid request parameters
- **401**: Authentication required
- **429**: Rate limit exceeded

### Example JSON Responses

#### Successful Response
```json
{
  "resource_restrictions": [
    {
      "resource_type": "PROJECT",
      "resource_id": "TW9kZWw6MTIxOmFCY0Q=",
      "created_at": "2026-01-01T12:00:00Z"
    },
    {
      "resource_type": "PROJECT",
      "resource_id": "TW9kZWw6OTg3OnhZelc=",
      "created_at": "2026-03-15T09:30:00Z"
    }
  ],
  "pagination": {
    "next_cursor": "cursor_12345",
    "has_more": true
  }
}
```

#### Error Response (400)
```json
{
  "status": 400,
  "title": "Invalid request parameters",
  "detail": "The 'name' field is required and must be a non-empty string.",
  "instance": "/resource",
  "type": "https://arize.com/docs/ax/rest-reference/errors#invalid-request"
}
```

#### Error Response (401)
```json
{
  "status": 401,
  "title": "Authentication required",
  "detail": "You must be authenticated to access this resource.",
  "instance": "/resource",
  "type": "https://arize.com/docs/ax/rest-reference/errors#authentication-required"
}
```

#### Error Response (429)
```json
{
  "status": 429,
  "title": "Rate limit exceeded",
  "detail": "You have exceeded the allowed number of requests. Please try again later.",
  "instance": "/resource",
  "type": "https://arize.com/docs/ax/rest-reference/errors#rate-limit-exceeded"
}
```

## Authorizations

- **Authorization**: string (header) - Most Arize AI endpoints require authentication. Include your API key in the request header using the format `authorization: Bearer <token>`.

## Query Parameters

- **resource_type**: enum<string> - Filter restrictions to a single resource type.
  - `PROJECT` — Return only restricted projects.

- **limit**: integer (default:50) - Maximum items to return, with a required range of `1 <= x <= 100`.

- **cursor**: string - Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token.
