@GET
  @Path("ddl/database/")
  @Produces(MediaType.APPLICATION_JSON)
  public Response listDatabases(@QueryParam("like") String dbPattern)
    throws HcatException, NotAuthorizedException, BusyException,
    BadParam, ExecuteException, IOException {
    verifyUser();

    HcatDelegator d = new HcatDelegator(appConf, execService);
    if (!TempletonUtils.isset(dbPattern)) {
      dbPattern = "*";
    }
    return d.listDatabases(getDoAsUser(), dbPattern);
  }
List all databases, or those that match a pattern.
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Server.java