Skip to main content
PATCH
/
api
/
files
/
{id}
Update File
curl --request PATCH \
  --url https://dash.empirical.run/api/files/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "status": "<string>"
}
'
{
  "data": {
    "file": {
      "id": 123,
      "name": "<string>",
      "url": "<string>",
      "description": "<string>",
      "mime_type": "<string>",
      "size_bytes": 123,
      "status": "pending",
      "access_level": "<string>",
      "created_by": "<string>",
      "created_at": "<string>",
      "updated_at": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

API key from the Empirical dashboard.

Path Parameters

id
integer
required

File ID.

Required range: -9007199254740991 <= x <= 9007199254740991

Body

application/json

Fields to update.

name
string

New name for the resource.

description
string

Description for the resource.

status
string

Set to "uploaded" to confirm a pending upload.

Allowed value: "uploaded"

Response

Updated file.

data
object
required