Bug 860089 - RFE: Allow tasks to be queries by specifying multiple ids
RFE: Allow tasks to be queries by specifying multiple ids
Product: Pulp
Classification: Community
Component: API/integration (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 2.1.0
Assigned To: Jason Connor
Preethi Thomas
: FutureFeature, Triaged
Depends On:
Blocks: katello-v2-pulp
  Show dependency treegraph
Reported: 2012-09-24 18:43 EDT by Justin Sherrill
Modified: 2014-03-30 21:40 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-04-08 11:58:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Justin Sherrill 2012-09-24 18:43:57 EDT
Description of problem:

In pulpv1 you could query multiple tasks by providing multiple ids.  For example:

GET /pulp/api/tasks/?id=1&id=2

In Pulpv2 this isn't possible.  Katello uses this so that we can check sync statuses in bulk instead of one at a time.  This speeds up our sync status page.
Comment 1 Jason Connor 2013-02-27 15:54:01 EST
ability added :)
Pull Request submitted in branch jconnor-860089-rfe-task-query-by-id
Comment 2 Jeff Ortel 2013-03-06 10:20:40 EST
build: 2.1.0-0.20.beta
Comment 3 Jason Connor 2013-04-01 11:45:38 EDT
This adds the ability to filter the REST API tasks collection with multiple 'id' fields in the GET request.

For example:

GET /pulp/api/v2/tasks/?id=<task id>&id=<task id>&id=<task id>

Should only return the tasks with the ids listed, instead of all of the tasks on the system.
Comment 4 Preethi Thomas 2013-04-01 13:27:33 EDT

[root@cloud-qe-8 ~]# rpm -q pulp-server

[root@cloud-qe-8 ~]# curl -k -u admin:admin   "https://localhost//pulp/api/v2/tasks/?id=0dee869b-65c8-45a7-93ec-2514c42e1fe4&id=7f5de9dc-4701-4435-92ba-b35188c45ba8"
[{"task_group_id": null, "exception": null, "traceback": null, "task_id": "0dee869b-65c8-45a7-93ec-2514c42e1fe4", "call_request_tags": ["pulp:consumer:voyager", "pulp:content_unit:rpm", "pulp:action:profile_create"], "reasons": [], "start_time": "2013-04-01T16:47:30Z", "tags": ["pulp:consumer:voyager", "pulp:content_unit:rpm", "pulp:action:profile_create"], "state": "finished", "finish_time": "2013-04-01T16:47:30Z", "dependency_failures": {}, "schedule_id": null, "progress": {}, "call_request_group_id": null, "call_request_id": "0dee869b-65c8-45a7-93ec-2514c42e1fe4", "principal_login": "SYSTEM", "response": "accepted", "result": "****"}, {"task_group_id": "210b617f-8990-4f30-84dc-73fb47791e6b", "exception": null, "traceback": null, "task_id": "7f5de9dc-4701-4435-92ba-b35188c45ba8", "call_request_tags": ["pulp:consumer:client1", "pulp:repository:forge", "pulp:repository_distributor:puppet_distributor", "pulp:action:agent_unbind"], "reasons": [], "start_time": "2013-03-31T07:21:01Z", "tags": ["pulp:consumer:client1", "pulp:repository:forge", "pulp:repository_distributor:puppet_distributor", "pulp:action:agent_unbind"], "state": "running", "finish_time": null, "dependency_failures": {}, "schedule_id": null, "progress": {}, "call_request_group_id": "210b617f-8990-4f30-84dc-73fb47791e6b", "call_request_id": "7f5de9dc-4701-4435-92ba-b35188c45ba8", "principal_login": "admin", "response": "accepted", "result": null}][root@cloud-qe-8 ~]#
Comment 5 Preethi Thomas 2013-04-08 11:58:29 EDT
Pulp 2.1 released 


Note You need to log in before you can comment on or make changes to this bug.