> This page is for Advertising 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.

# List available reports

GET https://dashboard.humansecurity.com/api/v5/reports/list

Returns a list of reports available for download.

Reference: https://docs.humansecurity.com/advertising/reference/get-reports

## Authentication

- `Authorization` header (basic auth, required) — To authenticate a request, provide an `Authorization` header with the value `Basic base64(username:password)`. For example, if your HUMAN Auth ID is `whiteops` and your HUMAN Auth Key is `secret`, your `Authorization` header should be set to `Basic d2hpdGVvcHM6c2VjcmV0`.

## Request

### Query parameters

- `type` (string, optional) — Lets you filter the API response list by report type. Possible values are `report` and `export`.

## Response

### 200

Success

- `data` (list of ListDataItems, optional)

## Errors

### 400 Bad Request Error

Bad request (unsupported/missing parameters)

- `any`

### 401 Unauthorized Error

Unauthorized request (authentication failure)

- `any`

### 500 Internal Server Error

Internal server error

- `any`

## Types

### ListDataItems

- `type` (string, optional)
- `name` (string, optional)
- `createdAt` (string, optional)
- `fileSize` (string, optional)

## Examples

**Response**

```json
{
  "data": [
    {
      "type": "export",
      "name": "testExport.csv",
      "createdAt": "string",
      "fileSize": "264b"
    },
    {
      "type": "report",
      "name": "testReport.csv",
      "createdAt": "string",
      "fileSize": "1.81kb"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://dashboard.humansecurity.com/api/v5/reports/list"

response = requests.get(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript
const url = 'https://dashboard.humansecurity.com/api/v5/reports/list';
const credentials = btoa("<username>:<password>");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

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://dashboard.humansecurity.com/api/v5/reports/list"

	req, _ := http.NewRequest("GET", url, nil)

	req.SetBasicAuth("<username>", "<password>")

	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://dashboard.humansecurity.com/api/v5/reports/list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request.basic_auth("<username>", "<password>")

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://dashboard.humansecurity.com/api/v5/reports/list")
  .basicAuth("<username>", "<password>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://dashboard.humansecurity.com/api/v5/reports/list', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

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

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://dashboard.humansecurity.com/api/v5/reports/list");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://dashboard.humansecurity.com/api/v5/reports/list")! 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()
```