Skip to content

PATCH /media/

Update Media

PATCH
/media/{media_key}

Replace the file content for an existing media record.

Looks up the Media document by media_key, overwrites the file at
{media_root}/{media_key} with the new upload, and updates the Media
document fields (name, size, content_type). Returns 404 if no media
record exists for the given key.

Emits: (direct transaction — no event class)

Required scope: attachment:media:upload

Authorizations

OAuth2PasswordBearer
password Flow
Token URL"/api/auth"
Scopes:
  • "admin"User can access and edit users and system settings
  • "library"User can access and edit products
  • "production"User can access and edit production plans
  • "operator"User can access the operator panel and make production declarations

Parameters

Path Parameters

media_key*
Type
string
Required

Request Body

multipart/form-data
object

Responses

Successful Response

application/json
JSON
{
  
"status": 200,
  
"message": "string",
  
"detail": "string"
}

Samples

Powered by VitePress OpenAPI