How to control API Product visibility for particular users programmatically

Hi all,

Is there a possibility to hide some private API Products from some authorised users and control it programmatically?

As I understand currently all authorised users can see all API Products. I want users to see only those API products that they are attached to(have app and api-key) however from what I read in the docs it's not possible to enable such logic. So it seems I have to use audiences to control product visibility. The problem is that the number of users and products is too big so I want to write a script to add the users to different audiences based on the product they use but i can't find the API to assign users to the audience.

Please help me how can I make users to see only those API products that they actually use.

0 3 173
3 REPLIES 3

I'm not sure I follow. You want to add users to an audience based on the product they use, but you always want to restrict the products the users can see. I'm assuming the user need to register for a product in the first place? Or is this question in context of setting this up for the first time and you're looking to migrate existing users to a privileged audience?

There's no management API for managing audiences unfortunately. 

 

Perhaps my explanation was a bit messed up. Yes I want to restrict the products the users can see.  I want to make API product visible for only those users who have developer app credentials connected to the product(have access by api-key). Is there any possibility how can I achieve this? Currently all authorized users can see all API Products in API portal and this behavior is not what I expect.
I tried to achieve this by using audiences but as soon as it doesn't have an API it's not an option.

Today, there's no API to manage audiences.

Creating an audience for individual API products doesn't sound correct since you'll end up creating as many audiences as you have API products and that's not the intention of audiences (and there's a limit of 16 audiences). The intention of audiences is to create some grouping/segmentation of your consumers eg internal, external. or public and privileged..