Skip to content

Commit

Permalink
Merge pull request #1373 from tomaslin/titus-v2-api
Browse files Browse the repository at this point in the history
Titus: use api/v2 endpoints
  • Loading branch information
tomaslin authored Jan 11, 2017
2 parents 7297f7d + f6ce5c9 commit fd34214
Showing 1 changed file with 10 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,28 @@

public interface TitusRestAdapter {

@GET("/v2/jobs/{jobId}")
@GET("/api/v2/jobs/{jobId}")
Call<Job> getJob(@Path("jobId") String jobId);

@POST("/v2/jobs")
@POST("/api/v2/jobs")
Call<SubmitJobResponse> submitJob(@Body JobDescription jobDescription);

@PATCH("/v2/jobs/{jobId}")
@PATCH("/api/v2/jobs/{jobId}")
Call<Void> updateJob(@Path("jobId") String jobId, @Body Map<String, Object>jobAttributes);

@POST("/v2/jobs/kill")
@POST("/api/v2/jobs/kill")
Call<Void> killJob(@Body TerminateJobRequest terminateJobRequest);

@GET("/v2/tasks/{taskId}")
@GET("/api/v2/tasks/{taskId}")
Call<Task> getTask(@Path("taskId") String taskId);

@GET("/v2/jobs")
Call<List<Job>> getJobsByTaskState(@Query("taskState") TaskState taskState);

@GET("/v2/jobs")
@GET("/api/v2/jobs")
Call<List<Job>> getJobsByType(@Query("type") String type);

@GET("/v2/jobs")
@GET("/api/v2/jobs")
Call<List<Job>> getJobsByLabel(@Query("labels") String labels);

@GET("/v2/jobs")
Call<List<Job>> getJobsByUser(@Query("user") String user);

@GET("/v2/jobs")
@GET("/api/v2/jobs")
Call<List<Job>> getJobsByApplication(@Query("appName") String application);

@POST("/api/v2/tasks/kill")
Expand All @@ -62,9 +56,9 @@ public interface TitusRestAdapter {
@GET("/api/v2/logs/download/{taskId}")
Call<Map> logsDownload(@Path("taskId") String taskId);

@POST("/v2/jobs/setinstancecounts")
@POST("/api/v2/jobs/setinstancecounts")
Call<Void> resizeJob(@Body ResizeJobRequest resizeJob);

@POST("/v2/jobs/setinservice")
@POST("/api/v2/jobs/setinservice")
Call<Void> activateJob(@Body ActivateJobRequest activateJob);
}

0 comments on commit fd34214

Please sign in to comment.