@Test @Deprecated public void testGetWorkStatus() throws InterruptedException, ExecutionException, IOException { initNetwork(); WorkMgrTestUtils.uploadTestSnapshot(_networkName, _snapshotName, _networksFolder); final CompletableFuture<String> networkArg = new CompletableFuture<>(); WorkItem workItem = new WorkItem(_networkName, _snapshotName); Main.getWorkMgr().queueWork(workItem); Main.setAuthorizer( new Authorizer() { @Override public void authorizeContainer(String apiKey, String containerName) { assert Boolean.TRUE; } @Override public boolean isAccessibleNetwork( String apiKey, String containerName, boolean logError) { networkArg.complete(containerName); return true; } @Override public boolean isValidWorkApiKey(String apiKey) { return true; } }); _service.getWorkStatus( CoordConsts.DEFAULT_API_KEY, BatfishVersion.getVersionStatic(), workItem.getId().toString()); assertTrue(networkArg.isDone()); assertThat(networkArg.get(), equalTo(_networkName)); }
@POST @Path(CoordConsts.SVC_RSC_GET_WORKSTATUS) @Produces(MediaType.APPLICATION_JSON) @Deprecated public JSONArray getWorkStatus( @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey, @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion, @FormDataParam(CoordConsts.SVC_KEY_WORKID) String workId) { try { _logger.debugf("WMS:getWorkStatus %s\n", workId); checkStringParam(apiKey, "API key"); checkStringParam(clientVersion, "Client version"); checkStringParam(workId, "work id"); checkApiKeyValidity(apiKey); QueuedWork work = Main.getWorkMgr().getWork(UUID.fromString(workId)); if (work == null) { return failureResponse("work with the specified id does not exist or is not inaccessible"); } NetworkId networkId = work.getDetails().getNetworkId(); Optional<String> networkOpt = Main.getWorkMgr().getNetworkNames().stream() .filter( n -> Main.getWorkMgr() .getIdManager() .getNetworkId(n) .equals(Optional.of(networkId))) .findFirst(); checkArgument(networkOpt.isPresent(), "Invalid network ID: %s", networkId); checkNetworkAccessibility(apiKey, networkOpt.get()); String taskStr = BatfishObjectMapper.writeString(work.getLastTaskCheckResult()); return successResponse( new JSONObject() .put(CoordConsts.SVC_KEY_WORKSTATUS, work.getStatus().toString()) .put(CoordConsts.SVC_KEY_TASKSTATUS, taskStr)); } catch (IllegalArgumentException | AccessControlException e) { _logger.errorf("WMS:getWorkStatus exception: %s\n", e.getMessage()); return failureResponse(e.getMessage()); } catch (Exception e) { String stackTrace = Throwables.getStackTraceAsString(e); _logger.errorf("WMS:getWorkStatus exception: %s", stackTrace); return failureResponse(e.getMessage()); } }
WorkMgrService { @POST @Path(CoordConsts.SVC_RSC_GET_WORKSTATUS) @Produces(MediaType.APPLICATION_JSON) @Deprecated public JSONArray getWorkStatus( @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey, @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion, @FormDataParam(CoordConsts.SVC_KEY_WORKID) String workId) { try { _logger.debugf("WMS:getWorkStatus %s\n", workId); checkStringParam(apiKey, "API key"); checkStringParam(clientVersion, "Client version"); checkStringParam(workId, "work id"); checkApiKeyValidity(apiKey); QueuedWork work = Main.getWorkMgr().getWork(UUID.fromString(workId)); if (work == null) { return failureResponse("work with the specified id does not exist or is not inaccessible"); } NetworkId networkId = work.getDetails().getNetworkId(); Optional<String> networkOpt = Main.getWorkMgr().getNetworkNames().stream() .filter( n -> Main.getWorkMgr() .getIdManager() .getNetworkId(n) .equals(Optional.of(networkId))) .findFirst(); checkArgument(networkOpt.isPresent(), "Invalid network ID: %s", networkId); checkNetworkAccessibility(apiKey, networkOpt.get()); String taskStr = BatfishObjectMapper.writeString(work.getLastTaskCheckResult()); return successResponse( new JSONObject() .put(CoordConsts.SVC_KEY_WORKSTATUS, work.getStatus().toString()) .put(CoordConsts.SVC_KEY_TASKSTATUS, taskStr)); } catch (IllegalArgumentException | AccessControlException e) { _logger.errorf("WMS:getWorkStatus exception: %s\n", e.getMessage()); return failureResponse(e.getMessage()); } catch (Exception e) { String stackTrace = Throwables.getStackTraceAsString(e); _logger.errorf("WMS:getWorkStatus exception: %s", stackTrace); return failureResponse(e.getMessage()); } } }
WorkMgrService { @POST @Path(CoordConsts.SVC_RSC_GET_WORKSTATUS) @Produces(MediaType.APPLICATION_JSON) @Deprecated public JSONArray getWorkStatus( @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey, @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion, @FormDataParam(CoordConsts.SVC_KEY_WORKID) String workId) { try { _logger.debugf("WMS:getWorkStatus %s\n", workId); checkStringParam(apiKey, "API key"); checkStringParam(clientVersion, "Client version"); checkStringParam(workId, "work id"); checkApiKeyValidity(apiKey); QueuedWork work = Main.getWorkMgr().getWork(UUID.fromString(workId)); if (work == null) { return failureResponse("work with the specified id does not exist or is not inaccessible"); } NetworkId networkId = work.getDetails().getNetworkId(); Optional<String> networkOpt = Main.getWorkMgr().getNetworkNames().stream() .filter( n -> Main.getWorkMgr() .getIdManager() .getNetworkId(n) .equals(Optional.of(networkId))) .findFirst(); checkArgument(networkOpt.isPresent(), "Invalid network ID: %s", networkId); checkNetworkAccessibility(apiKey, networkOpt.get()); String taskStr = BatfishObjectMapper.writeString(work.getLastTaskCheckResult()); return successResponse( new JSONObject() .put(CoordConsts.SVC_KEY_WORKSTATUS, work.getStatus().toString()) .put(CoordConsts.SVC_KEY_TASKSTATUS, taskStr)); } catch (IllegalArgumentException | AccessControlException e) { _logger.errorf("WMS:getWorkStatus exception: %s\n", e.getMessage()); return failureResponse(e.getMessage()); } catch (Exception e) { String stackTrace = Throwables.getStackTraceAsString(e); _logger.errorf("WMS:getWorkStatus exception: %s", stackTrace); return failureResponse(e.getMessage()); } }  }
WorkMgrService { @POST @Path(CoordConsts.SVC_RSC_GET_WORKSTATUS) @Produces(MediaType.APPLICATION_JSON) @Deprecated public JSONArray getWorkStatus( @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey, @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion, @FormDataParam(CoordConsts.SVC_KEY_WORKID) String workId) { try { _logger.debugf("WMS:getWorkStatus %s\n", workId); checkStringParam(apiKey, "API key"); checkStringParam(clientVersion, "Client version"); checkStringParam(workId, "work id"); checkApiKeyValidity(apiKey); QueuedWork work = Main.getWorkMgr().getWork(UUID.fromString(workId)); if (work == null) { return failureResponse("work with the specified id does not exist or is not inaccessible"); } NetworkId networkId = work.getDetails().getNetworkId(); Optional<String> networkOpt = Main.getWorkMgr().getNetworkNames().stream() .filter( n -> Main.getWorkMgr() .getIdManager() .getNetworkId(n) .equals(Optional.of(networkId))) .findFirst(); checkArgument(networkOpt.isPresent(), "Invalid network ID: %s", networkId); checkNetworkAccessibility(apiKey, networkOpt.get()); String taskStr = BatfishObjectMapper.writeString(work.getLastTaskCheckResult()); return successResponse( new JSONObject() .put(CoordConsts.SVC_KEY_WORKSTATUS, work.getStatus().toString()) .put(CoordConsts.SVC_KEY_TASKSTATUS, taskStr)); } catch (IllegalArgumentException | AccessControlException e) { _logger.errorf("WMS:getWorkStatus exception: %s\n", e.getMessage()); return failureResponse(e.getMessage()); } catch (Exception e) { String stackTrace = Throwables.getStackTraceAsString(e); _logger.errorf("WMS:getWorkStatus exception: %s", stackTrace); return failureResponse(e.getMessage()); } }  @POST @Path(CoordConsts.SVC_RSC_AUTO_COMPLETE) @Produces(MediaType.APPLICATION_JSON) JSONArray autoComplete(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      /* Optional: not needed for some completions */
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_COMPLETION_TYPE) String completionType,
      @FormDataParam(CoordConsts.SVC_KEY_QUERY) String query,
      /* Optional */
      @FormDataParam(CoordConsts.SVC_KEY_MAX_SUGGESTIONS) String maxSuggestions); @POST @Path(CoordConsts.SVC_RSC_CHECK_API_KEY) @Produces(MediaType.APPLICATION_JSON) JSONArray checkApiKey(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion); @POST @Path(CoordConsts.SVC_RSC_CONFIGURE_ANALYSIS) @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.APPLICATION_JSON) JSONArray configureAnalysis(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_NEW_ANALYSIS) String newAnalysisStr,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysisName,
      @FormDataParam(CoordConsts.SVC_KEY_FILE) InputStream addQuestionsStream,
      @FormDataParam(CoordConsts.SVC_KEY_DEL_ANALYSIS_QUESTIONS) String delQuestions,
      @Nullable @FormDataParam(CoordConsts.SVC_KEY_SUGGESTED) Boolean suggested); @POST @Path(CoordConsts.SVC_RSC_CONFIGURE_QUESTION_TEMPLATE) @Produces(MediaType.APPLICATION_JSON) JSONArray configureQuestionTemplate(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_QUESTION) String questionTemplate,
      @Nullable @FormDataParam(CoordConsts.SVC_KEY_EXCEPTIONS) String exceptions,
      @Nullable @FormDataParam(CoordConsts.SVC_KEY_ASSERTION) String assertion); @POST @Path(CoordConsts.SVC_RSC_DEL_ANALYSIS) @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.APPLICATION_JSON) @Deprecated JSONArray delAnalysis(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysisName); @POST @Path(CoordConsts.SVC_RSC_DEL_NETWORK) @Produces(MediaType.APPLICATION_JSON) JSONArray delNetwork(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName); @POST @Path(CoordConsts.SVC_RSC_DEL_QUESTION) @Produces(MediaType.APPLICATION_JSON) @Deprecated JSONArray delQuestion(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_QUESTION_NAME) String questionName); @POST @Path(CoordConsts.SVC_RSC_DEL_SNAPSHOT) @Produces(MediaType.APPLICATION_JSON) @Deprecated JSONArray delSnapshot(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName); @POST @Path(CoordConsts.SVC_RSC_GET_ANALYSIS_ANSWER) @Produces(MediaType.APPLICATION_JSON) JSONArray getAnalysisAnswer(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_REFERENCE_SNAPSHOT_NAME) String referenceSnapshot,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysisName,
      @FormDataParam(CoordConsts.SVC_KEY_QUESTION_NAME) String questionName,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr /* optional */); @POST @Path(CoordConsts.SVC_RSC_GET_ANALYSIS_ANSWERS) @Produces(MediaType.APPLICATION_JSON) JSONArray getAnalysisAnswers(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_REFERENCE_SNAPSHOT_NAME) String referenceSnapshot,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysisName,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr /* optional */); @POST @Path(CoordConsts.SVC_RSC_GET_ANALYSIS_ANSWERS_METRICS) @Produces(MediaType.APPLICATION_JSON) JSONArray getAnalysisAnswersMetrics(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_REFERENCE_SNAPSHOT_NAME) String referenceSnapshot,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysisName,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_QUESTIONS)
          String analysisQuestionsStr /* optional */,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr /* optional */); @POST @Path(CoordConsts.SVC_RSC_GET_ANALYSIS_ANSWERS_ROWS) @Produces(MediaType.APPLICATION_JSON) JSONArray getAnalysisAnswersRows(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_REFERENCE_SNAPSHOT_NAME) String referenceSnapshot,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysisName,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_ANSWERS_OPTIONS) String answersRowsOptionsStr,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr /* optional */); @POST @Path(CoordConsts.SVC_RSC_GET_ANSWER) @Produces(MediaType.APPLICATION_JSON) JSONArray getAnswer(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_REFERENCE_SNAPSHOT_NAME) String referenceSnapshot,
      @FormDataParam(CoordConsts.SVC_KEY_QUESTION_NAME) String questionName,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr /* optional */); @POST @Path(CoordConsts.SVC_RSC_GET_ANSWER_ROWS) @Produces(MediaType.APPLICATION_JSON) JSONArray getAnswerRows(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_REFERENCE_SNAPSHOT_NAME) String referenceSnapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_QUESTION_NAME) String questionName,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysisName,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_ANSWERS_OPTIONS) String answerRowsOptionsStr,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr /* optional */); @POST @Path(CoordConsts.SVC_RSC_GET_ANSWER_ROWS2) @Produces(MediaType.APPLICATION_JSON) JSONArray getAnswerRows2(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_REFERENCE_SNAPSHOT_NAME) String referenceSnapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_QUESTION_NAME) String questionName,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysisName,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_ANSWERS_OPTIONS) String answerRowsOptionsStr,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr /* optional */); @POST @Path(CoordConsts.SVC_RSC_GET_ANSWER_METRICS) @Produces(MediaType.APPLICATION_JSON) JSONArray getAnswerMetrics(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_REFERENCE_SNAPSHOT_NAME) String referenceSnapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysis,
      @FormDataParam(CoordConsts.SVC_KEY_QUESTION_NAME) String question,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr); @POST @Path(CoordConsts.SVC_RSC_GET_NETWORK) @Produces(MediaType.APPLICATION_JSON) Response getNetwork(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName); @GET @Produces(MediaType.APPLICATION_JSON) JSONArray getInfo(); @POST @Path(CoordConsts.SVC_RSC_GET_QUESTION_TEMPLATES) @Produces(MediaType.APPLICATION_JSON) @Deprecated JSONArray getQuestionTemplates(@FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey); @GET @Path(CoordConsts.SVC_RSC_GETSTATUS) @Produces(MediaType.APPLICATION_JSON) JSONArray getStatus(); @POST @Path(CoordConsts.SVC_RSC_GET_WORKSTATUS) @Produces(MediaType.APPLICATION_JSON) @Deprecated JSONArray getWorkStatus(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_WORKID) String workId); @POST @Path(CoordConsts.SVC_RSC_INIT_NETWORK) @Produces(MediaType.APPLICATION_JSON) JSONArray initNetwork(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_PREFIX) String networkPrefix); @POST @Path(CoordConsts.SVC_RSC_KILL_WORK) @Produces(MediaType.APPLICATION_JSON) JSONArray killWork(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_WORKID) String workId); @POST @Path(CoordConsts.SVC_RSC_LIST_ANALYSES) @Produces(MediaType.APPLICATION_JSON) JSONArray listAnalyses(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @Nullable @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_TYPE) AnalysisType analysisType); @POST @Path(CoordConsts.SVC_RSC_LIST_NETWORKS) @Produces(MediaType.APPLICATION_JSON) JSONArray listNetworks(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion); @POST @Path(CoordConsts.SVC_RSC_LIST_INCOMPLETE_WORK) @Produces(MediaType.APPLICATION_JSON) JSONArray listIncompleteWork(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName, /* optional */
      @Nullable @FormDataParam(CoordConsts.SVC_KEY_WORK_TYPE) WorkType workType /* optional */); @POST @Path(CoordConsts.SVC_RSC_LIST_QUESTIONS) @Produces(MediaType.APPLICATION_JSON) JSONArray listQuestions(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_VERBOSE) boolean verbose); @POST @Path(CoordConsts.SVC_RSC_QUEUE_WORK) @Produces(MediaType.APPLICATION_JSON) JSONArray queueWork(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr); @GET @Path("test") @Produces(MediaType.TEXT_PLAIN) String test(); @POST @Path(CoordConsts.SVC_RSC_UPLOAD_QUESTION) @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.APPLICATION_JSON) JSONArray uploadQuestion(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_QUESTION_NAME) String qName,
      @FormDataParam(CoordConsts.SVC_KEY_FILE) String questionJson); @POST @Path(CoordConsts.SVC_RSC_UPLOAD_SNAPSHOT) @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.APPLICATION_JSON) JSONArray uploadSnapshot(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_ZIPFILE) InputStream fileStream,
      @FormDataParam(CoordConsts.SVC_KEY_AUTO_ANALYZE_TESTRIG) String autoAnalyzeTestrigStr,
      @FormDataParam(CoordConsts.SVC_KEY_AUTO_ANALYZE) String autoAnalyzeStr); }
