Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ListTasks filter: query language rough draft #92

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 30 additions & 11 deletions task_execution.proto
Original file line number Diff line number Diff line change
Expand Up @@ -365,17 +365,6 @@ message GetTaskRequest {
// ListTasksRequest describes a request to the ListTasks service endpoint.
message ListTasksRequest {

// OPTIONAL
//
// Filter the task list to include tasks in this project.
string project = 1;

// OPTIONAL
//
// Filter the list to include tasks where the name matches this prefix.
// If unspecified, no task name filtering is done.
string name_prefix = 2;

// OPTIONAL
//
// Number of tasks to return in one page.
Expand All @@ -394,6 +383,36 @@ message ListTasksRequest {
// Affects the fields included in the returned Task messages.
// See TaskView below.
TaskView view = 5;

// Filter allows minimal filtering of ListTasks results,
// using a simple query string. Tasks may be filtered by state,
// tags, and create time. Multiple filters may be included in one
// query, in which case they are combined using the AND operator.
// In order to keep the design and implementation of these filters
// simple, there is no support for OR and NOT operators. Matches are
// exact, i.e. partial or wildcard matching is not supported. More advanced
// use cases may be supported by using a more sophisticated, external system.
//
// Examples:
// Filter by state:
// - state:complete
// - state:COMPLETE
// - state:complete state:running
// Filter by tag:
// - project:ga4gh-driver-1
// - project:"ga4gh driver 1"
// - project:"ga4gh driver 1" sample:"sample ABC"
// Filter by create time:
// - created>=2008-09-08T22:47:31 created<2008-09-08T24:00:00
// - created>2008-09-08 created<=2008-09-08
// Filter by multiple:
// - state:complete project:"ga4gh driver 1" created
//
// Query term:value is separated by a ":". Multiple terms are separated
// by whitespace. Values may be enclosed in "double quotes". State values
// are case-insensitive. Tag values are case sensitive. Date/time values
// are RFC3339 formatted. "created" supports ranges via "<", ">", "<=", ">=".
string filter = 6;
}

// TaskView affects the fields returned by the ListTasks endpoint.
Expand Down