Retrieve the list of gallery entries associated with given product

GET /V1/products/{sku}/media

Retrieve the list of gallery entries associated with given product

Path parameters

Responses

  • 200 Success.

    Hide response attributes Show response attributes object
    • id integer

      Gallery entry ID

    • media_type string Required

      Media type

    • label string Required

      Gallery entry alternative text

    • position integer Required

      Gallery entry position (sort order)

    • disabled boolean Required

      If gallery entry is hidden from product page

    • types array[string] Required

      Gallery entry image types (thumbnail, image, small_image etc)

    • file string

      File path

    • content object

      Image Content data interface

      Hide content attributes Show content attributes object
    • ExtensionInterface class for @see \Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface

      Hide extension_attributes attribute Show extension_attributes attribute object
  • Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Hide errors attributes Show errors attributes object
    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object
    • trace string

      Stack trace

GET /V1/products/{sku}/media
curl \
 -X GET https://magento2.winkelstraat.mac/rest/all/V1/products/{sku}/media
Response examples (200)
[
  {
    "id": 42,
    "media_type": "string",
    "label": "string",
    "position": 42,
    "disabled": true,
    "types": [
      "string"
    ],
    "file": "string",
    "content": {
      "base64_encoded_data": "string",
      "type": "string",
      "name": "string"
    },
    "extension_attributes": {
      "video_content": {
        "media_type": "string",
        "video_provider": "string",
        "video_url": "string",
        "video_title": "string",
        "video_description": "string",
        "video_metadata": "string"
      }
    }
  }
]
Response examples (default)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}