aa487ff67c04e2961d0ff4b5ba1d4568fa1d6f17 hiram Fri Mar 15 15:51:40 2019 -0700 now using source tree version tag and alpha install rule to cgi-bin-api and cleaned up html errors refs #18869 diff --git src/hg/hubApi/apiUtils.c src/hg/hubApi/apiUtils.c index 000290e..1b14c36 100644 --- src/hg/hubApi/apiUtils.c +++ src/hg/hubApi/apiUtils.c @@ -12,31 +12,31 @@ struct jsonWrite *jw = apiStartOutput(); jsonWriteString(jw, "error", errMsg); jsonWriteObjectEnd(jw); fputs(jw->dy->string,stdout); exit(0); } struct jsonWrite *apiStartOutput() /* begin json output with standard header information for all requests */ { time_t timeNow = time(NULL); // struct tm tm; // gmtime_r(&timeNow, &tm); struct jsonWrite *jw = jsonWriteNew(); jsonWriteObjectStart(jw, NULL); -jsonWriteString(jw, "apiVersion", "0.1"); +jsonWriteString(jw, "apiVersion", "v"CGI_VERSION); jsonWriteString(jw, "source", "UCSantaCruz"); jsonWriteDateFromUnix(jw, "downloadTime", (long long) timeNow); jsonWriteNumber(jw, "downloadTimeStamp", (long long) timeNow); return jw; } int tableColumns(struct sqlConnection *conn, struct jsonWrite *jw, char *table) /* output the column names, and their MySQL data type, for the given table * return number of columns (aka 'fields') */ { jsonWriteListStart(jw, "columnNames"); struct sqlFieldInfo *fi, *fiList = sqlFieldInfoGet(conn, table); int columnCount = slCount(fiList); for (fi = fiList; fi; fi = fi->next)