TasksList.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace Elasticsearch\Endpoints\Tasks;
  3. use Elasticsearch\Common\Exceptions;
  4. use Elasticsearch\Endpoints\AbstractEndpoint;
  5. /**
  6. * Class TasksLists
  7. *
  8. * @category Elasticsearch
  9. * @package Elasticsearch\Endpoints\Tasks
  10. * @author Zachary Tong <zach@elastic.co>
  11. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
  12. * @link http://elastic.co
  13. */
  14. class TasksList extends AbstractEndpoint
  15. {
  16. /**
  17. * @throws \Elasticsearch\Common\Exceptions\RuntimeException
  18. * @return string
  19. */
  20. public function getURI()
  21. {
  22. return "/_tasks";
  23. }
  24. /**
  25. * @return string[]
  26. */
  27. public function getParamWhitelist()
  28. {
  29. return array(
  30. 'node_id',
  31. 'actions',
  32. 'detailed',
  33. 'parent_node',
  34. 'parent_task',
  35. 'wait_for_completion',
  36. 'group_by',
  37. 'task_id'
  38. );
  39. }
  40. /**
  41. * @return string
  42. */
  43. public function getMethod()
  44. {
  45. return 'GET';
  46. }
  47. }