> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.fabricgateway.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.fabricgateway.ai/_mcp/server.

# List Traces

GET https://control-plane.example.com/api/v1/{tenant}/traces

ClickHouse-backed trace list. `protocol`, `route`, `service`, `consumer` and `status` may repeat; empty values are dropped. On the default `timestamp.desc` sort, a full page returns `nextCursor`; pass it as `cursor` (with the same `range`) for the next page instead of `page`. With `count=false`, `totalAvailable` is left out when only the span tables can count it (attribute filters or `search`); fetch it from `/traces/count` with the same filters.

Reference: https://docs.fabricgateway.ai/reference/admin-api/traces/list-traces

## Authentication

- `fg-tenant-api-key` header (required) — API Key authentication via header

## Request

### Path parameters

- `tenant` (string, required)

### Query parameters

- `range` (string, optional)
- `search` (string, optional)
- `protocol` (string, optional)
- `route` (string, optional)
- `service` (string, optional)
- `consumer` (string, optional)
- `status` (string, optional)
- `page` (integer, optional)
- `pageSize` (integer, optional)
- `sort` (string, optional)
- `cursor` (string, optional)
- `count` (boolean, optional) — `false` leaves `totalAvailable` out when it would need a span-table count. Defaults to `true`.

## Response

### 200

OK

## Errors

### 500 Internal Server Error

Server Error

## Examples

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://control-plane.example.com/api/v1/acme/traces"

querystring = {"consumer":"","count":"true","cursor":"","page":"0","pageSize":"25","protocol":"","range":"7d","route":"","search":"","service":"","sort":"","status":""}

headers = {"fg-tenant-api-key": "<apiKey>"}

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

print(response.json())
```

```javascript
const url = 'https://control-plane.example.com/api/v1/acme/traces?consumer=&count=true&cursor=&page=0&pageSize=25&protocol=&range=7d&route=&search=&service=&sort=&status=';
const options = {method: 'GET', headers: {'fg-tenant-api-key': '<apiKey>'}};

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://control-plane.example.com/api/v1/acme/traces?consumer=&count=true&cursor=&page=0&pageSize=25&protocol=&range=7d&route=&search=&service=&sort=&status="

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

	req.Header.Add("fg-tenant-api-key", "<apiKey>")

	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://control-plane.example.com/api/v1/acme/traces?consumer=&count=true&cursor=&page=0&pageSize=25&protocol=&range=7d&route=&search=&service=&sort=&status=")

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

request = Net::HTTP::Get.new(url)
request["fg-tenant-api-key"] = '<apiKey>'

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://control-plane.example.com/api/v1/acme/traces?consumer=&count=true&cursor=&page=0&pageSize=25&protocol=&range=7d&route=&search=&service=&sort=&status=")
  .header("fg-tenant-api-key", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://control-plane.example.com/api/v1/acme/traces?consumer=&count=true&cursor=&page=0&pageSize=25&protocol=&range=7d&route=&search=&service=&sort=&status=', [
  'headers' => [
    'fg-tenant-api-key' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://control-plane.example.com/api/v1/acme/traces?consumer=&count=true&cursor=&page=0&pageSize=25&protocol=&range=7d&route=&search=&service=&sort=&status=");
var request = new RestRequest(Method.GET);
request.AddHeader("fg-tenant-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["fg-tenant-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://control-plane.example.com/api/v1/acme/traces?consumer=&count=true&cursor=&page=0&pageSize=25&protocol=&range=7d&route=&search=&service=&sort=&status=")! 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()
```