CycleCore Docs
API publiqueReference APIEndpoints

Lister les medias

GET
/public/v1/media

Retourne les medias publics de l'organisation rattachee a la cle API.

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

page?integer

Page de resultats.

perPage?integer

Nombre maximum d'elements par page.

q?string

Terme de recherche libre lorsque le endpoint le supporte.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/public/v1/media"
[  {    "id": "med_123",    "slug": "tshirt-black-front",    "originalName": "tshirt-black-front.jpg",    "type": "IMAGE",    "category": "product-image",    "mediaUrl": "https://cdn.cyclecoreapp.com/media/tshirt-black-front.jpg",    "thumbnailUrl": "https://cdn.cyclecoreapp.com/media/tshirt-black-front-thumb.jpg",    "updatedAt": "2019-08-24T14:15:22Z"  }]
{  "statusCode": 401,  "message": "Cle API invalide.",  "error": "Unauthorized"}
{  "statusCode": 401,  "message": "Cle API invalide.",  "error": "Unauthorized"}
{  "statusCode": 401,  "message": "Cle API invalide.",  "error": "Unauthorized",  "code": "PUBLIC_API_RATE_LIMIT_EXCEEDED",  "retryAfter": 60}