1.8 Alpha 2 - Retrieve Media With Matching Tags

I see that the bug about adding tags has been fixed. Does this also apply to adding tags via the API? As we still do not seem to be able to add tags to media via the API. I get a response back with a blank array for the tags, when I try in Postman.

I am also wondering, how does one look up media based on a tag or multiple tags (both on the media having multiple tags and also search for multiple tags.) I tried the swagger file and also the online HTML Temple documentation file, however I did not see anything documented. Is it possible to retrieve media via the API based on tags?

Can you check in your UI first and make sure they work there? I’ve double checked here and they do for me.

The API calls should be the same, i.e. a tags string as per the API doc - although I must confess I haven’t tested the API call for myself.

If you can confirm that it is working in your UI and not in your API then I will run some further testing ASAP.



I check in the UI of the CMS and it is not recording tags for us on media. We also check lktagmedia and do not see anything recorded there. (I think that is where that would end up) They DO work on layouts in the CMS. Sorry, we did not test that via the API.

Postman shot below:

That bug is fixed in alpha3, right? I’ve assumed you are running the latest develop code - but perhaps not?

I’ve been over it several times now and I am sure it is working in the latest develop code.


We are using the dev code from 4 days ago. Maybe an issue in running on Windows?

Ah, sorry - my fault. It’s not merged into the main repository yet. I’ll do that as soon as I can (need to jiggle a few things first)

I was wondering how it could not be working after it was fixed. Thank you. We will circle back to this again once we reloaded things again.

Applying tags in Alpha3 is working via the API now. I do not see how to look media up based on tags yet.

Any suggestions? Would it be:
Method: GET
Path: /library
Parameters: tags (String) Comma separated if wanting to match multiple tags? Would spaces after commas matter?

Update: We also tried Parameters: tags (array), Still no dice. I know it is possible, the media filter tells me so, and I see in lib/controller/library.php:

‘tags’ => $this->getSanitizer()->getString(‘tags’),

Update 2: Works via postman, so you can close this. I also found that you can search for multiple tags using comma separated values. :smiley:

1 Like

Yup, comma separated values should work fine - i’m glad this is working.

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.