Skip to main content

Mock File Upload Data API

MOCK DATA

Generate coherent mock file-upload sessions and multipart records with exact byte progress, lifecycle states, checksums and safe example URLs.

Generated test data for fixtures and development

Base URL
/api/file-uploads
Capabilities
2 routes Seedable
Last updated
July 29, 2026

GET /api/file-uploads

Live requestRuns against the public API
No key required
GET/api/file-uploads?contentType=application%2Fpdf&mode=multipart&status=uploading&minSizeBytes=1048576&maxSizeBytes=20971520&count=20&seed=42

Request parameters

Constrain content type and filename extension. Omit for a mix.

Constrain single or multipart mode. Explicit multipart requires a total of at least 2 KiB.

Constrain lifecycle state and its coherent progress/error fields.

Inclusive minimum fictional file size in bytes.

Inclusive maximum size; must be at least minSizeBytes and at least 2 KiB (2048 bytes) for explicit multipart mode.

Latest lifecycle instant. Defaults to the current UTC day's end and is echoed for replay.

Advanced response options7 options

How many records to generate (1–100).

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Response format: json envelope, ndjson (one record per line) or csv.

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/file-uploads?contentType=application%2Fpdf&mode=multipart&status=uploading&minSizeBytes=1048576&maxSizeBytes=20971520&seed=42&count=20"
const res = await fetch("https://randomapi.dev/api/file-uploads?contentType=application%2Fpdf&mode=multipart&status=uploading&minSizeBytes=1048576&maxSizeBytes=20971520&seed=42&count=20");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/file-uploads?contentType=application%2Fpdf&mode=multipart&status=uploading&minSizeBytes=1048576&maxSizeBytes=20971520&seed=42&count=20").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/file-uploads?contentType=application%2Fpdf&mode=multipart&status=uploading&minSizeBytes=1048576&maxSizeBytes=20971520&seed=42&count=20"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 6
contentType enum

Constrain content type and filename extension. Omit for a mix.

allowed: image/png | application/pdf | text/csv | application/zip
example: contentType=application/pdf
mode enum

Constrain single or multipart mode. Explicit multipart requires a total of at least 2 KiB.

allowed: single | multipart
example: mode=multipart
status enum

Constrain lifecycle state and its coherent progress/error fields.

allowed: initiated | uploading | completed | failed | expired
example: status=uploading
minSizeBytes int

Inclusive minimum fictional file size in bytes.

default: 1024
allowed: 1 – 104857600
example: minSizeBytes=1048576
maxSizeBytes int

Inclusive maximum size; must be at least minSizeBytes and at least 2 KiB (2048 bytes) for explicit multipart mode.

default: 52428800
allowed: 1 – 104857600
example: maxSizeBytes=20971520
asOf date

Latest lifecycle instant. Defaults to the current UTC day's end and is echoed for replay.

example: asOf=2026-07-10T23:59:59.999Z
Universal parameters Shared response and formatting options 7
count int

How many records to generate (1–100).

default: 10
allowed: 1 – 100
example: count=3
seed int

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

example: seed=42
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=uploadId,fileName
exclude list

Return all fields except these (comma-separated).

example: exclude=error
format enum

Response format: json envelope, ndjson (one record per line) or csv.

default: json
allowed: json | ndjson | csv
example: format=csv
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 17
uploadId string

Unique fictional upload id containing the stable record index.

example: upl_0_a81c42f0

fileName string

Generic filename whose extension agrees with contentType.

example: document-1.pdf

contentType string

Selected mock file media type.

example: application/pdf

sizeBytes integer

Total file bytes inside requested bounds.

example: 10485760

mode string

single or multipart.

example: multipart

status string

initiated, uploading, completed, failed or expired.

example: uploading

createdAt string (ISO 8601)

Fictional session creation instant.

example: 2026-07-10T08:00:00.000Z

expiresAt string (ISO 8601)

Expiry after createdAt; expired fixtures place it at or before resolved asOf.

example: 2026-07-17T08:00:00.000Z

completedAt string (ISO 8601) nullable

