---
title: "List file segments"
method: GET
path: "/files/{file_id}/segments"
tags: ["Files", "File Segments"]
---

# List file segments

`GET /files/{file_id}/segments`

## Request

- Base URL: `https://api.cloudglue.dev/v1`
- URL: `https://api.cloudglue.dev/v1/files/{file_id}/segments`
- Auth: HTTP bearer

List all segments for a specific file

## Path parameters

- `file_id` string, uuid, required

## Query parameters

- `start_time_after` number
- `end_time_before` number
- `min_duration` number
- `max_duration` number
- `limit` integer
- `offset` integer

## Response `200`

List of segments

- FileSegmentListResponse
  - `object` 'list', required: Object type, always 'list'
  - `data` FileSegment[], required
    - `id` string, uuid, required: The ID of the segment
    - `file_id` string, uuid, required: The ID of the file
    - `start_time` number, required: The start time of the segment in seconds
    - `end_time` number, required: The end time of the segment in seconds
    - `thumbnail_url` string, required: The URL of the thumbnail for the segment (if available)
    - `metadata` object: The user defined metadata for the segment
    - `segmentation_id` string, uuid: The ID of the segmentation job it belongs to
  - `total` integer, required: The total number of items
  - `limit` integer, required: The number of items per page
  - `offset` integer, required: The offset of the items

## Other responses

- `400`: Invalid query parameters (e.g., min_duration > max_duration, start_time_after >= end_time_before)

## Changes

- **2026-10-30** `23d3f240819f`: 1 info
  - added the optional property `code` to the response with the `400` status
- **2026-03-11** `1d5d6115c0d0`: 2 breaking
  - for the `query` request parameter `limit`, default value `50` was removed
  - for the `query` request parameter `offset`, default value `0` was removed
- **2026-03-03** `fbee7be59d72`: 3 info
  - added the new optional `query` request parameter `max_duration`
  - added the new optional `query` request parameter `min_duration`
  - added the non-success response with the status `400`
- **2026-01-14** `b7165aa26374`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cloudglue/apis/cloudglue-api/changes/files/:file_id/segments/get.md)

---

[API](https://skmtc.dev/cloudglue/apis/cloudglue-api.md) - [All operations](https://skmtc.dev/cloudglue/apis/cloudglue-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cloudglue/apis/cloudglue-api/revisions/23d3f240819f?raw)
