{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/68807499","id":68807499,"diff_hunk":"@@ -90,6 +90,17 @@ only accept unencrypted traffic from `localhost`.\n This requires that you specify a certificate (issued by the same CA PuppetDB\n trusts), a private key, and a CA certificate.\n \n+### Querying with puppet code\n+\n+The PuppetDB terminus includes the `puppetdb_query` function, which can be used\n+to query PuppetDB from within a Puppet manifest. For example,\n+\n+    $last_node_query = 'nodes{order by report_timestamp desc limit 1}'","path":"documentation/api/query/tutorial-pql.markdown","position":9,"original_position":9,"commit_id":"5eee0b10b4b4287b86da27b05ead77221c2fad74","original_commit_id":"5eee0b10b4b4287b86da27b05ead77221c2fad74","user":{"login":"wkalt","id":4952091,"avatar_url":"https://avatars.githubusercontent.com/u/4952091?v=3","gravatar_id":"","url":"https://api.github.com/users/wkalt","html_url":"https://github.com/wkalt","followers_url":"https://api.github.com/users/wkalt/followers","following_url":"https://api.github.com/users/wkalt/following{/other_user}","gists_url":"https://api.github.com/users/wkalt/gists{/gist_id}","starred_url":"https://api.github.com/users/wkalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkalt/subscriptions","organizations_url":"https://api.github.com/users/wkalt/orgs","repos_url":"https://api.github.com/users/wkalt/repos","events_url":"https://api.github.com/users/wkalt/events{/privacy}","received_events_url":"https://api.github.com/users/wkalt/received_events","type":"User","site_admin":false},"body":"thanks, these are good suggestions","created_at":"2016-06-28T17:51:17Z","updated_at":"2016-06-28T17:51:17Z","html_url":"https://github.com/puppetlabs/puppetdb/pull/1991#discussion_r68807499","pull_request_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1991","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/68807499"},"html":{"href":"https://github.com/puppetlabs/puppetdb/pull/1991#discussion_r68807499"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1991"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1991","id":75516753,"html_url":"https://github.com/puppetlabs/puppetdb/pull/1991","diff_url":"https://github.com/puppetlabs/puppetdb/pull/1991.diff","patch_url":"https://github.com/puppetlabs/puppetdb/pull/1991.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1991","number":1991,"state":"open","locked":false,"title":"(PDB-2661) Document the puppetdb_query function","user":{"login":"wkalt","id":4952091,"avatar_url":"https://avatars.githubusercontent.com/u/4952091?v=3","gravatar_id":"","url":"https://api.github.com/users/wkalt","html_url":"https://github.com/wkalt","followers_url":"https://api.github.com/users/wkalt/followers","following_url":"https://api.github.com/users/wkalt/following{/other_user}","gists_url":"https://api.github.com/users/wkalt/gists{/gist_id}","starred_url":"https://api.github.com/users/wkalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkalt/subscriptions","organizations_url":"https://api.github.com/users/wkalt/orgs","repos_url":"https://api.github.com/users/wkalt/repos","events_url":"https://api.github.com/users/wkalt/events{/privacy}","received_events_url":"https://api.github.com/users/wkalt/received_events","type":"User","site_admin":false},"body":"Add a blurb to docs describing usage of puppetdb_query.","created_at":"2016-06-28T17:23:13Z","updated_at":"2016-06-28T17:51:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"189c26f08e15d3668f6f6754206465d8e937a508","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1991/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1991/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1991/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/5eee0b10b4b4287b86da27b05ead77221c2fad74","head":{"label":"wkalt:ticket/stable/pdb-2661-document-puppetdb-query","ref":"ticket/stable/pdb-2661-document-puppetdb-query","sha":"5eee0b10b4b4287b86da27b05ead77221c2fad74","user":{"login":"wkalt","id":4952091,"avatar_url":"https://avatars.githubusercontent.com/u/4952091?v=3","gravatar_id":"","url":"https://api.github.com/users/wkalt","html_url":"https://github.com/wkalt","followers_url":"https://api.github.com/users/wkalt/followers","following_url":"https://api.github.com/users/wkalt/following{/other_user}","gists_url":"https://api.github.com/users/wkalt/gists{/gist_id}","starred_url":"https://api.github.com/users/wkalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkalt/subscriptions","organizations_url":"https://api.github.com/users/wkalt/orgs","repos_url":"https://api.github.com/users/wkalt/repos","events_url":"https://api.github.com/users/wkalt/events{/privacy}","received_events_url":"https://api.github.com/users/wkalt/received_events","type":"User","site_admin":false},"repo":{"id":20931903,"name":"puppetdb","full_name":"wkalt/puppetdb","owner":{"login":"wkalt","id":4952091,"avatar_url":"https://avatars.githubusercontent.com/u/4952091?v=3","gravatar_id":"","url":"https://api.github.com/users/wkalt","html_url":"https://github.com/wkalt","followers_url":"https://api.github.com/users/wkalt/followers","following_url":"https://api.github.com/users/wkalt/following{/other_user}","gists_url":"https://api.github.com/users/wkalt/gists{/gist_id}","starred_url":"https://api.github.com/users/wkalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkalt/subscriptions","organizations_url":"https://api.github.com/users/wkalt/orgs","repos_url":"https://api.github.com/users/wkalt/repos","events_url":"https://api.github.com/users/wkalt/events{/privacy}","received_events_url":"https://api.github.com/users/wkalt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wkalt/puppetdb","description":"Centralized Puppet Storage","fork":true,"url":"https://api.github.com/repos/wkalt/puppetdb","forks_url":"https://api.github.com/repos/wkalt/puppetdb/forks","keys_url":"https://api.github.com/repos/wkalt/puppetdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wkalt/puppetdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wkalt/puppetdb/teams","hooks_url":"https://api.github.com/repos/wkalt/puppetdb/hooks","issue_events_url":"https://api.github.com/repos/wkalt/puppetdb/issues/events{/number}","events_url":"https://api.github.com/repos/wkalt/puppetdb/events","assignees_url":"https://api.github.com/repos/wkalt/puppetdb/assignees{/user}","branches_url":"https://api.github.com/repos/wkalt/puppetdb/branches{/branch}","tags_url":"https://api.github.com/repos/wkalt/puppetdb/tags","blobs_url":"https://api.github.com/repos/wkalt/puppetdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wkalt/puppetdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wkalt/puppetdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/wkalt/puppetdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wkalt/puppetdb/statuses/{sha}","languages_url":"https://api.github.com/repos/wkalt/puppetdb/languages","stargazers_url":"https://api.github.com/repos/wkalt/puppetdb/stargazers","contributors_url":"https://api.github.com/repos/wkalt/puppetdb/contributors","subscribers_url":"https://api.github.com/repos/wkalt/puppetdb/subscribers","subscription_url":"https://api.github.com/repos/wkalt/puppetdb/subscription","commits_url":"https://api.github.com/repos/wkalt/puppetdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/wkalt/puppetdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/wkalt/puppetdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/wkalt/puppetdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/wkalt/puppetdb/contents/{+path}","compare_url":"https://api.github.com/repos/wkalt/puppetdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wkalt/puppetdb/merges","archive_url":"https://api.github.com/repos/wkalt/puppetdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wkalt/puppetdb/downloads","issues_url":"https://api.github.com/repos/wkalt/puppetdb/issues{/number}","pulls_url":"https://api.github.com/repos/wkalt/puppetdb/pulls{/number}","milestones_url":"https://api.github.com/repos/wkalt/puppetdb/milestones{/number}","notifications_url":"https://api.github.com/repos/wkalt/puppetdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wkalt/puppetdb/labels{/name}","releases_url":"https://api.github.com/repos/wkalt/puppetdb/releases{/id}","deployments_url":"https://api.github.com/repos/wkalt/puppetdb/deployments","created_at":"2014-06-17T16:54:41Z","updated_at":"2015-04-03T19:51:15Z","pushed_at":"2016-06-28T17:46:08Z","git_url":"git://github.com/wkalt/puppetdb.git","ssh_url":"git@github.com:wkalt/puppetdb.git","clone_url":"https://github.com/wkalt/puppetdb.git","svn_url":"https://github.com/wkalt/puppetdb","homepage":"http://docs.puppetlabs.com/puppetdb","size":20357,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:stable","ref":"stable","sha":"80bffd970d951f34562d9c73afbac362de077f56","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":2193032,"name":"puppetdb","full_name":"puppetlabs/puppetdb","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppetdb","description":"Centralized Puppet Storage","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppetdb","forks_url":"https://api.github.com/repos/puppetlabs/puppetdb/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppetdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppetdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppetdb/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppetdb/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppetdb/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppetdb/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppetdb/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppetdb/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppetdb/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppetdb/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppetdb/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppetdb/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppetdb/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppetdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppetdb/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppetdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppetdb/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppetdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppetdb/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppetdb/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppetdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppetdb/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppetdb/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/puppetdb/deployments","created_at":"2011-08-11T18:54:46Z","updated_at":"2016-06-25T23:05:06Z","pushed_at":"2016-06-28T17:46:08Z","git_url":"git://github.com/puppetlabs/puppetdb.git","ssh_url":"git@github.com:puppetlabs/puppetdb.git","clone_url":"https://github.com/puppetlabs/puppetdb.git","svn_url":"https://github.com/puppetlabs/puppetdb","homepage":"http://docs.puppetlabs.com/puppetdb","size":20949,"stargazers_count":188,"watchers_count":188,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":155,"mirror_url":null,"open_issues_count":4,"forks":155,"open_issues":4,"watchers":188,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1991"},"html":{"href":"https://github.com/puppetlabs/puppetdb/pull/1991"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1991"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1991/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1991/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1991/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/5eee0b10b4b4287b86da27b05ead77221c2fad74"}}}}
{"actor":{"display_login":"wkalt"}}