I have been trying to use the API to query the database and find all medias with a specific mediaType/mimeType.
i have tried multiple variations of this kind of line:
$response = $this->api->search('media', ['mime_type' => "application/pdf"])->getContent();
But I have not been able to reach a point where this line would thrown the expected medias, I always get the same medias, not limited to PDF, as if the array was not considered. Based on the rest API doc I understand that MIME type might not be a search critera but I am then wondering what is the best way to get all PDF files from the database.
I believe I could rely on a SQL query, but I would prefer using the API if there is any way to do it.