> 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 deny lists

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

Returns a list of blocked actions for the given Application IDs and domains.


Reference: https://docs.humansecurity.com/applications/reference/get-deny-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.
- `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.
- `hitCountInterval` (enum, optional) — Counts the number of times the action was blocked in the last full time interval. Queries without `hitCountInterval` wont retrieve `hit_count` in the response. Adds the `data` payload to the [`hit_count`](/applications/reference/get-deny-lists#response.body.data.data.hit_count).
  - Allowed values: `HOUR`, `DAY`, `WEEK`, `MONTH`, `YEAR`, `ALL`

## Response

### 200

Success

- `paging` (GetDenyListsPaging, optional)
- `data` (list of GetDenyListsDataItems, 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

### GetDenyListsPaging

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

### GetDenyListsDataItems

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

### GetDenyListsDataItemsDataItems

- `script` (string, optional)
- `type` (enum, optional)
  - Allowed values: `execution`, `network`, `storage`, `dom`, `header`
- `subtype` (enum, optional)
  - Allowed values: `clipboard`, `exec_command`, `define_property`, `window_open`, `navigation`, `xhr`, `fontface`, `worker`, `websocket`, `fetch`, `beacon`, `eventsource`, `cookie`, `set_item`, `get_item`, `resource`, `resource_host`, `mutation`, `value_access`, `event_listen`, `link_change`, `response`
- `action_args` (GetDenyListsDataItemsDataItemsActionArgs, optional)
- `last_seen` (string, optional)
- `block_updated_at` (string, optional)
- `entity_key` (string, optional)
- `updated_by` (string, optional) — Only appears in the response if it has a value.
- `hit_count` (integer, optional)
- `comment` (string, optional)

### GetDenyListsDataItemsDataItemsActionArgs

- `Clipboard Command@f` (string, optional)
- `Exec Command Name` (string, optional)
- `Object Name` (string, optional)
- `Object Property` (string, optional)
- `Target URL` (string, optional)
- `Target URL Host` (string, optional)
- `Storage Key` (string, optional)
- `Element Tagname` (string, optional)
- `Inserted Element Tagname` (string, optional)
- `Removed Element Tagname` (string, optional)
- `Element ID` (string, optional)
- `Element Name` (string, optional)
- `Event Type` (string, optional)
- `Header Name` (string, optional)
- `Header Value` (string, optional)

## Examples

**Response**

```json
{
  "paging": {
    "previous": "",
    "current": "https://api-gw.perimeterx.com/v1/deny-lists?ABC123=domain.com&take=20&skip=0",
    "next": "https://api-gw.perimeterx.com/v1/deny-lists?ABC123=domain.com&take=20&skip=20"
  },
  "data": [
    {
      "app_id": "PXabc123",
      "host_domain": "domain.com",
      "count": 16,
      "data": [
        {
          "script": "cdn.cdn.com/qscripts.js",
          "type": "dom",
          "subtype": "value_access",
          "action_args": {
            "Element ID": "vemail",
            "Element Name": "vemail"
          },
          "last_seen": "2022-01-25T17:31:11+02:00",
          "block_updated_at": "2022-06-13T08:59:44.448Z",
          "entity_key": "111aabbc2cdd33e45e5ff66778g8g9h9",
          "updated_by": "HUMAN",
          "hit_count": 1224,
          "comment": "string"
        }
      ]
    }
  ]
}
```

**SDK Code**

```python
import requests

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

querystring = {"appId=hostDomain":"hostDomain","hitCountInterval":"HOUR","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/deny-lists?appId%3DhostDomain=hostDomain&hitCountInterval=HOUR&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/deny-lists?appId%3DhostDomain=hostDomain&hitCountInterval=HOUR&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/deny-lists?appId%3DhostDomain=hostDomain&hitCountInterval=HOUR&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/deny-lists?appId%3DhostDomain=hostDomain&hitCountInterval=HOUR&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/deny-lists?appId%3DhostDomain=hostDomain&hitCountInterval=HOUR&skip=40&take=10', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api-gw.perimeterx.com/v1/deny-lists?appId%3DhostDomain=hostDomain&hitCountInterval=HOUR&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/deny-lists?appId%3DhostDomain=hostDomain&hitCountInterval=HOUR&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()
```