Index

This method allows you to retrieve a detailed change report for your organization.

Method URL
GET /api/v2/change_report.json
GET /api/v2/change_report.csv

Parameters

Param Type Required Notes
weeks integer No The time span, in weeks, from which to retrieve changes
environment_id string No The environment to retrieve changes for
node_group_id integer No The node group to retrieve changes for
node_id string No The node to retrieve changes for
date_from string No Start date to retrieve changes (ISO 8601 format)
date_to string No End date to retrieve changes (ISO 8601 format)
show_ignored boolean No Whether or not to include ignored items (default: false)
limit integer No The number of change records to return on each call (default: 4000)
page integer No Allows pagination of a report, with ‘limit’ controlling the number of records per page (default: 0, 0-indexed)

Example Response

Code Status
200 OK

Example Response JSON

{
    "diff_counts": [
        {
            "updated_at": "2016-06-29",
            "status": "modified",
            "count": "2"
        },
        {
            "updated_at": "2016-06-28",
            "status": "added",
            "count": "1"
        },
        {
            "updated_at": "2016-06-28",
            "status": "removed",
            "count": "1"
        }
    ],
    "diff_items": [
        {
            "id": "1",
            "node_id": "1",
            "node_name": "Node",
            "node_environment_id": "1",
            "node_primary_node_group_id": "0",
            "updated_at": "2016-06-29 15:25:19.703671",
            "epoch": "1467213919.70367",
            "old_attrs": {
                "description": "Rebuild Hardware Database",
                "systemd_type": "service",
                "state": "exited"
            },
            "new_attrs": {
                "description": "Rebuild Hardware Database",
                "systemd_type": "service",
                "state": "dead"
            },
            "new_scan_id": "4",
            "old_scan_id": "3",
            "status": "modified",
            "path": "{services,systemd}",
            "name": "systemd-hwdb-update",
            "type": "services"
        },
        {
            "id": "2",
            "node_id": "1",
            "node_name": "Node",
            "node_environment_id": "1",
            "node_primary_node_group_id": "0",
            "updated_at": "2016-06-29 15:25:19.703671",
            "epoch": "1467213919.70367",
            "old_attrs": {
                "epoch_sec": "1467152770",
                "value": "Tue, 28 Jun 2016 22:26:10 UTC"
            },
            "new_attrs": {
                "epoch_sec": "1467213860",
                "value": "Wed, 29 Jun 2016 15:24:20 UTC"
            },
            "old_scan_id": "3",
            "new_scan_id": "4",
            "status": "modified",
            "path": "{inventory,facts}",
            "name": "boot_time",
            "type": "inventory"
        },
        {
            "id": "3",
            "node_id": "1",
            "node_name": "Node",
            "node_environment_id": "1",
            "node_primary_node_group_id": "0",
            "updated_at": "2016-06-28 22:30:49.139152",
            "epoch": "1467153049.13915",
            "old_attrs": null,
            "new_attrs": {
                "status": "installed",
                "version": "17.168.5.2-43.el7"
            },
            "old_scan_id": "2",
            "new_scan_id": "3",
            "status": "added",
            "path": "{packages,apt}",
            "name": "iwl6000g2b-firmware",
            "type": "packages"
        },
        {
            "id": "4",
            "node_id": "1",
            "node_name": "Node",
            "node_environment_id": "1",
            "node_primary_node_group_id": "0",
            "updated_at": "2016-06-28 22:30:49.139152",
            "epoch": "1467153049.13915",
            "old_attrs": {
                "version": "6.2-8",
                "status": "install ok installed"
            },
            "new_attrs": null,
            "old_scan_id": "2",
            "new_scan_id": "3",
            "status": "removed",
            "path": "{packages,apt}",
            "name": "libreadline6-dev",
            "type": "packages"
        }
    ]
}

Aggregate

This method allows you to receive a CSV report of changes aggregated by node. Each node with changes has an individual entry in the CSV, with fields summarizing the old and new values of its attributes.

Method URL
GET /api/v2/change_report/aggregate.csv

Parameters

Param Type Required Notes
weeks integer No The time span, in weeks, from which to retrieve changes
environment_id string No The environment to retrieve changes for
node_group_id integer No The node group to retrieve changes for
node_id string No The node to retrieve changes for
date_from string No Start date to retrieve changes (ISO 8601 format)
date_to string No End date to retrieve changes (ISO 8601 format)
show_ignored boolean No Whether or not to include ignored items (default: false)
limit integer No The number of change records to return on each call (default: 4000)
page integer No Allows pagination of a report, with ‘limit’ controlling the number of records per page (default: 0, 0-indexed)

Example Response

Code Status
200 OK

Example Response CSV

"ID","Node","Old_Summary","New_Summary"
"227","Ubuntu 14.04","[{""id"":227,""name"":""agent_version"",""type"":""inventory"",""status"":""modified"",""updated_at"":""2017-03-08T17:10:40.925591"",""path"":""{inventory,facts}"",""attributes"":{""git_hash"":""9aff99ba2ba68340daf4f4e0185c691077d9fc04"",""pkgversion"":""4.7.23.master.1486420245"",""version"":""4.7.23""},""scan_id"":43879}]","[{""id"":227,""name"":""agent_version"",""type"":""inventory"",""status"":""modified"",""updated_at"":""2017-03-08T17:10:40.827251"",""path"":""{inventory,facts}"",""attributes"":{""git_hash"":""a3143488d7cd5a15d7f63cdb1ae25c242f253fc9"",""pkgversion"":""4.7.26.master.1488479682"",""version"":""4.7.26""},""scan_id"":51172}]"
"8","Jenkins Server","[{""id"":8,""name"":""agent_version"",""type"":""inventory"",""status"":""modified"",""updated_at"":""2017-03-07T00:57:24.24309"",""path"":""{inventory,facts}"",""attributes"":{""git_hash"":""b01fbb359a59bf753d7dfc953e94d3c0d949c9c5"",""pkgversion"":""4.7.25.master.1488249313"",""version"":""4.7.25""},""scan_id"":48920}]","[{""id"":8,""name"":""agent_version"",""type"":""inventory"",""status"":""modified"",""updated_at"":""2017-03-07T16:50:53.663963"",""path"":""{inventory,facts}"",""attributes"":{""git_hash"":""a3143488d7cd5a15d7f63cdb1ae25c242f253fc9"",""pkgversion"":""4.7.26.master.1488479682"",""version"":""4.7.26""},""scan_id"":49320}]"