Return information about gallery entry

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

Return information about gallery entry

Path parameters

  • sku string Required
  • entryId integer Required

Responses

  • 200

    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
      • base64_encoded_data string Required

        Media data (base64 encoded content)

      • type string Required

        MIME type

      • name string Required

        Image name

    • extension_attributes object

      ExtensionInterface class for @see \Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface

      Hide extension_attributes attribute Show extension_attributes attribute object
      • video_content object

        Video Content data interface

        Hide video_content attributes Show video_content attributes object
        • media_type string Required

          MIME type

        • video_provider string Required

          Provider

        • video_url string Required

          Video URL

        • video_title string Required

          Title

        • video_description string Required

          Video Description

        • video_metadata string Required

          Metadata

  • 400

    400 Bad Request

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Error details

      Hide errors attributes Show errors attributes object
      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Error parameters item

        Hide parameters attributes Show parameters attributes object
        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Error parameters item

      Hide parameters attributes Show parameters attributes object
      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

  • default

    Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Error details

      Hide errors attributes Show errors attributes object
      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Error parameters item

        Hide parameters attributes Show parameters attributes object
        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Error parameters item

      Hide parameters attributes Show parameters attributes object
      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

GET /V1/products/{sku}/media/{entryId}
curl \
 --request 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"
}