ورود | ثبت نام
  • FA
  • EN

API Docs

GET /api/v1/media/{media-id}

Downloads a media file by its ID.

No authentication required.


Permissions

You must have view permission for the target attachable resource (except the ones that are accessible without authentication).

Sensitive media. A media row uploaded with a purpose (see POST /api/v1/media) is a private document and is never served publicly, regardless of what it is attached to. Access is decided per purpose, and any purpose without an explicit rule is denied:

PurposeWho may download
trainer_licenseThe user the license belongs to, or a holder of users.view_all
gym_licenseThe gym's owner (user_id), or a holder of gyms.view_all

Anyone else — including anonymous callers — gets 403.


URL Parameters

NameTypeRequiredDescriptionExample
media-idintYesID of the media to download123

Request Example

GET /api/v1/media/123
Authorization: Bearer {token}

Response

200 OK

The media file will be returned as a binary download.


Error Responses

StatusDescriptionReference
401UnauthorizedAuthentication error
403Forbidden (no permission)Permission error
404Not foundNot-found error
Dambel

دمبل، دنیای هوشمند ورزش و تغذیه

LinkedinInstagramXYoutubeTelegramGitHub