1. Create an API without visibility=Public parameter.
2. Go to the publisher ---> Edit --------> update API
3. Now you will end up with Null pointer exception.
The reason for the issue is when we create without visibility, api manager database going to update with visibility "Public" (default value). But registry going to be update with visibility as empty.
If the visibility is not present in the REST call , we should set the default value as public.