Closed svanrintel closed 2 years ago
As a result, the update meta data button does not work correctly in Drupal (anymore)
Hi @svanrintel & @hixfield
This isn't an issue on the SDK itself but with the parameters that are being passed in the query within the Drupal plugin. Could you create this issue on Drupal.org? I've also notified our partners to have a look at this and see if they can resolve it.
Thanks!
Hi @TimBloembergen, thank you for your quick response.
I'm not sure if it is an issue in the Drupal module because the query parameter is used in the AssetBankManager L58 of this SDK. It is this query parameter that I can't find in the API documentation on https://bynder.docs.apiary.io/#reference/assets/asset-operations/retrieve-assets.
Also requesting /api/v4/media/?query=6923D63F-A12B-4760-BC2490707161E71E with Postman doesn't return the actual Bynder asset in the results. Instead it returns a list of the last 50 added Bynder assets I assume. /api/v4/media/?ids=6923D63F-A12B-4760-BC2490707161E71E does return the correct asset.
@svanrintel no worries!
The query
that you see is the variable, it can be filled with the actual parameters that we have available (listed in the docs). The use of the parameters is done like we've put in as an sample app:
Like so:
$query = [
'ids' => list_of_asset_ids_gohere
];
If you'd then run the request; $mediaListPromise = $assetBankManager->getMediaList($query);
You will be able to retrieve the assets that you requested by passing the ids in the query by using the ids
parameter. So this should be fixed if it's broken within the Drupal implementation.
The Bynder drupal module has an update metadata button to update the metadata of every Bynder asset used in Drupal. In this process the method 'getMediaList' is used where a list of Bynder asset IDs is passed into the 'query' parameter. Better would be to use the ids parameter for accurate results.
Also it happens that passing a Bynder asset id doesn't return the actual Bynder asset in the result list while it works when using the ids parameter.