Return information about gallery entry

GET /V1/products/{sku}/media/{entryId}

Return information about gallery entry

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
  • 400 Bad Request

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Hide parameters attributes Show parameters attributes object

        Error parameters item

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object

      Error parameters item

    • trace string

      Stack trace

  • 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

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Hide parameters attributes Show parameters attributes object

        Error parameters item

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object

      Error parameters item

    • trace string

      Stack trace

GET /V1/products/{sku}/media/{entryId}
curl \
 -X GET https://magento2.winkelstraat.mac/rest/all/V1/products/{sku}/media/{entryId}
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 (400)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "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"
}