Interface TasksService


public interface TasksService
  • Method Details

    • deleteTasksID

      @DELETE("api/v2/tasks/{taskID}") retrofit2.Call<Void> deleteTasksID(@Path("taskID") String taskID, @Header("Zap-Trace-Span") String zapTraceSpan)
      Delete a task Deletes a task and all associated records
      Parameters:
      taskID - The ID of the task to delete. (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<Void>
    • deleteTasksIDLabelsID

      @DELETE("api/v2/tasks/{taskID}/labels/{labelID}") retrofit2.Call<Void> deleteTasksIDLabelsID(@Path("taskID") String taskID, @Path("labelID") String labelID, @Header("Zap-Trace-Span") String zapTraceSpan)
      Delete a label from a task
      Parameters:
      taskID - The task ID. (required)
      labelID - The label ID. (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<Void>
    • deleteTasksIDMembersID

      @DELETE("api/v2/tasks/{taskID}/members/{userID}") retrofit2.Call<Void> deleteTasksIDMembersID(@Path("userID") String userID, @Path("taskID") String taskID, @Header("Zap-Trace-Span") String zapTraceSpan)
      Remove a member from a task
      Parameters:
      userID - The ID of the member to remove. (required)
      taskID - The task ID. (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<Void>
    • deleteTasksIDOwnersID

      @DELETE("api/v2/tasks/{taskID}/owners/{userID}") retrofit2.Call<Void> deleteTasksIDOwnersID(@Path("userID") String userID, @Path("taskID") String taskID, @Header("Zap-Trace-Span") String zapTraceSpan)
      Remove an owner from a task
      Parameters:
      userID - The ID of the owner to remove. (required)
      taskID - The task ID. (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<Void>
    • deleteTasksIDRunsID

      @DELETE("api/v2/tasks/{taskID}/runs/{runID}") retrofit2.Call<Void> deleteTasksIDRunsID(@Path("taskID") String taskID, @Path("runID") String runID, @Header("Zap-Trace-Span") String zapTraceSpan)
      Cancel a running task
      Parameters:
      taskID - The task ID. (required)
      runID - The run ID. (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<Void>
    • getTasks

      @GET("api/v2/tasks") retrofit2.Call<Tasks> getTasks(@Header("Zap-Trace-Span") String zapTraceSpan, @Query("name") String name, @Query("after") String after, @Query("user") String user, @Query("org") String org, @Query("orgID") String orgID, @Query("status") String status, @Query("limit") Integer limit, @Query("type") String type)
      List all tasks
      Parameters:
      zapTraceSpan - OpenTracing span context (optional)
      name - Returns task with a specific name. (optional)
      after - Return tasks after a specified ID. (optional)
      user - Filter tasks to a specific user ID. (optional)
      org - Filter tasks to a specific organization name. (optional)
      orgID - Filter tasks to a specific organization ID. (optional)
      status - Filter tasks by a status--\"inactive\" or \"active\". (optional)
      limit - The number of tasks to return (optional, default to 100)
      type - Type of task, unset by default. (optional)
      Returns:
      Call<Tasks>
    • getTasksID

      @GET("api/v2/tasks/{taskID}") retrofit2.Call<Task> getTasksID(@Path("taskID") String taskID, @Header("Zap-Trace-Span") String zapTraceSpan)
      Retrieve a task
      Parameters:
      taskID - The task ID. (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<Task>
    • getTasksIDLabels

      @GET("api/v2/tasks/{taskID}/labels") retrofit2.Call<LabelsResponse> getTasksIDLabels(@Path("taskID") String taskID, @Header("Zap-Trace-Span") String zapTraceSpan)
      List all labels for a task
      Parameters:
      taskID - The task ID. (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<LabelsResponse>
    • getTasksIDLogs

      @GET("api/v2/tasks/{taskID}/logs") retrofit2.Call<Logs> getTasksIDLogs(@Path("taskID") String taskID, @Header("Zap-Trace-Span") String zapTraceSpan)
      Retrieve all logs for a task
      Parameters:
      taskID - The task ID. (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<Logs>
    • getTasksIDMembers

      @GET("api/v2/tasks/{taskID}/members") retrofit2.Call<ResourceMembers> getTasksIDMembers(@Path("taskID") String taskID, @Header("Zap-Trace-Span") String zapTraceSpan)
      List all task members
      Parameters:
      taskID - The task ID. (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<ResourceMembers>
    • getTasksIDOwners

      @GET("api/v2/tasks/{taskID}/owners") retrofit2.Call<ResourceOwners> getTasksIDOwners(@Path("taskID") String taskID, @Header("Zap-Trace-Span") String zapTraceSpan)
      List all owners of a task
      Parameters:
      taskID - The task ID. (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<ResourceOwners>
    • getTasksIDRuns

      @GET("api/v2/tasks/{taskID}/runs") retrofit2.Call<Runs> getTasksIDRuns(@Path("taskID") String taskID, @Header("Zap-Trace-Span") String zapTraceSpan, @Query("after") String after, @Query("limit") Integer limit, @Query("afterTime") OffsetDateTime afterTime, @Query("beforeTime") OffsetDateTime beforeTime)
      List runs for a task
      Parameters:
      taskID - The ID of the task to get runs for. (required)
      zapTraceSpan - OpenTracing span context (optional)
      after - Returns runs after a specific ID. (optional)
      limit - The number of runs to return (optional, default to 100)
      afterTime - Filter runs to those scheduled after this time, RFC3339 (optional)
      beforeTime - Filter runs to those scheduled before this time, RFC3339 (optional)
      Returns:
      Call<Runs>
    • getTasksIDRunsID

      @GET("api/v2/tasks/{taskID}/runs/{runID}") retrofit2.Call<Run> getTasksIDRunsID(@Path("taskID") String taskID, @Path("runID") String runID, @Header("Zap-Trace-Span") String zapTraceSpan)
      Retrieve a single run for a task
      Parameters:
      taskID - The task ID. (required)
      runID - The run ID. (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<Run>
    • getTasksIDRunsIDLogs

      @GET("api/v2/tasks/{taskID}/runs/{runID}/logs") retrofit2.Call<Logs> getTasksIDRunsIDLogs(@Path("taskID") String taskID, @Path("runID") String runID, @Header("Zap-Trace-Span") String zapTraceSpan)
      Retrieve all logs for a run
      Parameters:
      taskID - ID of task to get logs for. (required)
      runID - ID of run to get logs for. (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<Logs>
    • patchTasksID

      @Headers("Content-Type:application/json") @PATCH("api/v2/tasks/{taskID}") retrofit2.Call<Task> patchTasksID(@Path("taskID") String taskID, @Body TaskUpdateRequest taskUpdateRequest, @Header("Zap-Trace-Span") String zapTraceSpan)
      Update a task Update a task. This will cancel all queued runs.
      Parameters:
      taskID - The task ID. (required)
      taskUpdateRequest - Task update to apply (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<Task>
    • postTasks

      @Headers("Content-Type:application/json") @POST("api/v2/tasks") retrofit2.Call<Task> postTasks(@Body TaskCreateRequest taskCreateRequest, @Header("Zap-Trace-Span") String zapTraceSpan)
      Create a new task
      Parameters:
      taskCreateRequest - Task to create (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<Task>
    • postTasksIDLabels

      @Headers("Content-Type:application/json") @POST("api/v2/tasks/{taskID}/labels") retrofit2.Call<LabelResponse> postTasksIDLabels(@Path("taskID") String taskID, @Body LabelMapping labelMapping, @Header("Zap-Trace-Span") String zapTraceSpan)
      Add a label to a task
      Parameters:
      taskID - The task ID. (required)
      labelMapping - Label to add (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<LabelResponse>
    • postTasksIDMembers

      @Headers("Content-Type:application/json") @POST("api/v2/tasks/{taskID}/members") retrofit2.Call<ResourceMember> postTasksIDMembers(@Path("taskID") String taskID, @Body AddResourceMemberRequestBody addResourceMemberRequestBody, @Header("Zap-Trace-Span") String zapTraceSpan)
      Add a member to a task
      Parameters:
      taskID - The task ID. (required)
      addResourceMemberRequestBody - User to add as member (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<ResourceMember>
    • postTasksIDOwners

      @Headers("Content-Type:application/json") @POST("api/v2/tasks/{taskID}/owners") retrofit2.Call<ResourceOwner> postTasksIDOwners(@Path("taskID") String taskID, @Body AddResourceMemberRequestBody addResourceMemberRequestBody, @Header("Zap-Trace-Span") String zapTraceSpan)
      Add an owner to a task
      Parameters:
      taskID - The task ID. (required)
      addResourceMemberRequestBody - User to add as owner (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<ResourceOwner>
    • postTasksIDRuns

      @Headers("Content-Type:application/json") @POST("api/v2/tasks/{taskID}/runs") retrofit2.Call<Run> postTasksIDRuns(@Path("taskID") String taskID, @Header("Zap-Trace-Span") String zapTraceSpan, @Body RunManually runManually)
      Manually start a task run, overriding the current schedule
      Parameters:
      taskID - (required)
      zapTraceSpan - OpenTracing span context (optional)
      runManually - (optional)
      Returns:
      Call<Run>
    • postTasksIDRunsIDRetry

      @Headers("Content-Type:application/json; charset=utf-8") @POST("api/v2/tasks/{taskID}/runs/{runID}/retry") retrofit2.Call<Run> postTasksIDRunsIDRetry(@Path("taskID") String taskID, @Path("runID") String runID, @Header("Zap-Trace-Span") String zapTraceSpan, @Body String body)
      Retry a task run
      Parameters:
      taskID - The task ID. (required)
      runID - The run ID. (required)
      zapTraceSpan - OpenTracing span context (optional)
      body - (optional)
      Returns:
      Call<Run>