> 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 custom list identifiers

GET https://console.humansecurity.com/api/v1/botDefender/customLists/{listId}/identifiers

Retrieve identifiers from a custom list.

Reference: https://docs.humansecurity.com/applications/reference/get-custom-list-identifiers

## Authentication

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

## Servers

- `https://console.humansecurity.com/api` (Version 1 of the API, default)
- `https://console.humansecurity.com/api` (Version 2 of the API)

## Request

### Path parameters

- `listId` (string, required) — The unique identifier of the custom list

### Query parameters

- `search` (string, optional) — Search term for filtering identifiers by their values (not identifier types). Searches within the actual identifier values.
- `sortField` (enum, optional) — Field to sort by
  - Allowed values: `identifier`, `value`, `created_at`, `creation_type`, `created_by`
- `sortDirection` (enum, optional) — Sort direction
  - Allowed values: `ASC`, `DESC`
- `limit` (integer, optional) — Maximum number of results to return
- `offset` (integer, optional) — Number of results to skip
- `filters` (string, optional) — JSON object for complex filtering

## Response

### 200

Successfully retrieved identifiers

- `result` (boolean, required) — Indicates if the request was successful
- `message` (string, required) — Response message
- `content` (CustomListIdentifiersResponseContent, optional)

## Errors

### 401 Unauthorized Error

Authentication token is missing or invalid

- `result` (boolean, required) — Indicates if the request was successful
- `message` (string, required) — Response message
- `content` (string, optional)

### 404 Not Found Error

The requested resource was not found

- `result` (boolean, required) — Indicates if the request was successful
- `message` (string, required) — Response message
- `content` (string, optional)

### 500 Internal Server Error

Internal server error

- `result` (boolean, required) — Indicates if the request was successful
- `message` (string, required) — Response message
- `content` (string, optional)

## Types

### CustomListIdentifiersResponseContent

- `identifiers` (list of CustomListIdentifier, optional)
- `pagination` (Pagination, optional)

### CustomListIdentifier

- `_id` (string, required) — Unique identifier for the identifier entry
- `list_id` (string, required) — ID of the custom list this identifier belongs to
- `identifier` (string, required) — Type of identifier (e.g., socketIps, socketIpASN, path, custom_param1, custom_param2, custom_param3, custom_param4, custom_param5, custom_param6, custom_param7, custom_param8, custom_param9, custom_param10)
- `value` (string, required) — The actual identifier value
- `created_by` (string, required) — Email of the user who created this identifier
- `created_at` (string, required) — When the identifier was created
- `updated_by` (string, required) — Email of the user who last updated this identifier
- `updated_at` (string, required) — When the identifier was last updated
- `creation_type` (enum, required) — How this identifier was created
  - Allowed values: `manual`, `csv`, `api`

### Pagination

- `total` (integer, optional)
- `totalFiltered` (integer, optional)
- `limit` (integer, optional)
- `offset` (integer, optional)

## Examples

**Response**

```json
{
  "result": true,
  "message": "success",
  "content": {
    "identifiers": [
      {
        "_id": "64f8b12345678901234567cd",
        "list_id": "64f8b12345678901234567ab",
        "identifier": "socketIps",
        "value": "user@example.com",
        "created_by": "admin@humansecurity.com",
        "created_at": "2023-09-01T12:00:00Z",
        "updated_by": "admin@humansecurity.com",
        "updated_at": "2023-09-01T12:00:00Z",
        "creation_type": "manual"
      }
    ],
    "pagination": {
      "total": 150,
      "totalFiltered": 150,
      "limit": 50,
      "offset": 0
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://console.humansecurity.com/api/v1/botDefender/customLists/64f8b12345678901234567ab/identifiers"

querystring = {"filters":"{\"creation_type\":{\"manual\":true},\"created_by\":{\"admin\":true}}","limit":"50","offset":"0","search":"192.168.1.100","sortDirection":"ASC","sortField":"identifier"}

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

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

print(response.json())
```

```javascript
const url = 'https://console.humansecurity.com/api/v1/botDefender/customLists/64f8b12345678901234567ab/identifiers?filters=%7B%22creation_type%22%3A%7B%22manual%22%3Atrue%7D%2C%22created_by%22%3A%7B%22admin%22%3Atrue%7D%7D&limit=50&offset=0&search=192.168.1.100&sortDirection=ASC&sortField=identifier';
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://console.humansecurity.com/api/v1/botDefender/customLists/64f8b12345678901234567ab/identifiers?filters=%7B%22creation_type%22%3A%7B%22manual%22%3Atrue%7D%2C%22created_by%22%3A%7B%22admin%22%3Atrue%7D%7D&limit=50&offset=0&search=192.168.1.100&sortDirection=ASC&sortField=identifier"

	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://console.humansecurity.com/api/v1/botDefender/customLists/64f8b12345678901234567ab/identifiers?filters=%7B%22creation_type%22%3A%7B%22manual%22%3Atrue%7D%2C%22created_by%22%3A%7B%22admin%22%3Atrue%7D%7D&limit=50&offset=0&search=192.168.1.100&sortDirection=ASC&sortField=identifier")

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://console.humansecurity.com/api/v1/botDefender/customLists/64f8b12345678901234567ab/identifiers?filters=%7B%22creation_type%22%3A%7B%22manual%22%3Atrue%7D%2C%22created_by%22%3A%7B%22admin%22%3Atrue%7D%7D&limit=50&offset=0&search=192.168.1.100&sortDirection=ASC&sortField=identifier")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://console.humansecurity.com/api/v1/botDefender/customLists/64f8b12345678901234567ab/identifiers?filters=%7B%22creation_type%22%3A%7B%22manual%22%3Atrue%7D%2C%22created_by%22%3A%7B%22admin%22%3Atrue%7D%7D&limit=50&offset=0&search=192.168.1.100&sortDirection=ASC&sortField=identifier', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://console.humansecurity.com/api/v1/botDefender/customLists/64f8b12345678901234567ab/identifiers?filters=%7B%22creation_type%22%3A%7B%22manual%22%3Atrue%7D%2C%22created_by%22%3A%7B%22admin%22%3Atrue%7D%7D&limit=50&offset=0&search=192.168.1.100&sortDirection=ASC&sortField=identifier");
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://console.humansecurity.com/api/v1/botDefender/customLists/64f8b12345678901234567ab/identifiers?filters=%7B%22creation_type%22%3A%7B%22manual%22%3Atrue%7D%2C%22created_by%22%3A%7B%22admin%22%3Atrue%7D%7D&limit=50&offset=0&search=192.168.1.100&sortDirection=ASC&sortField=identifier")! 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()
```