Completion instant for completed sessions only.

example: null

uploadedBytes integer

Bytes received, never above sizeBytes.

example: 5242880

progressPercentage float

uploadedBytes divided by sizeBytes; only completed sessions equal 100.

example: 50

partSizeBytes integer

Nominal bytes per part; 1 KiB–10 MiB for multipart and equal to sizeBytes for single mode.

example: 5242880

partCount integer

One for single mode, otherwise 2–10.

example: 2

completedParts integer

Fully uploaded parts, from zero through partCount.

example: 1

checksum string nullable

Fictional sha256 value for completed sessions only.

example: null

downloadUrl string nullable

Safe example.com URL for completed sessions only.

example: null

error object nullable

Code/message for failed or expired sessions; otherwise null.

example: null

Documented examples

Build-generated requests and complete responses
2
Multipart PDF uploads in progress
GET /api/file-uploads?contentType=application%2Fpdf&mode=multipart&status=uploading&minSizeBytes=1048576&maxSizeBytes=20971520&seed=42&count=20
{
  "data": [
    {
      "uploadId": "upl_0_8016cfb6",
      "fileName": "document-1.pdf",
      "contentType": "application/pdf",
      "sizeBytes": 10567395,
      "mode": "multipart",
      "status": "uploading",
      "createdAt": "2026-07-29T16:20:30.607Z",
      "expiresAt": "2026-08-05T16:20:30.607Z",
      "completedAt": null,
      "uploadedBytes": 6320402,
      "progressPercentage": 59.81,
      "partSizeBytes": 1320925,
      "partCount": 8,
      "completedParts": 4,
      "checksum": null,
      "downloadUrl": null,
      "error": null
    },
    {
      "uploadId": "upl_1_f248abec",
      "fileName": "document-2.pdf",
      "contentType": "application/pdf",
      "sizeBytes": 1836467,
      "mode": "multipart",
      "status": "uploading",
      "createdAt": "2026-07-29T11:20:54.348Z",
      "expiresAt": "2026-08-05T11:20:54.348Z",
      "completedAt": null,
      "uploadedBytes": 820989,
      "progressPercentage": 44.7,
      "partSizeBytes": 918234,
      "partCount": 2,
      "completedParts": 0,
      "checksum": null,
      "downloadUrl": null,
      "error": null
    },
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Completed PNG uploads
GET /api/file-uploads?contentType=image%2Fpng&status=completed&count=10
{
  "data": [
    {
      "uploadId": "upl_0_016cfb6a",
      "fileName": "image-1.png",
      "contentType": "image/png",
      "sizeBytes": 25050058,
      "mode": "multipart",
      "status": "completed",
      "createdAt": "2026-07-29T16:20:30.607Z",
      "expiresAt": "2026-08-05T16:20:30.607Z",
      "completedAt": "2026-07-29T20:23:39.784Z",
      "uploadedBytes": 25050058,
      "progressPercentage": 100,
      "partSizeBytes": 3578580,
      "partCount": 7,
      "completedParts": 7,
      "checksum": "sha256:5c85eac58cdd40fb15863c1d1cff8728448a0b56b87c24316010d14615edf362",
      "downloadUrl": "https://files.example.com/download/upl_0_016cfb6a/image-1.png",
      "error": null
    },
    {
      "uploadId": "upl_1_8f248abe",
      "fileName": "image-2.png",
      "contentType": "image/png",
      "sizeBytes": 2074382,
      "mode": "single",
      "status": "completed",
      "createdAt": "2026-07-29T23:51:39.295Z",
      "expiresAt": "2026-08-05T23:51:39.295Z",
      "completedAt": "2026-07-29T23:55:23.134Z",
      "uploadedBytes": 2074382,
      "progressPercentage": 100,
      "partSizeBytes": 2074382,
      "partCount": 1,
      "completedParts": 1,
      "checksum": "sha256:ccba6fd45df91c36673e8fcae90de6555855da26d0b749e25c7ba8ef202f9e4c",
      "downloadUrl": "https://files.example.com/download/upl_1_8f248abe/image-2.png",
      "error": null
    },
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}

GET /api/file-uploads/parts

Live requestRuns against the public API
No key required
GET/api/file-uploads/parts?uploadId=upl_checkout_assets&partSizeBytes=1048576&status=completed&count=20&seed=42

Request parameters

Safe upload id echoed in every part.

Exact size and offset step for each generated part.

Constrain part lifecycle status and coherent fields.

Latest part update instant. Defaults to the current UTC day's end and is echoed for replay.

Advanced response options7 options

How many records to generate (1–100).

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Response format: json envelope, ndjson (one record per line) or csv.

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/file-uploads/parts?uploadId=upl_checkout_assets&partSizeBytes=1048576&status=completed&seed=42&count=20"
const res = await fetch("https://randomapi.dev/api/file-uploads/parts?uploadId=upl_checkout_assets&partSizeBytes=1048576&status=completed&seed=42&count=20");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/file-uploads/parts?uploadId=upl_checkout_assets&partSizeBytes=1048576&status=completed&seed=42&count=20").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/file-uploads/parts?uploadId=upl_checkout_assets&partSizeBytes=1048576&status=completed&seed=42&count=20"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 4
uploadId string

Safe upload id echoed in every part.

default: upl_demo
allowed: 1 – 64
example: uploadId=upl_checkout_assets
partSizeBytes int

Exact size and offset step for each generated part.

default: 5242880
allowed: 1024 – 10485760
example: partSizeBytes=1048576
status enum

Constrain part lifecycle status and coherent fields.

allowed: pending | uploading | completed | failed
example: status=completed
asOf date

Latest part update instant. Defaults to the current UTC day's end and is echoed for replay.

example: asOf=2026-07-10T23:59:59.999Z
Universal parameters Shared response and formatting options 7
count int

How many records to generate (1–100).

default: 10
allowed: 1 – 100
example: count=3
seed int

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

example: seed=42
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=partId,uploadId
exclude list

Return all fields except these (comma-separated).

example: exclude=updatedAt
format enum

Response format: json envelope, ndjson (one record per line) or csv.

default: json
allowed: json | ndjson | csv
example: format=csv
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 12
partId string

Unique fixture part id containing the stable part number.

example: part_1_a81c42f0

uploadId string

Validated requested upload id.

example: upl_demo

partNumber integer

One-based sequential part number.

example: 1

offsetBytes integer

Zero-based byte offset: (partNumber - 1) × sizeBytes.

example: 0

sizeBytes integer

Requested fixed part size.

example: 5242880

status string

pending, uploading, completed or failed.

example: completed

uploadedBytes integer

Bytes received for this part, never above sizeBytes.

example: 5242880

progressPercentage float

Exact byte progress; completed alone reports 100.

example: 100

etag string nullable

Fictional quoted ETag for completed parts only.

example: "31f0a82d9c41"

checksum string nullable

Fictional sha256 value for completed parts only.

example: sha256:66f327f276cc47a8b2caa2cf7131537a

error object nullable

Failure code/message for failed parts only.

example: null

updatedAt string (ISO 8601)

Stable fictional instant at or before resolved asOf.

example: 2026-07-10T00:00:01.412Z

Documented examples

Build-generated requests and complete responses
2
Completed one-megabyte parts
GET /api/file-uploads/parts?uploadId=upl_checkout_assets&partSizeBytes=1048576&status=completed&seed=42&count=20
{
  "data": [
    {
      "partId": "part_1_7a958016",
      "uploadId": "upl_checkout_assets",
      "partNumber": 1,
      "offsetBytes": 0,
      "sizeBytes": 1048576,
      "status": "completed",
      "uploadedBytes": 1048576,
      "progressPercentage": 100,
      "etag": "\"cfb6a5c85eac58cdd40fb158\"",
      "checksum": "sha256:63c1d1cff8728448a0b56b87c24316010d14615edf3629ff11dec8095cf56531",
      "error": null,
      "updatedAt": "2026-07-29T23:59:59.839Z"
    },
    {
      "partId": "part_2_0078f248",
      "uploadId": "upl_checkout_assets",
      "partNumber": 2,
      "offsetBytes": 1048576,
      "sizeBytes": 1048576,
      "status": "completed",
      "uploadedBytes": 1048576,
      "progressPercentage": 100,
      "etag": "\"abeccba6fd45df91c36673e8\"",
      "checksum": "sha256:fcae90de6555855da26d0b749e25c7ba8ef202f9e4c30de268a9b03c9f6b8615",
      "error": null,
      "updatedAt": "2026-07-29T23:59:58.691Z"
    },
    {
      "partId": "part_3_d1579090",
      "uploadId": "upl_checkout_assets",
      "partNumber": 3,
      "offsetBytes": 2097152,
      "sizeBytes": 1048576,
      "status": "completed",
      "uploadedBytes": 1048576,
      "progressPercentage": 100,
      "etag": "\"2c05ac838fecf0b9c4166f96\"",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Mixed five-megabyte parts
GET /api/file-uploads/parts?uploadId=upl_demo&count=10
{
  "data": [
    {
      "partId": "part_1_958016cf",
      "uploadId": "upl_demo",
      "partNumber": 1,
      "offsetBytes": 0,
      "sizeBytes": 5242880,
      "status": "uploading",
      "uploadedBytes": 3550782,
      "progressPercentage": 67.73,
      "etag": null,
      "checksum": null,
      "error": null,
      "updatedAt": "2026-07-29T23:59:59.298Z"
    },
    {
      "partId": "part_2_078f248a",
      "uploadId": "upl_demo",
      "partNumber": 2,
      "offsetBytes": 5242880,
      "sizeBytes": 5242880,
      "status": "pending",
      "uploadedBytes": 0,
      "progressPercentage": 0,
      "etag": null,
      "checksum": null,
      "error": null,
      "updatedAt": "2026-07-29T23:59:58.266Z"
    },
    {
      "partId": "part_3_5790902c",
      "uploadId": "upl_demo",
      "partNumber": 3,
      "offsetBytes": 10485760,
      "sizeBytes": 5242880,
      "status": "failed",
      "uploadedBytes": 623925,
      "progressPercentage": 11.9,
      "etag": null,
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}

About this API

Coverage & behavior

Generates fictional file upload fixtures for progress components, multipart tables and storage workflow tests. Session state is internally coherent: initiated uploads have zero bytes, completed uploads have every byte and part, and failed or expired sessions carry an error while never exposing a download URL. Checksums and download URLs exist only after completion.

Single uploads always have one part. Multipart sessions have 2–10 parts whose nominal size stays between 1 KiB and 10 MiB, matching the accepted /parts range; an explicitly multipart total below 2 KiB is rejected. completedParts never exceeds partCount, and uploadedBytes never exceeds sizeBytes. Progress is calculated from those exact byte counts rather than sampled independently. The resolved asOf clock defaults to the current UTC day's end and is echoed so seeded timestamps can be replayed.

/parts emits sequential part records for one validated upload id. partNumber is recordIndex + 1, offsets are exact multiples of partSizeBytes, and completed parts alone receive an ETag and checksum. Filenames are generic, URLs use example.com, and no signed query strings, tokens, local paths, user names or original customer filenames are generated.

Use it for

  • Populate upload progress and retry interfaces with coherent lifecycle states
  • Test multipart offset and part-number arithmetic at exact byte sizes
  • Build completed-upload fixtures without real files, paths or signed URLs

Frequently asked questions

Does progress match uploadedBytes?

Yes. progressPercentage is calculated directly from uploadedBytes and sizeBytes; only completed records report 100.

When are checksums and download URLs present?

Session checksum and downloadUrl are present only for completed uploads. Other states return both fields as null.

Are multipart offsets sequential?

Yes. The parts route uses partNumber minus one multiplied by partSizeBytes, so records form a contiguous fixed-size sequence.

Can generated URLs contain real access tokens?

No. URLs use the safe example.com domain and never include signatures, credentials or query tokens.