---
title: "Retrieve tests and flows that use any of the provided file uploads"
method: POST
path: "/files/fileUpload/usedBy/batch"
tags: ["FileUpload"]
---

# Retrieve tests and flows that use any of the provided file uploads

`POST /files/fileUpload/usedBy/batch`

Used to retrieve tests and flows that use any of the provided file uploads in a single request

## Query parameters

- `limit` integer
- `cursor` string

## Request body

- FileUploadUsedByBatchRequest — Request body for batch file upload used-by query
  - `file_upload_ids` string[], required — Array of file upload IDs to find used-by entities for

## Response `200`

Paginated results of tests and flows that use any of the provided file uploads

- FileUploadUsedByBatchQueryResult — result envelope for batch fileUpload used-by query results
  - `entities` UsedByEntity[] — Combined list of tests and flows that use any of the provided file uploads, ordered by file upload ID and then entity invariant ID
    - `resource_id` string — The ID of the resource used by this entity
    - `entity_invariant_id` string — The invariant ID of the entity
    - `entity_type` 'test' | 'flow' — The type of entity (test or flow)
    - `entity_name` string — The name of the entity
    - `workspace_id` string — The workspace ID of the entity
    - `created_time` integer — When the entity was created
    - `last_updated_time` integer — When the entity was last updated
    - `branches` string[] — Branches of the test or flow that use this resource
  - `cursor` string — Cursor used for pagination

## Other responses

- `400` — Invalid request - too many file upload IDs or invalid IDs
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
