private ResourceInstance createResource(String widgetLayoutId) {
    Map<Resource.Type,String> mapIds = new HashMap<>();
    mapIds.put(Resource.Type.WidgetLayout, widgetLayoutId);
    mapIds.put(Resource.Type.Cluster, clusterName);
    return createResource(Resource.Type.WidgetLayout, mapIds);
  }
Handles URL: /widget_layouts
Get all instances for a view.

@param headers  http headers
@param ui       uri info

@return instance collection resource representation
ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetLayoutService.java