Media
Media object
The Media object enables vendors to add, view, or delete media from the product object.
The name of the media object.
Example: "Office 365 Product Image"
The description of the media object.
Example: "An image of Office 365 which is available to purchase within the Microsoft 365 Online Services product"
The type of the media object.
The URI to access media object.
Example: "https://address.to.media.file.pl/abcde.png"
Media object order on list.
Example: "100"
Example:
{
"id": "PRD-1111-1111-1111",
"href": "/catalog/products/PRD-1111-1111-1111",
"name": "Microsoft Office 365 NCE",
"icon": "/static/PRD-1111-1111-1111/logo.png"
}
Example:
{
"created": { "at": "...", "by": { } },
"updated": { "at": "...", "by": { } }
}
Example
Media States
The following diagram shows the possible states for the media object in the Marketplace Platform and the transition between these states:
The documentation object is being created by the vendor.
It is not visible to clients yet in the marketplace.
The vendor has submitted the documentation object to SoftwareOne Operations for review and publishing.
The media object is visible in the marketplace.
The media object is not visible in the marketplace.
The media object no longer exists.
It's no longer part of the product definition and can't be used.
Create Product Media
Create new media for a product.
mediaobjectoptionalJson representation of the media
filestring ยท binaryoptional
curl -L \
--request POST \
--url 'https://api.platform.softwareone.com/public/v1/products/{productId}/media' \
--header 'Content-Type: multipart/form-data' \
--form 'media=[object Object]' \
--form 'file=binary'
{
"domainEvents": [],
"markedForDelete": true,
"mediaId": {},
"fileId": {},
"url": "text",
"displayOrder": {},
"status": {},
"isDeleted": true
}
Get Product Media
Get an item of media for a product.
curl -L \
--url 'https://api.platform.softwareone.com/public/v1/products/{productId}/media/{id}'
{
"id": "text",
"audit": {},
"$meta": {},
"href": "text",
"name": "text",
"type": "text",
"description": "text",
"status": "text",
"filename": "text",
"size": 1,
"contentType": "text",
"displayOrder": 1,
"url": "text",
"product": {}
}
List Product Media
Get a list of media for a product.
curl -L \
--url 'https://api.platform.softwareone.com/public/v1/products/{productId}/media'
{
"$meta": {},
"data": [
{
"id": "text",
"audit": {},
"$meta": {},
"href": "text",
"name": "text",
"type": "text",
"description": "text",
"status": "text",
"filename": "text",
"size": 1,
"contentType": "text",
"displayOrder": 1,
"url": "text",
"product": {}
}
]
}
Update Media
Update the media for a product.
Body
hrefstringread-onlyoptional
descriptionstringoptional
sizeinteger ยท int32optional
contentTypestringoptional
displayOrderinteger ยท int32optional
curl -L \
--request PUT \
--url 'https://api.platform.softwareone.com/public/v1/products/{productId}/media/{id}' \
--header 'Content-Type: application/json' \
--data '{
"id": "text",
"audit": {},
"$meta": {},
"name": "text",
"type": "text",
"description": "text",
"status": "text",
"filename": "text",
"size": 1,
"contentType": "text",
"displayOrder": 1,
"url": "text",
"product": {}
}'
Publish Media
Publish an item of media for a product.
curl -L \
--request POST \
--url 'https://api.platform.softwareone.com/public/v1/products/{productId}/media/{id}/publish'
{
"id": "text",
"audit": {},
"$meta": {},
"href": "text",
"name": "text",
"type": "text",
"description": "text",
"status": "text",
"filename": "text",
"size": 1,
"contentType": "text",
"displayOrder": 1,
"url": "text",
"product": {}
}
Unpublish Media
Unpublish an item of media for a product.
curl -L \
--request POST \
--url 'https://api.platform.softwareone.com/public/v1/products/{productId}/media/{id}/unpublish'
{
"id": "text",
"audit": {},
"$meta": {},
"href": "text",
"name": "text",
"type": "text",
"description": "text",
"status": "text",
"filename": "text",
"size": 1,
"contentType": "text",
"displayOrder": 1,
"url": "text",
"product": {}
}
Mark Media For Review
Mark an item of media for a product for review.
curl -L \
--request POST \
--url 'https://api.platform.softwareone.com/public/v1/products/{productId}/media/{id}/review'
{
"id": "text",
"audit": {},
"$meta": {},
"href": "text",
"name": "text",
"type": "text",
"description": "text",
"status": "text",
"filename": "text",
"size": 1,
"contentType": "text",
"displayOrder": 1,
"url": "text",
"product": {}
}
Delete Media
Delete an item of media for a product.
curl -L \
--request DELETE \
--url 'https://api.platform.softwareone.com/public/v1/products/{productId}/media/{id}'