Verified.
>> rpm -qa pulp-server
pulp-server-2.7.0-0.3.beta.el7.noarch
History for an existing consumer
>> curl -i -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X GET -k -u admin:admin "https://localhost/pulp/api/v2/consumers/gosha/history/"
HTTP/1.1 200 OK
Date: Fri, 26 Jun 2015 16:11:00 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
Content-Length: 1661
Content-Type: application/json
[{"originator": "SYSTEM", "timestamp": "2015-06-26T15:12:53Z", "consumer_id": "gosha", "details": {"units": [{"unit_key": {"name": "babarashka"}, "type_id": "rpm"}]}, "_ns": "consumer_history", "_id": {"$oid": "558d6bf5e512ed779aa83ad8"}, "type": "content_unit_installed", "id": "558d6bf5e512ed779aa83ad8"}, {"originator": "SYSTEM", "timestamp": "2015-06-26T15:11:55Z", "consumer_id": "gosha", "details": {"units": [{"unit_key": {"name": "babarashka"}, "type_id": "rpm"}]}, "_ns": "consumer_history", "_id": {"$oid": "558d6bbbe512ed779aa83ad5"}, "type": "content_unit_installed", "id": "558d6bbbe512ed779aa83ad5"}, {"originator": "admin", "timestamp": "2015-06-26T14:50:03Z", "consumer_id": "gosha", "details": {"profile_content_type": "mytype"}, "_ns": "consumer_history", "_id": {"$oid": "558d669be512ed777daefd1c"}, "type": "unit_profile_changed", "id": "558d669be512ed777daefd1c"}, {"originator": "admin", "timestamp": "2015-06-26T14:40:19Z", "consumer_id": "gosha", "details": {"profile_content_type": "rpm"}, "_ns": "consumer_history", "_id": {"$oid": "558d6453e512ed777ec43a25"}, "type": "unit_profile_changed", "id": "558d6453e512ed777ec43a25"}, {"originator": "admin", "timestamp": "2015-06-26T14:39:16Z", "consumer_id": "gosha", "details": {"profile_content_type": "rpm"}, "_ns": "consumer_history", "_id": {"$oid": "558d6414e512ed777daefd16"}, "type": "unit_profile_changed", "id": "558d6414e512ed777daefd16"}, {"originator": "admin", "timestamp": "2015-06-26T14:39:09Z", "consumer_id": "gosha", "details": null, "_ns": "consumer_history", "_id": {"$oid": "558d640de512ed777ec43a20"}, "type": "consumer_registered", "id": "558d640de512ed777ec43a20"}]
Hisotry for nonexisting consumer
>> pulp-consumer -u admin -p admin unregister
Consumer [gosha] successfully unregistered
>> curl -i -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X GET -k -u admin:admin "https://localhost/pulp/api/v2/consumers/gosha/history/"
HTTP/1.1 404 NOT FOUND
Date: Fri, 26 Jun 2015 16:11:47 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
Content-Encoding: utf-8
Content-Length: 378
Content-Type: application/json
{"http_request_method": "GET", "exception": null, "error_message": "Missing resource(s): consumer=gosha", "_href": "/pulp/api/v2/consumers/gosha/history/", "http_status": 404, "error": {"code": "PLP0009", "data": {"resources": {"consumer": "gosha"}}, "description": "Missing resource(s): consumer=gosha", "sub_errors": []}, "traceback": null, "resources": {"consumer": "gosha"}}[
History for fresh registered consumer
>> pulp-consumer -u admin -p admin register --consumer-id maruska
Consumer [maruska] successfully registered
>> curl -i -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X GET -k -u admin:admin "https://localhost/pulp/api/v2/consumers/maruska/history/"
HTTP/1.1 200 OK
Date: Fri, 26 Jun 2015 16:12:14 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
Content-Length: 242
Content-Type: application/json
[{"originator": "admin", "timestamp": "2015-06-26T16:12:07Z", "consumer_id": "maruska", "details": null, "_ns": "consumer_history", "_id": {"$oid": "558d79d7e512ed777ffdc63d"}, "type": "consumer_registered", "id": "558d79d7e512ed777ffdc63d"}]
Empty list is returned if the history for specified event type is not found for existing consumer:
>> curl -i -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X GET -ku admin:admin "https://localhost/pulp/api/v2/consumers/maruska/history/?event_type=repo_bound"
HTTP/1.1 200 OK
Date: Fri, 26 Jun 2015 16:29:54 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
Content-Length: 2
Content-Type: application/json
[]