## List Pipeline Files2

`FileListPageResponse Pipelines.Files.List(FileListParamsparameters, CancellationTokencancellationToken = default)`

**get** `/api/v1/pipelines/{pipeline_id}/files2`

List files for a pipeline with optional filtering, sorting, and pagination.

### Parameters

- `FileListParams parameters`

  - `required string pipelineID`

  - `string? dataSourceID`

  - `string? fileNameContains`

  - `Long? limit`

  - `Long? offset`

  - `Boolean onlyManuallyUploaded`

  - `string? orderBy`

  - `IReadOnlyList<Status>? statuses`

    Filter by file statuses

    - `"CANCELLED"Cancelled`

    - `"ERROR"Error`

    - `"IN_PROGRESS"InProgress`

    - `"NOT_STARTED"NotStarted`

    - `"SUCCESS"Success`

### Returns

- `class FileListPageResponse:`

  Paginated list of pipeline files.

  - `required IReadOnlyList<PipelineFile> Files`

    The files to list

    - `required string ID`

      Unique identifier for the pipeline file.

    - `required string PipelineID`

      The ID of the pipeline that the file is associated with.

    - `IReadOnlyDictionary<string, ConfigHash?>? ConfigHash`

      Hashes for the configuration of the pipeline.

      - `IReadOnlyDictionary<string, JsonElement>`

      - `IReadOnlyList<JsonElement>`

      - `string`

      - `Double`

      - `Boolean`

    - `DateTimeOffset? CreatedAt`

      When the pipeline file was created.

    - `IReadOnlyDictionary<string, CustomMetadata?>? CustomMetadata`

      Custom metadata for the file.

      - `IReadOnlyDictionary<string, JsonElement>`

      - `IReadOnlyList<JsonElement>`

      - `string`

      - `Double`

      - `Boolean`

    - `string? DataSourceID`

      The ID of the data source that the file belongs to.

    - `string? ExternalFileID`

      The ID of the file in the external system.

    - `string? FileID`

      The ID of the file.

    - `Long? FileSize`

      Size of the file in bytes.

    - `string? FileType`

      File type (e.g. pdf, docx, etc.).

    - `Long? IndexedPageCount`

      The number of pages that have been indexed for this file.

    - `DateTimeOffset? LastModifiedAt`

      The last modified time of the file.

    - `string? Name`

      Name of the file.

    - `IReadOnlyDictionary<string, PermissionInfo?>? PermissionInfo`

      Permission information for the file.

      - `IReadOnlyDictionary<string, JsonElement>`

      - `IReadOnlyList<JsonElement>`

      - `string`

      - `Double`

      - `Boolean`

    - `string? ProjectID`

      The ID of the project that the file belongs to.

    - `IReadOnlyDictionary<string, ResourceInfo?>? ResourceInfo`

      Resource information for the file.

      - `IReadOnlyDictionary<string, JsonElement>`

      - `IReadOnlyList<JsonElement>`

      - `string`

      - `Double`

      - `Boolean`

    - `Status? Status`

      Status of the pipeline file.

      - `"CANCELLED"Cancelled`

      - `"ERROR"Error`

      - `"IN_PROGRESS"InProgress`

      - `"NOT_STARTED"NotStarted`

      - `"SUCCESS"Success`

    - `DateTimeOffset? StatusUpdatedAt`

      The last time the status was updated.

    - `DateTimeOffset? UpdatedAt`

      When the pipeline file was last updated.

  - `required Long Limit`

    The limit of the files

  - `required Long Offset`

    The offset of the files

  - `required Long TotalCount`

    The total number of files

### Example

```csharp
FileListParams parameters = new()
{
    PipelineID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
};

var page = await client.Pipelines.Files.List(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
```

#### Response

```json
{
  "files": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "pipeline_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "config_hash": {
        "foo": {
          "foo": "bar"
        }
      },
      "created_at": "2019-12-27T18:11:19.117Z",
      "custom_metadata": {
        "foo": {
          "foo": "bar"
        }
      },
      "data_source_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "external_file_id": "external_file_id",
      "file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "file_size": 0,
      "file_type": "file_type",
      "indexed_page_count": 0,
      "last_modified_at": "2019-12-27T18:11:19.117Z",
      "name": "name",
      "permission_info": {
        "foo": {
          "foo": "bar"
        }
      },
      "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "resource_info": {
        "foo": {
          "foo": "bar"
        }
      },
      "status": "CANCELLED",
      "status_updated_at": "2019-12-27T18:11:19.117Z",
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "limit": 0,
  "offset": 0,
  "total_count": 0
}
```
