Actions778
- Acl Role Actions
- App Actions
- App Action Button Actions
- App Administration Snippet Actions
- App Cms Block Actions
- App Flow Action Actions
- App Flow Event Actions
- App Payment Method Actions
- App Script Condition Actions
- App Shipping Method Actions
- App Template Actions
- Category Actions
- Cms Block Actions
- Cms Page Actions
- Cms Section Actions
- Cms Slot Actions
- Country Actions
- Country State Actions
- Currency Actions
- Currency Country Rounding Actions
- Custom Entity Actions
- Custom Field Actions
- Custom Field Set Actions
- Custom Field Set Relation Actions
- Customer Actions
- Customer Address Actions
- Customer Group Actions
- Customer Recovery Actions
- Customer Wishlist Actions
- Customer Wishlist Product Actions
- Delivery Time Actions
- Document Actions
- Document Base Config Actions
- Document Base Config Sales Channel Actions
- Document Type Actions
- Flow Actions
- Flow Sequence Actions
- Flow Template Actions
- Import Export File Actions
- Import Export Log Actions
- Import Export Profile Actions
- Integration Actions
- Landing Page Actions
- Language Actions
- Locale Actions
- Log Entry Actions
- Mail Header Footer Actions
- Mail Template Actions
- Mail Template Type Actions
- Main Category Actions
- Media Actions
- Media Default Folder Actions
- Media Folder Actions
- Media Folder Configuration Actions
- Media Thumbnail Actions
- Media Thumbnail Size Actions
- Newsletter Recipient Actions
- Notification Actions
- Number Range Actions
- Number Range Sales Channel Actions
- Number Range State Actions
- Number Range Type Actions
- Order Actions
- Order Customer Actions
- Order Delivery Actions
- Order Delivery Position Actions
- Order Line Item Actions
- Order Line Item Download Actions
- Order Transaction Actions
- Order Transaction Capture Actions
- Order Transaction Capture Refund Actions
- Order Transaction Capture Refund Position Actions
- Payment Method Actions
- Plugin Actions
- Product Actions
- Product Configurator Setting Actions
- Product Cross Selling Actions
- Product Cross Selling Assigned Products Actions
- Product Download Actions
- Product Export Actions
- Product Feature Set Actions
- Product Keyword Dictionary Actions
- Product Manufacturer Actions
- Product Media Actions
- Product Price Actions
- Product Review Actions
- Product Search Config Actions
- Product Search Config Field Actions
- Product Search Keyword Actions
- Product Sorting Actions
- Product Stream Actions
- Product Stream Filter Actions
- Product Visibility Actions
- Promotion Actions
- Promotion Discount Actions
- Promotion Discount Prices Actions
- Promotion Individual Code Actions
- Promotion Sales Channel Actions
- Promotion Setgroup Actions
- Property Group Actions
- Property Group Option Actions
- Rule Actions
- Rule Condition Actions
- Sales Channel Actions
- Sales Channel Analytics Actions
- Sales Channel Domain Actions
- Sales Channel Type Actions
- Salutation Actions
- Scheduled Task Actions
- State Machine Transition Actions
- System Config Actions
- Tag Actions
- Tax Actions
- Tax Provider Actions
- Tax Rule Actions
- Tax Rule Type Actions
- Theme Actions
- Unit Actions
- User Actions
- User Access Key Actions
- User Config Actions
- User Recovery Actions
- Webhook Actions
- Webhook Event Log Actions
- System Info Health Check Actions
- Bulk Operations Actions
- Document Management Actions
- Asset Management Actions
- Mail Operations Actions
- System Operations Actions
- Customer Impersonation Actions
- Order Management Actions
- Order Address Actions
- Authorization Authentication Actions
Media → Update Media
AI-generatedOverview
The 'Update Media' operation in the Media resource allows users to update various attributes and related entities of a media item in the Shopware system. This operation is useful for scenarios where media metadata, associations, or configurations need to be modified, such as updating file details, changing media folder assignments, or modifying linked entities like tags, categories, and product associations.
Use Case Examples
- Updating the file name and size of a media item.
- Changing the media folder of an existing media file.
- Modifying associated tags or categories for a media item.
Properties
| Name | Meaning |
|---|---|
| Id | Identifier for the media, required to specify which media item to update. |
| Response | Data format for response, used as a query parameter to specify response format. |
| User Id | Identifier of the user associated with the media. |
| Media Folder Id | Identifier of the media folder to which the media belongs. |
| Mime Type | MIME type of the media file. |
| File Extension | File extension of the media file. |
| Uploaded At | Timestamp when the media was uploaded. |
| File Name | Name of the media file. |
| File Size | Size of the media file in bytes. |
| Meta Data | Additional metadata for the media, provided as JSON. |
| Media Type | Type of media, provided as JSON. |
| Config | Configuration settings for the media, provided as JSON. |
| Alt | Alternative text for the media. |
| Title | Title of the media. |
| Url | URL of the media, a runtime field not used as part of criteria. |
| Path | Path of the media file. |
| Has File | Boolean indicating if the media has an associated file, runtime field. |
| Private | Boolean indicating if the media is private. |
| Custom Fields | Custom fields for the media, provided as JSON. |
| Created At | Timestamp when the media was created. |
| Updated At | Timestamp when the media was last updated. |
| Translated | Translated fields for the media, provided as JSON. |
| Extensions | Extensions related to the media, provided as JSON. |
| Tags | Tags associated with the media, provided as JSON. |
| Thumbnails | Thumbnails related to the media, provided as JSON. |
| User | User entity associated with the media, provided as JSON. |
| Categories | Categories associated with the media, provided as JSON. |
| Product Manufacturers | Product manufacturers linked to the media, provided as JSON. |
| Product Media | Product media associations, provided as JSON. |
| Product Downloads | Product downloads linked to the media, provided as JSON. |
| Order Line Item Downloads | Order line item downloads associated with the media, provided as JSON. |
| Avatar Users | Avatar users linked to the media, provided as JSON. |
| Media Folder | Media folder entity associated with the media, provided as JSON. |
| Property Group Options | Property group options related to the media, provided as JSON. |
| Mail Template Media | Mail template media associations, provided as JSON. |
| Document Base Configs | Document base configurations linked to the media, provided as JSON. |
| Shipping Methods | Shipping methods associated with the media, provided as JSON. |
| Payment Methods | Payment methods linked to the media, provided as JSON. |
| Product Configurator Settings | Product configurator settings related to the media, provided as JSON. |
| Order Line Items | Order line items associated with the media, provided as JSON. |
| Cms Blocks | CMS blocks linked to the media, provided as JSON. |
| Cms Sections | CMS sections associated with the media, provided as JSON. |
| Cms Pages | CMS pages linked to the media, provided as JSON. |
| Documents | Documents associated with the media, provided as JSON. |
| App Payment Methods | App payment methods linked to the media, provided as JSON. |
| App Shipping Methods | App shipping methods associated with the media, provided as JSON. |
Output
JSON
id- Identifier of the updated media itemuserId- Identifier of the user associated with the mediamediaFolderId- Identifier of the media foldermimeType- MIME type of the media filefileExtension- File extension of the media fileuploadedAt- Timestamp when the media was uploadedfileName- Name of the media filefileSize- Size of the media file in bytesmetaData- Additional metadata of the mediamediaType- Type of the mediaconfig- Configuration settings of the mediaalt- Alternative text for the mediatitle- Title of the mediaurl- URL of the mediapath- Path of the media filehasFile- Boolean indicating if the media has an associated fileprivate- Boolean indicating if the media is privatecustomFields- Custom fields of the mediacreatedAt- Timestamp when the media was createdupdatedAt- Timestamp when the media was last updatedtranslated- Translated fields of the mediaextensions- Extensions related to the mediatags- Tags associated with the mediathumbnails- Thumbnails related to the mediauser- User entity associated with the mediacategories- Categories associated with the mediaproductManufacturers- Product manufacturers linked to the mediaproductMedia- Product media associationsproductDownloads- Product downloads linked to the mediaorderLineItemDownloads- Order line item downloads associated with the mediaavatarUsers- Avatar users linked to the mediamediaFolder- Media folder entity associated with the mediapropertyGroupOptions- Property group options related to the mediamailTemplateMedia- Mail template media associationsdocumentBaseConfigs- Document base configurations linked to the mediashippingMethods- Shipping methods associated with the mediapaymentMethods- Payment methods linked to the mediaproductConfiguratorSettings- Product configurator settings related to the mediaorderLineItems- Order line items associated with the mediacmsBlocks- CMS blocks linked to the mediacmsSections- CMS sections associated with the mediacmsPages- CMS pages linked to the mediadocuments- Documents associated with the mediaappPaymentMethods- App payment methods linked to the mediaappShippingMethods- App shipping methods associated with the media
Dependencies
- an API key credential
Troubleshooting
- Ensure the 'Id' property is provided and correctly identifies the media to update.
- Verify JSON fields are correctly formatted to avoid parsing errors.
- Check API credentials and permissions to ensure the update operation is authorized.
- Be aware that runtime fields like 'Url' and 'Has File' cannot be used as part of the update criteria.