Connection between Local development and Remote provider!

While working with the local server, when we fetch the filters and designs, they are fetched from remote providers. Can someone explain the link between them??

How can I set the visibility parameter to the remoteProviderURL?
This is doable, but how can I expect that remote provider responses are filtered according to the visibility parameter?

@theBeginner86
Here is the discuss!

You can add the support in Meshery Server to send the selected visibility to remote provider as a query param (very similar to how we are doing for page, pagesize etc).

Also, it’s not necessary that a remote provider would have an implementation for that. But since it’s a query param so if remote provider listens to it then we can be sure that it would return the results based on visibility . And if it doesn’t then it’s a shot coming of that remote provider not Meshery.
Moreover, you can have an additional conditional check to only send the visibility param when the remote provider supports meshery-patterns-catalog (or meshery-filters-catalog) capability. Like this it would be dynamic and would involve less assumption. So, it would only supply this param when it’s supported by the remote provider.

Currently, Layer5 Cloud is the default remote provider that is available to all Meshery users. So, you’d have to update its GetPatterns handler (https://meshery.layer5.io/system/api/docs#tag/content/operation/GetPatterns) to support this new param. Then make sure to generate the new docs for this update.
Similarly, other remote providers might support this param (or not if they want to opt out of supporting catalog / workspaces for their users) but if they do then it would be documented in their API docs and Meshery would get the filtered results based on that visibility param