Try our conversational search powered by Generative AI!

Import assets using ServiceApi

Vote:
 

I'm looking at importing assets like images usings the Service API from external system. I've looked at the media and linking services

Media service (optimizely.com)

Catalog asset linking service (optimizely.com)

They are both for bulk operations. Do anyone know if there is any other way to do that one by one for product / asset (image) so that we can create out content types in the same loop.

Also, using the Service API there seem to be a "AssetKey" that is needed when dealing with assets. For example when we would like to check if an asset already exists. This assetkey doesnt exist in the external system, so my questions is. Is there any other way to check if an asset already exists?

#312817
Nov 20, 2023 8:56
Vote:
 

yes you can import a data file that contains just one asset. you can certainly create new api to upload file one by one

assetkey is basically the guid of the asset (as a content). there is no other way to ensure uniqueness. you can check for same asset name of same type in the same folder, but it's not completely bullet proof. only the assetkey is 

#312818
Nov 20, 2023 9:17
Stellan - Nov 21, 2023 8:23
Can you point me into the right direction regarding importing files one by one or do you refer to implementing a custom api endpoint to support this?
Vote:
 

ServiceAPI is just a RESTful endpoint. You can add additional API (with similar route if you like). It's a simple ApiController action that takes a file and maybe a path for where you want to put it.

If you already have import files that each contain just one asset, you can create an automated job to import them sequentially, no ?

#312885
Nov 21, 2023 9:26
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.