public interface CommandService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMMAND_URL_SUFFIX
Path to Commands.
|
Modifier and Type | Method and Description |
---|---|
retrofit2.Call<java.lang.Void> |
addApplicationsToCommand(java.lang.String commandId,
java.util.List<java.lang.String> applicationIds)
Method to add applications to a command in Genie.
|
retrofit2.Call<java.lang.Void> |
addConfigsToCommand(java.lang.String commandId,
java.util.Set<java.lang.String> configs)
Method to add configs to a command in Genie.
|
retrofit2.Call<java.lang.Void> |
addTagsToCommand(java.lang.String commandId,
java.util.Set<java.lang.String> tags)
Method to add tags to a command in Genie.
|
retrofit2.Call<java.lang.Void> |
createCommand(Command command)
Method to create a command in Genie.
|
retrofit2.Call<java.lang.Void> |
deleteAllCommands()
Method to delete all commands in Genie.
|
retrofit2.Call<java.lang.Void> |
deleteCommand(java.lang.String commandId)
Method to delete a command in Genie.
|
retrofit2.Call<java.util.List<Application>> |
getApplicationsForCommand(java.lang.String commandId)
Method to get applications for a command in Genie.
|
retrofit2.Call<java.util.List<Cluster>> |
getClustersForCommand(java.lang.String commandId)
Method to get clusters for a command in Genie.
|
retrofit2.Call<Command> |
getCommand(java.lang.String commandId)
Method to fetch a single job from Genie.
|
retrofit2.Call<com.fasterxml.jackson.databind.JsonNode> |
getCommands(java.lang.String name,
java.lang.String user,
java.util.List<java.lang.String> statusList,
java.util.List<java.lang.String> tagList)
Method to get all commands from Genie filtered based on query params.
|
retrofit2.Call<java.util.Set<java.lang.String>> |
getConfigsForCommand(java.lang.String commandId)
Method to get configs for a command in Genie.
|
retrofit2.Call<java.util.Set<java.lang.String>> |
getTagsForCommand(java.lang.String commandId)
Method to get tags for a command in Genie.
|
retrofit2.Call<java.lang.Void> |
patchCommand(java.lang.String commandId,
com.github.fge.jsonpatch.JsonPatch patch)
Patch a command using JSON Patch.
|
retrofit2.Call<java.lang.Void> |
removeAllApplicationsForCommand(java.lang.String commandId)
Method to delete all applications for a command in Genie.
|
retrofit2.Call<java.lang.Void> |
removeAllConfigsForCommand(java.lang.String commandId)
Method to delete all configs for a command in Genie.
|
retrofit2.Call<java.lang.Void> |
removeAllTagsForCommand(java.lang.String commandId)
Method to delete all tags for a command in Genie.
|
retrofit2.Call<java.lang.Void> |
removeApplicationForCommand(java.lang.String commandId,
java.lang.String applicationId)
Method to delete a application for a command in Genie.
|
retrofit2.Call<java.lang.Void> |
removeTagForCommand(java.lang.String commandId,
java.lang.String tag)
Method to delete a tag for a command in Genie.
|
retrofit2.Call<java.lang.Void> |
setApplicationsForCommand(java.lang.String commandId,
java.util.List<java.lang.String> applicationIds)
Method to override and set applications for a command in Genie.
|
retrofit2.Call<java.lang.Void> |
updateCommand(java.lang.String commandId,
Command command)
Method to update a command in Genie.
|
retrofit2.Call<java.lang.Void> |
updateConfigsForCommand(java.lang.String commandId,
java.util.Set<java.lang.String> configs)
Method to update configs for a command in Genie.
|
retrofit2.Call<java.lang.Void> |
updateTagsForCommand(java.lang.String commandId,
java.util.Set<java.lang.String> tags)
Method to update tags for a command in Genie.
|
static final java.lang.String COMMAND_URL_SUFFIX
@POST(value="/api/v3/commands") retrofit2.Call<java.lang.Void> createCommand(@Body Command command)
command
- The command object.@PUT(value="/api/v3/commands/{id}") retrofit2.Call<java.lang.Void> updateCommand(@Path(value="id") java.lang.String commandId, @Body Command command)
commandId
- The id of the command to update.command
- The command object.@GET(value="/api/v3/commands") retrofit2.Call<com.fasterxml.jackson.databind.JsonNode> getCommands(@Query(value="name") java.lang.String name, @Query(value="user") java.lang.String user, @Query(value="status") java.util.List<java.lang.String> statusList, @Query(value="tag") java.util.List<java.lang.String> tagList)
name
- The name of the commands.user
- The user who created the command.statusList
- The list of Command statuses.tagList
- The list of tags.@GET(value="/api/v3/commands/{id}") retrofit2.Call<Command> getCommand(@Path(value="id") java.lang.String commandId)
commandId
- The id of the command to get.@DELETE(value="/api/v3/commands/{id}") retrofit2.Call<java.lang.Void> deleteCommand(@Path(value="id") java.lang.String commandId)
commandId
- The id of the command.@DELETE(value="/api/v3/commands") retrofit2.Call<java.lang.Void> deleteAllCommands()
@PATCH(value="/api/v3/commands/{id}") retrofit2.Call<java.lang.Void> patchCommand(@Path(value="id") java.lang.String commandId, @Body com.github.fge.jsonpatch.JsonPatch patch)
commandId
- The id of the command to patchpatch
- The JSON Patch instructions@GET(value="/api/v3/commands/{id}/applications") retrofit2.Call<java.util.List<Application>> getApplicationsForCommand(@Path(value="id") java.lang.String commandId)
commandId
- The id of the command.@GET(value="/api/v3/commands/{id}/clusters") retrofit2.Call<java.util.List<Cluster>> getClustersForCommand(@Path(value="id") java.lang.String commandId)
commandId
- The id of the command.@POST(value="/api/v3/commands/{id}/applications") retrofit2.Call<java.lang.Void> addApplicationsToCommand(@Path(value="id") java.lang.String commandId, @Body java.util.List<java.lang.String> applicationIds)
commandId
- The id of the command..applicationIds
- The application Ids to be added.@PUT(value="/api/v3/commands/{id}/applications") retrofit2.Call<java.lang.Void> setApplicationsForCommand(@Path(value="id") java.lang.String commandId, @Body java.util.List<java.lang.String> applicationIds)
commandId
- The id of the command..applicationIds
- The application Ids to be added.@DELETE(value="/api/v3/commands/{id}/applications/{applicationId}") retrofit2.Call<java.lang.Void> removeApplicationForCommand(@Path(value="id") java.lang.String commandId, @Path(value="applicationId") java.lang.String applicationId)
commandId
- The id of the command.applicationId
- The application to delete.@DELETE(value="/api/v3/commands/{id}/applications") retrofit2.Call<java.lang.Void> removeAllApplicationsForCommand(@Path(value="id") java.lang.String commandId)
commandId
- The id of the command.@GET(value="/api/v3/commands/{id}/configs") retrofit2.Call<java.util.Set<java.lang.String>> getConfigsForCommand(@Path(value="id") java.lang.String commandId)
commandId
- The id of the command.@POST(value="/api/v3/commands/{id}/configs") retrofit2.Call<java.lang.Void> addConfigsToCommand(@Path(value="id") java.lang.String commandId, @Body java.util.Set<java.lang.String> configs)
commandId
- The id of the command..configs
- The configs to be added.@PUT(value="/api/v3/commands/{id}/configs") retrofit2.Call<java.lang.Void> updateConfigsForCommand(@Path(value="id") java.lang.String commandId, @Body java.util.Set<java.lang.String> configs)
commandId
- The id of the command..configs
- The configs to be added.@DELETE(value="/api/v3/commands/{id}/configs") retrofit2.Call<java.lang.Void> removeAllConfigsForCommand(@Path(value="id") java.lang.String commandId)
commandId
- The id of the command.@GET(value="/api/v3/commands/{id}/tags") retrofit2.Call<java.util.Set<java.lang.String>> getTagsForCommand(@Path(value="id") java.lang.String commandId)
commandId
- The id of the command.@POST(value="/api/v3/commands/{id}/tags") retrofit2.Call<java.lang.Void> addTagsToCommand(@Path(value="id") java.lang.String commandId, @Body java.util.Set<java.lang.String> tags)
commandId
- The id of the command..tags
- The tags to be added.@PUT(value="/api/v3/commands/{id}/tags") retrofit2.Call<java.lang.Void> updateTagsForCommand(@Path(value="id") java.lang.String commandId, @Body java.util.Set<java.lang.String> tags)
commandId
- The id of the command..tags
- The tags to be added.@DELETE(value="/api/v3/commands/{id}/tags/{tag}") retrofit2.Call<java.lang.Void> removeTagForCommand(@Path(value="id") java.lang.String commandId, @Path(value="tag") java.lang.String tag)
commandId
- The id of the command.tag
- The tag to delete.@DELETE(value="/api/v3/commands/{id}/tags") retrofit2.Call<java.lang.Void> removeAllTagsForCommand(@Path(value="id") java.lang.String commandId)
commandId
- The id of the command.