WorkMgrService { @POST @Path(CoordConsts.SVC_RSC_GET_WORKSTATUS) @Produces(MediaType.APPLICATION_JSON) @Deprecated public JSONArray getWorkStatus( @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey, @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion, @FormDataParam(CoordConsts.SVC_KEY_WORKID) String workId) { try { _logger.debugf("WMS:getWorkStatus %s\n", workId); checkStringParam(apiKey, "API key"); checkStringParam(clientVersion, "Client version"); checkStringParam(workId, "work id"); checkApiKeyValidity(apiKey); QueuedWork work = Main.getWorkMgr().getWork(UUID.fromString(workId)); if (work == null) { return failureResponse("work with the specified id does not exist or is not inaccessible"); } NetworkId networkId = work.getDetails().getNetworkId(); Optional<String> networkOpt = Main.getWorkMgr().getNetworkNames().stream() .filter( n -> Main.getWorkMgr() .getIdManager() .getNetworkId(n) .equals(Optional.of(networkId))) .findFirst(); checkArgument(networkOpt.isPresent(), "Invalid network ID: %s", networkId); checkNetworkAccessibility(apiKey, networkOpt.get()); String taskStr = BatfishObjectMapper.writeString(work.getLastTaskCheckResult()); return successResponse( new JSONObject() .put(CoordConsts.SVC_KEY_WORKSTATUS, work.getStatus().toString()) .put(CoordConsts.SVC_KEY_TASKSTATUS, taskStr)); } catch (IllegalArgumentException | AccessControlException e) { _logger.errorf("WMS:getWorkStatus exception: %s\n", e.getMessage()); return failureResponse(e.getMessage()); } catch (Exception e) { String stackTrace = Throwables.getStackTraceAsString(e); _logger.errorf("WMS:getWorkStatus exception: %s", stackTrace); return failureResponse(e.getMessage()); } }  @POST @Path(CoordConsts.SVC_RSC_AUTO_COMPLETE) @Produces(MediaType.APPLICATION_JSON) JSONArray autoComplete(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      /* Optional: not needed for some completions */
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_COMPLETION_TYPE) String completionType,
      @FormDataParam(CoordConsts.SVC_KEY_QUERY) String query,
      /* Optional */
      @FormDataParam(CoordConsts.SVC_KEY_MAX_SUGGESTIONS) String maxSuggestions); @POST @Path(CoordConsts.SVC_RSC_CHECK_API_KEY) @Produces(MediaType.APPLICATION_JSON) JSONArray checkApiKey(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion); @POST @Path(CoordConsts.SVC_RSC_CONFIGURE_ANALYSIS) @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.APPLICATION_JSON) JSONArray configureAnalysis(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_NEW_ANALYSIS) String newAnalysisStr,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysisName,
      @FormDataParam(CoordConsts.SVC_KEY_FILE) InputStream addQuestionsStream,
      @FormDataParam(CoordConsts.SVC_KEY_DEL_ANALYSIS_QUESTIONS) String delQuestions,
      @Nullable @FormDataParam(CoordConsts.SVC_KEY_SUGGESTED) Boolean suggested); @POST @Path(CoordConsts.SVC_RSC_CONFIGURE_QUESTION_TEMPLATE) @Produces(MediaType.APPLICATION_JSON) JSONArray configureQuestionTemplate(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_QUESTION) String questionTemplate,
      @Nullable @FormDataParam(CoordConsts.SVC_KEY_EXCEPTIONS) String exceptions,
      @Nullable @FormDataParam(CoordConsts.SVC_KEY_ASSERTION) String assertion); @POST @Path(CoordConsts.SVC_RSC_DEL_ANALYSIS) @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.APPLICATION_JSON) @Deprecated JSONArray delAnalysis(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysisName); @POST @Path(CoordConsts.SVC_RSC_DEL_NETWORK) @Produces(MediaType.APPLICATION_JSON) JSONArray delNetwork(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName); @POST @Path(CoordConsts.SVC_RSC_DEL_QUESTION) @Produces(MediaType.APPLICATION_JSON) @Deprecated JSONArray delQuestion(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_QUESTION_NAME) String questionName); @POST @Path(CoordConsts.SVC_RSC_DEL_SNAPSHOT) @Produces(MediaType.APPLICATION_JSON) @Deprecated JSONArray delSnapshot(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName); @POST @Path(CoordConsts.SVC_RSC_GET_ANALYSIS_ANSWER) @Produces(MediaType.APPLICATION_JSON) JSONArray getAnalysisAnswer(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_REFERENCE_SNAPSHOT_NAME) String referenceSnapshot,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysisName,
      @FormDataParam(CoordConsts.SVC_KEY_QUESTION_NAME) String questionName,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr /* optional */); @POST @Path(CoordConsts.SVC_RSC_GET_ANALYSIS_ANSWERS) @Produces(MediaType.APPLICATION_JSON) JSONArray getAnalysisAnswers(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_REFERENCE_SNAPSHOT_NAME) String referenceSnapshot,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysisName,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr /* optional */); @POST @Path(CoordConsts.SVC_RSC_GET_ANALYSIS_ANSWERS_METRICS) @Produces(MediaType.APPLICATION_JSON) JSONArray getAnalysisAnswersMetrics(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_REFERENCE_SNAPSHOT_NAME) String referenceSnapshot,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysisName,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_QUESTIONS)
          String analysisQuestionsStr /* optional */,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr /* optional */); @POST @Path(CoordConsts.SVC_RSC_GET_ANALYSIS_ANSWERS_ROWS) @Produces(MediaType.APPLICATION_JSON) JSONArray getAnalysisAnswersRows(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_REFERENCE_SNAPSHOT_NAME) String referenceSnapshot,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysisName,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_ANSWERS_OPTIONS) String answersRowsOptionsStr,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr /* optional */); @POST @Path(CoordConsts.SVC_RSC_GET_ANSWER) @Produces(MediaType.APPLICATION_JSON) JSONArray getAnswer(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_REFERENCE_SNAPSHOT_NAME) String referenceSnapshot,
      @FormDataParam(CoordConsts.SVC_KEY_QUESTION_NAME) String questionName,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr /* optional */); @POST @Path(CoordConsts.SVC_RSC_GET_ANSWER_ROWS) @Produces(MediaType.APPLICATION_JSON) JSONArray getAnswerRows(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_REFERENCE_SNAPSHOT_NAME) String referenceSnapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_QUESTION_NAME) String questionName,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysisName,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_ANSWERS_OPTIONS) String answerRowsOptionsStr,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr /* optional */); @POST @Path(CoordConsts.SVC_RSC_GET_ANSWER_ROWS2) @Produces(MediaType.APPLICATION_JSON) JSONArray getAnswerRows2(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_REFERENCE_SNAPSHOT_NAME) String referenceSnapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_QUESTION_NAME) String questionName,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysisName,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_ANSWERS_OPTIONS) String answerRowsOptionsStr,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr /* optional */); @POST @Path(CoordConsts.SVC_RSC_GET_ANSWER_METRICS) @Produces(MediaType.APPLICATION_JSON) JSONArray getAnswerMetrics(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_REFERENCE_SNAPSHOT_NAME) String referenceSnapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_NAME) String analysis,
      @FormDataParam(CoordConsts.SVC_KEY_QUESTION_NAME) String question,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr); @POST @Path(CoordConsts.SVC_RSC_GET_NETWORK) @Produces(MediaType.APPLICATION_JSON) Response getNetwork(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName); @GET @Produces(MediaType.APPLICATION_JSON) JSONArray getInfo(); @POST @Path(CoordConsts.SVC_RSC_GET_QUESTION_TEMPLATES) @Produces(MediaType.APPLICATION_JSON) @Deprecated JSONArray getQuestionTemplates(@FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey); @GET @Path(CoordConsts.SVC_RSC_GETSTATUS) @Produces(MediaType.APPLICATION_JSON) JSONArray getStatus(); @POST @Path(CoordConsts.SVC_RSC_GET_WORKSTATUS) @Produces(MediaType.APPLICATION_JSON) @Deprecated JSONArray getWorkStatus(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_WORKID) String workId); @POST @Path(CoordConsts.SVC_RSC_INIT_NETWORK) @Produces(MediaType.APPLICATION_JSON) JSONArray initNetwork(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_PREFIX) String networkPrefix); @POST @Path(CoordConsts.SVC_RSC_KILL_WORK) @Produces(MediaType.APPLICATION_JSON) JSONArray killWork(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_WORKID) String workId); @POST @Path(CoordConsts.SVC_RSC_LIST_ANALYSES) @Produces(MediaType.APPLICATION_JSON) JSONArray listAnalyses(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @Nullable @FormDataParam(CoordConsts.SVC_KEY_ANALYSIS_TYPE) AnalysisType analysisType); @POST @Path(CoordConsts.SVC_RSC_LIST_NETWORKS) @Produces(MediaType.APPLICATION_JSON) JSONArray listNetworks(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion); @POST @Path(CoordConsts.SVC_RSC_LIST_INCOMPLETE_WORK) @Produces(MediaType.APPLICATION_JSON) JSONArray listIncompleteWork(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName, /* optional */
      @Nullable @FormDataParam(CoordConsts.SVC_KEY_WORK_TYPE) WorkType workType /* optional */); @POST @Path(CoordConsts.SVC_RSC_LIST_QUESTIONS) @Produces(MediaType.APPLICATION_JSON) JSONArray listQuestions(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_VERBOSE) boolean verbose); @POST @Path(CoordConsts.SVC_RSC_QUEUE_WORK) @Produces(MediaType.APPLICATION_JSON) JSONArray queueWork(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_WORKITEM) String workItemStr); @GET @Path("test") @Produces(MediaType.TEXT_PLAIN) String test(); @POST @Path(CoordConsts.SVC_RSC_UPLOAD_QUESTION) @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.APPLICATION_JSON) JSONArray uploadQuestion(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_QUESTION_NAME) String qName,
      @FormDataParam(CoordConsts.SVC_KEY_FILE) String questionJson); @POST @Path(CoordConsts.SVC_RSC_UPLOAD_SNAPSHOT) @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.APPLICATION_JSON) JSONArray uploadSnapshot(
      @FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey,
      @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion,
      @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName,
      @FormDataParam(CoordConsts.SVC_KEY_SNAPSHOT_NAME) String snapshotName,
      @FormDataParam(CoordConsts.SVC_KEY_ZIPFILE) InputStream fileStream,
      @FormDataParam(CoordConsts.SVC_KEY_AUTO_ANALYZE_TESTRIG) String autoAnalyzeTestrigStr,
      @FormDataParam(CoordConsts.SVC_KEY_AUTO_ANALYZE) String autoAnalyzeStr);  }