// -------------------------------------------------------------------------
 @GET
 @Path("exchanges")
 public Response search(
     @QueryParam("versionAsOf") String versionAsOf,
     @QueryParam("correctedTo") String correctedTo,
     @QueryParam("id") List<String> externalIdStrs) {
   final VersionCorrection vc = VersionCorrection.parse(versionAsOf, correctedTo);
   final ExternalIdBundle bundle = ExternalIdBundle.parse(externalIdStrs);
   Collection<? extends Exchange> result = getExchangeSource().getExchanges(bundle, vc);
   return responseOkFudge(FudgeListWrapper.of(result));
 }
 @GET
 @Path("exchanges/{exchangeId}")
 public Response get(
     @PathParam("exchangeId") String idStr,
     @QueryParam("version") String version,
     @QueryParam("versionAsOf") String versionAsOf,
     @QueryParam("correctedTo") String correctedTo) {
   final ObjectId objectId = ObjectId.parse(idStr);
   if (version != null) {
     final Exchange result = getExchangeSource().getExchange(objectId.atVersion(version));
     return responseOkFudge(result);
   } else {
     final VersionCorrection vc = VersionCorrection.parse(versionAsOf, correctedTo);
     Exchange result = getExchangeSource().getExchange(objectId, vc);
     return responseOkFudge(result);
   }
 }