API - GET TASKS - custom filters

111 Views Asked by At

Is there a way to filter results of GET_TASKS in Mesos API ?

http://mesos.apache.org/documentation/latest/operator-http-api/#get_tasks

There is no info about filters, like for example get TASKS that belongs to specific principal or with status done. There is no info about limit / offset. Getting whole list of tasks is slow.

Maybe there is some way to filter results ?

1

There are 1 best solutions below

2
janisz On

You are referring to operator API but there is also general \task API that allow some basic filtering with query parameters:

  • framework_id=VALUE Only return tasks belonging to the framework with this ID.
  • limit=VALUE Maximum number of tasks returned (default is 100).
  • offset=VALUE Starts task list at offset.
  • order=(asc|desc) Ascending or descending sort order (default is descending).
  • task_id=VALUE Only return tasks with this ID (should be used together with parameter framework_id).

http://mesos.apache.org/documentation/latest/endpoints/master/tasks/