HydraCore
API by router

Website media

List Media

GET
/v1/website/{config_id}/media

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

config_id*Config Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://example.com/v1/website/497f6eca-6276-4993-bfeb-53cbbbba6f08/media'
Example Response
[  {    "alt_text": "string",    "content_type": "string",    "created_at": "2019-08-24T14:15:22Z",    "filename": "string",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "metadata_json": {},    "size_bytes": 0,    "variants": {},    "website_config_id": "c0aa0662-77a9-4227-8f52-c7a29b8a3ad3"  }]

Upload Media

POST
/v1/website/{config_id}/media

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

config_id*Config Id
Formatuuid

Query Parameters

alt_text?|null

Header Parameters

X-Api-Key?string|null

Request Body

multipart/form-data
  1. body
file*File
Formatbinary

Response Body

Successful Response

application/json
  1. response
alt_text?string|null
content_type*Content Type
created_at*Created At
Formatdate-time
filename*Filename
id*Id
Formatuuid
metadata_json?
Default{}
size_bytes*Size Bytes
variants?
Default{}
website_config_id*Website Config Id
Formatuuid
Example Request
curl -X POST 'https://example.com/v1/website/497f6eca-6276-4993-bfeb-53cbbbba6f08/media' \  -F 'file=string'
Example Response
{  "alt_text": "string",  "content_type": "string",  "created_at": "2019-08-24T14:15:22Z",  "filename": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "metadata_json": {},  "size_bytes": 0,  "variants": {},  "website_config_id": "c0aa0662-77a9-4227-8f52-c7a29b8a3ad3"}

Get Media

GET
/v1/website/{config_id}/media/{media_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

config_id*Config Id
Formatuuid
media_id*Media Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
alt_text?string|null
content_type*Content Type
created_at*Created At
Formatdate-time
filename*Filename
id*Id
Formatuuid
metadata_json?
Default{}
size_bytes*Size Bytes
variants?
Default{}
website_config_id*Website Config Id
Formatuuid
Example Request
curl -X GET 'https://example.com/v1/website/497f6eca-6276-4993-bfeb-53cbbbba6f08/media/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "alt_text": "string",  "content_type": "string",  "created_at": "2019-08-24T14:15:22Z",  "filename": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "metadata_json": {},  "size_bytes": 0,  "variants": {},  "website_config_id": "c0aa0662-77a9-4227-8f52-c7a29b8a3ad3"}

Delete Media

DELETE
/v1/website/{config_id}/media/{media_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

config_id*Config Id
Formatuuid
media_id*Media Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

Example Request
curl -X DELETE 'https://example.com/v1/website/497f6eca-6276-4993-bfeb-53cbbbba6f08/media/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
Empty