> This page is for Applications Protection.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.humansecurity.com/llms.txt.

# Get allow lists

GET https://api-gw.perimeterx.com/v1/allow-lists

Get a list of allowed actions for the given Application IDs and host domains.


Reference: https://docs.humansecurity.com/applications/reference/get-allow-lists

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `appId=hostDomain` (string, required) — A pair of `appId` and `hostDomain` keys.
- `from` (integer, optional) — A timestamp, in milliseconds, indicating from what point in time to filter the results by. Defaults to the past 24 hours.
- `skip` (integer, optional, default: 0) — The number of incidents to offset pagination by when returning the results.
- `take` (integer, optional, default: 20) — The number of incidents to display per page when returning the results.

## Response

### 200

Success

- `paging` (GetAllowListsPaging, optional)
- `data` (list of GetAllowListsDataItems, optional)

## Errors

### 401 Unauthorized Error

Access token is missing or invalid.

- `any`

### 422 Unprocessable Entity Error

Invalid or missing parameters.

- `any`

### 500 Internal Server Error

Internal error. Contact HUMAN if the error persists.

- `any`

## Types

### GetAllowListsPaging

- `previous` (string, optional)
- `current` (string, optional)
- `next` (string, optional)

### GetAllowListsDataItems

- `app_id` (string, optional)
- `host_domain` (string, optional)
- `count` (integer, optional)
- `data` (list of GetAllowListsDataItemsDataItems, optional)

### GetAllowListsDataItemsDataItems

- `added_date` (string, optional)
- `script` (string, optional)
- `type` (string, optional)
- `subtype` (string, optional)
- `vendor` (string, optional)
- `last_seen` (string, optional)
- `action_args` (GetAllowListsDataItemsDataItemsActionArgs, optional)

### GetAllowListsDataItemsDataItemsActionArgs

- `Element ID` (string, optional)
- `Element Name` (string, optional)
- `Element Tag` (string, optional)
- `Inserted Element Tag` (string, optional)
- `Removed Element Tag` (string, optional)
- `Storage Key` (string, optional)
- `Script Source` (string, optional)
- `Target URL Host` (string, optional)

## Examples

**Response**

```json
{
  "paging": {
    "previous": "",
    "current": "https://api-gw.perimeterx.com/v1/allow-lists?ABC123=domain.com&take=20&skip=0",
    "next": "https://api-gw.perimeterx.com/v1/allow-lists?ABC123=domain.com&take=20&skip=20"
  },
  "data": [
    {
      "app_id": "PXabc123",
      "host_domain": "domain.com",
      "count": 1000,
      "data": [
        {
          "added_date": "2022-08-07T10:30:20.162+03:00",
          "script": "connect.facebook.net/signals/config/123456789",
          "type": "storage",
          "subtype": "cookie",
          "vendor": "Google",
          "last_seen": "2021-07-30T16:38:24+03:00",
          "action_args": {
            "Element ID": "vemail",
            "Element Name": "vemail",
            "Element Tag": "script",
            "Inserted Element Tag": "script",
            "Removed Element Tag": "",
            "Storage Key": "cookie",
            "Script Source": "bucket.s3.us-east-2.amazonaws.com",
            "Target URL Host": "juggler"
          }
        }
      ]
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api-gw.perimeterx.com/v1/allow-lists"

querystring = {"appId=hostDomain":"hostDomain","from":"1674313200000","skip":"40","take":"10"}

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

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

print(response.json())
```

```javascript
const url = 'https://api-gw.perimeterx.com/v1/allow-lists?appId%3DhostDomain=hostDomain&from=1674313200000&skip=40&take=10';
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
package main

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

func main() {

	url := "https://api-gw.perimeterx.com/v1/allow-lists?appId%3DhostDomain=hostDomain&from=1674313200000&skip=40&take=10"

	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
require 'uri'
require 'net/http'

url = URI("https://api-gw.perimeterx.com/v1/allow-lists?appId%3DhostDomain=hostDomain&from=1674313200000&skip=40&take=10")

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
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-gw.perimeterx.com/v1/allow-lists?appId%3DhostDomain=hostDomain&from=1674313200000&skip=40&take=10")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-gw.perimeterx.com/v1/allow-lists?appId%3DhostDomain=hostDomain&from=1674313200000&skip=40&take=10', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api-gw.perimeterx.com/v1/allow-lists?appId%3DhostDomain=hostDomain&from=1674313200000&skip=40&take=10");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-gw.perimeterx.com/v1/allow-lists?appId%3DhostDomain=hostDomain&from=1674313200000&skip=40&take=10")! 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()
```