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

# List Traces

GET https://host.com/apis/intake/v2/workspaces/{workspace}/traces

Reference: https://docs.nvidia.com/nemo-platform/nemo-platform/documentation/reference/api-reference/traces/list-traces-apis-intake-v-2-workspaces-workspace-traces-get

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Nemo Platform API
  version: 1.0.0
paths:
  /apis/intake/v2/workspaces/{workspace}/traces:
    get:
      operationId: list-traces-apis-intake-v-2-workspaces-workspace-traces-get
      summary: List Traces
      tags:
        - subpackage_traces
      parameters:
        - name: workspace
          in: path
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: Page number.
          required: false
          schema:
            type: integer
            default: 1
        - name: page_size
          in: query
          description: Page size.
          required: false
          schema:
            type: integer
            default: 10
        - name: sort
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/TraceSortField'
            default: '-started_at'
        - name: mode
          in: query
          description: >-
            Use summary for root-span trace fields only, or detailed to include
            token, cost, and span-count rollups.
          required: false
          schema:
            $ref: >-
              #/components/schemas/ApisIntakeV2WorkspacesWorkspaceTracesGetParametersMode
            default: detailed
        - name: filter
          in: query
          description: >-
            Filter root-span-backed traces by id, session_id, root status, root
            span started_at, experiment_id, and test_case_id.
          required: false
          schema:
            $ref: '#/components/schemas/TraceFilter'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TracesPage'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
servers:
  - url: https://host.com
    description: Default
components:
  schemas:
    TraceSortField:
      type: string
      enum:
        - started_at
        - '-started_at'
      title: TraceSortField
    ApisIntakeV2WorkspacesWorkspaceTracesGetParametersMode:
      type: string
      enum:
        - summary
        - detailed
      default: detailed
      description: >-
        Use summary for root-span trace fields only, or detailed to include
        token, cost, and span-count rollups.
      title: ApisIntakeV2WorkspacesWorkspaceTracesGetParametersMode
    SpanStatus:
      type: string
      enum:
        - success
        - error
        - cancelled
        - unknown
      title: SpanStatus
    DatetimeFilter:
      type: object
      properties:
        $gte:
          type: string
          format: date-time
          description: Filter for results greater than or equal to this datetime.
        $lte:
          type: string
          format: date-time
          description: Filter for results less than or equal to this datetime.
      title: DatetimeFilter
    TraceFilter:
      type: object
      properties:
        id:
          type: string
          description: Filter by canonical Intake trace id.
        session_id:
          type: string
          description: Filter by session id.
        status:
          $ref: '#/components/schemas/SpanStatus'
          description: Filter by root span status.
        started_at:
          $ref: '#/components/schemas/DatetimeFilter'
          description: Filter by root span start timestamp.
        experiment_id:
          type: string
          description: Filter by root-span experiment id.
        test_case_id:
          type: string
          description: Filter by root-span experiment test case id.
      title: TraceFilter
    ExperimentContext:
      type: object
      properties:
        experiment_id:
          type: string
          description: Name of an existing Experiment entity.
        test_case_id:
          type: string
          description: Optional producer-supplied test case id.
      required:
        - experiment_id
      description: Experiment context accepted by ingest endpoints.
      title: ExperimentContext
    Trace:
      type: object
      properties:
        id:
          type: string
        root_span_id:
          type: string
        session_id:
          type: string
        workspace:
          type: string
        name:
          type: string
        experiment_context:
          $ref: '#/components/schemas/ExperimentContext'
        started_at:
          type: string
          format: date-time
        ended_at:
          type: string
          format: date-time
        duration_ms:
          type: number
          format: double
        status:
          $ref: '#/components/schemas/SpanStatus'
        input_tokens:
          type: integer
        output_tokens:
          type: integer
        cached_tokens:
          type: integer
        total_tokens:
          type: integer
        cost_usd:
          type: number
          format: double
        cost_input_usd:
          type: number
          format: double
        cost_output_usd:
          type: number
          format: double
        span_count:
          type: integer
        error_count:
          type: integer
      required:
        - id
        - session_id
        - workspace
        - started_at
        - status
      title: Trace
    PaginationData:
      type: object
      properties:
        page:
          type: integer
          description: The current page number.
        page_size:
          type: integer
          description: The page size used for the query.
        current_page_size:
          type: integer
          description: The size for the current page.
        total_pages:
          type: integer
          description: The total number of pages.
        total_results:
          type: integer
          description: The total number of results.
      required:
        - page
        - page_size
        - current_page_size
        - total_pages
        - total_results
      title: PaginationData
    TracesPage:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Trace'
        pagination:
          $ref: '#/components/schemas/PaginationData'
          description: Pagination information.
        sort:
          type: string
          description: The field on which the results are sorted.
        filter:
          type: object
          additionalProperties:
            description: Any type
          description: Filtering information.
      required:
        - data
      title: TracesPage
    ValidationErrorLocItems:
      oneOf:
        - type: string
        - type: integer
      title: ValidationErrorLocItems
    ValidationError:
      type: object
      properties:
        loc:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorLocItems'
        msg:
          type: string
        type:
          type: string
        input:
          description: Any type
        ctx:
          type: object
          additionalProperties:
            description: Any type
      required:
        - loc
        - msg
        - type
      title: ValidationError
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      title: HTTPValidationError

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "data": [
    {
      "id": "trace_9f8b7c6d5e4a3b2c1d0e",
      "session_id": "session_20240115_093000",
      "workspace": "nemo_workspace_01",
      "started_at": "2024-01-15T09:30:00Z",
      "status": "success",
      "root_span_id": "span_1234567890abcdef",
      "name": "User Login Flow",
      "experiment_context": {
        "experiment_id": "exp_2024_q1_login_test",
        "test_case_id": "tc_001"
      },
      "ended_at": "2024-01-15T09:30:01Z",
      "duration_ms": 1050.5,
      "input_tokens": 150,
      "output_tokens": 300,
      "cached_tokens": 50,
      "total_tokens": 400,
      "cost_usd": 0.0125,
      "cost_input_usd": 0.0045,
      "cost_output_usd": 0.008,
      "span_count": 5,
      "error_count": 0
    }
  ],
  "pagination": {
    "page": 1,
    "page_size": 10,
    "current_page_size": 1,
    "total_pages": 1,
    "total_results": 1
  },
  "sort": "-started_at",
  "filter": {}
}
```

**SDK Code**

```python
import requests

url = "https://host.com/apis/intake/v2/workspaces/workspace/traces"

payload = {}
headers = {"Content-Type": "application/json"}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://host.com/apis/intake/v2/workspaces/workspace/traces';
const options = {method: 'GET', headers: {'Content-Type': 'application/json'}, body: '{}'};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://host.com/apis/intake/v2/workspaces/workspace/traces"

	payload := strings.NewReader("{}")

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

	req.Header.Add("Content-Type", "application/json")

	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://host.com/apis/intake/v2/workspaces/workspace/traces")

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

request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"

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://host.com/apis/intake/v2/workspaces/workspace/traces")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://host.com/apis/intake/v2/workspaces/workspace/traces', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://host.com/apis/intake/v2/workspaces/workspace/traces");
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://host.com/apis/intake/v2/workspaces/workspace/traces")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```