docs: private void publishApis() throws StorageException {
          logger.info(Messages.i18n.format("StorageExporter.PublishingApis")); //$NON-NLS-1$
  
          try {
              for (EntityInfo info : apisToPublish) {
                  logger.info(Messages.i18n.format("StorageExporter.PublishingApi", info)); //$NON-NLS-1$
                  ApiVersionBean versionBean = storage.getApiVersion(info.organizationId, info.id, info.version);
  
                  Api gatewayApi = new Api();
                  gatewayApi.setEndpoint(versionBean.getEndpoint());
                  gatewayApi.setEndpointType(versionBean.getEndpointType().toString());
                  gatewayApi.setEndpointProperties(versionBean.getEndpointProperties());
                  gatewayApi.setOrganizationId(versionBean.getApi().getOrganization().getId());
                  gatewayApi.setApiId(versionBean.getApi().getId());
                  gatewayApi.setVersion(versionBean.getVersion());
                  gatewayApi.setPublicAPI(versionBean.isPublicAPI());
                  gatewayApi.setParsePayload(versionBean.isParsePayload());
                  if (versionBean.isPublicAPI()) {
                      List<Policy> policiesToPublish = new ArrayList<>();
                      Iterator<PolicyBean> apiPolicies = storage.getAllPolicies(info.organizationId,
                              info.id, info.version, PolicyType.Api);
                      while (apiPolicies.hasNext()) {
                          PolicyBean apiPolicy = apiPolicies.next();
                          Policy policyToPublish = new Policy();
                          policyToPublish.setPolicyJsonConfig(apiPolicy.getConfiguration());
                          policyToPublish.setPolicyImpl(apiPolicy.getDefinition().getPolicyImpl());
                          policiesToPublish.add(policyToPublish);
                      }
                      gatewayApi.setApiPolicies(policiesToPublish);
                  }
  
                  // Publish the api to all relevant gateways
                  Set<ApiGatewayBean> gateways = versionBean.getGateways();
                  if (gateways == null) {
                      throw new RuntimeException("No gateways specified for api!"); //$NON-NLS-1$
                  }
                  for (ApiGatewayBean apiGatewayBean : gateways) {
                      IGatewayLink gatewayLink = createGatewayLink(apiGatewayBean.getGatewayId());
                      gatewayLink.publishApi(gatewayApi);
                  }
              }
          } catch (Exception e) {
              throw new RuntimeException(e);
          }
      }