Jira (PDB-4214) --data-urlencode 'pretty=true' does not work
Title: Message Title garrett honeycutt commented on PDB-4214 Re: --data-urlencode 'pretty=true' does not work Austin Blatt https://puppet.com/docs/puppetdb/6.2/api/query/curl.html#pretty-querying-of-puppetdb has the same issue, so it does not appear as though the documentation is fixed. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-4214) --data-urlencode 'pretty=true' does not work
Title: Message Title Austin Blatt updated an issue PuppetDB / PDB-4214 --data-urlencode 'pretty=true' does not work Change By: Austin Blatt Release Notes: Not Needed Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-4214) --data-urlencode 'pretty=true' does not work
Title: Message Title Austin Blatt updated an issue PuppetDB / PDB-4214 --data-urlencode 'pretty=true' does not work Change By: Austin Blatt Fix Version/s: PDB n/a Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-4214) --data-urlencode 'pretty=true' does not work
Title: Message Title Austin Blatt commented on PDB-4214 Re: --data-urlencode 'pretty=true' does not work The issue was just related to documentation. The pretty print option varies slightly depending on whether you are using GET or POST. With GET the basic format will look like curl -X GET http://localhost:8080/pdb/query/v4/nodes \ --data-urlencode 'pretty=true' And with POST the basic format will look like curl -X POST http://localhost:8080/pdb/query/v4/nodes \ -H 'Content-Type:application/json' \ -d '{"pretty": true}' Add Comment
Jira (PDB-4214) --data-urlencode 'pretty=true' does not work
Title: Message Title Austin Blatt assigned an issue to Austin Blatt PuppetDB / PDB-4214 --data-urlencode 'pretty=true' does not work Change By: Austin Blatt Assignee: Austin Blatt Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-4214) --data-urlencode 'pretty=true' does not work
Title: Message Title Austin Blatt commented on PDB-4214 Re: --data-urlencode 'pretty=true' does not work The error you're seeing is because it is getting the wrong Content-Type header, so you should set that with the curl argument -H 'Content-Type:application/json'. After that there's at least something wrong with our docs (and maybe PuppetDB), I had to change the --data-urlencode 'pretty=true' argument to its json form. So I believe the following query will work for you [puppet]$ curl -X POST https://puppetdb.example.com:8081/pdb/query/v4/nodes \ --tlsv1 \ --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem \ --cert /etc/puppetlabs/puppet/ssl/certs/puppet.example.com.pem \ --key /etc/puppetlabs/puppet/ssl/private_keys/puppet.example.com.pem \ -H 'Content-Type:application/json' \ -d '{"pretty":true}' Add Comment
Jira (PDB-4214) --data-urlencode 'pretty=true' does not work
Title: Message Title garrett honeycutt commented on PDB-4214 Re: --data-urlencode 'pretty=true' does not work It works fine without the --data-urlencode 'pretty=true' output: [ {"deactivated":null,"latest_report_hash":null,"facts_environment":"production","cached_catalog_status":null,"report_environment":null,"latest_report_corrective_change":null,"catalog_environment":"production","facts_timestamp":"2018-12-11T04:27:59.296Z","latest_report_noop":null,"expired":null,"latest_report_noop_pending":null,"report_timestamp":null,"certname":"puppet.example.com","catalog_timestamp":"2018-12-11T04:28:01.351Z","latest_report_job_id":null,"latest_report_status":null} , {"deactivated":null,"latest_report_hash":null,"facts_environment":"production","cached_catalog_status":null,"report_environment":null,"latest_report_corrective_change":null,"catalog_environment":"production","facts_timestamp":"2018-12-11T04:27:50.919Z","latest_report_noop":null,"expired":null,"latest_report_noop_pending":null,"report_timestamp":null,"certname":"puppetdb.example.com","catalog_timestamp":"2018-12-11T04:27:55.583Z","latest_report_job_id":null,"latest_report_status":null} ] Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Jira (PDB-4214) --data-urlencode 'pretty=true' does not work
Title: Message Title garrett honeycutt updated an issue PuppetDB / PDB-4214 --data-urlencode 'pretty=true' does not work Change By: garrett honeycutt Environment: [root@puppetdb ~]# rpm -qa |grep -i puppetpuppet-agent-5.5.8-1.el7.x86_64puppet5-release-5.0.0-4.el7.noarchpuppetdb-5.2.6-1.el7.noarchRunning the query from the puppet master to a separate host running puppetdb and postgres. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-4214) --data-urlencode 'pretty=true' does not work
Title: Message Title garrett honeycutt updated an issue PuppetDB / PDB-4214 --data-urlencode 'pretty=true' does not work Change By: garrett honeycutt Labels: docs Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PDB-4214) --data-urlencode 'pretty=true' does not work
Title: Message Title garrett honeycutt updated an issue PuppetDB / PDB-4214 --data-urlencode 'pretty=true' does not work Change By: garrett honeycutt Following the instructions at the following link to provide pretty printed json does not work.https://puppet.com/docs/puppetdb/5.2/api/query/curl.html#pretty-querying-of-puppetdbI would expect to see print formatted json and instead get an error.{code}[puppet]$ curl -X POST https://puppetdb.example.com:8081/pdb/query/v4/nodes \ --tlsv1 \ --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem \ --cert /etc/puppetlabs/puppet/ssl/certs/puppet.example.com.pem \ --key /etc/puppetlabs/puppet/ssl/private_keys/puppet.example.com.pem \ --data-urlencode 'pretty=true'content type application/x-www-form-urlencoded not supported{code} Environment:Running the query from the puppet master to a separate host running puppetdb and postgres.{code}[root@puppetdb ~]# rpm -qa |grep -i puppetpuppet-agent-5.5.8-1.el7.x86_64puppet5-release-5.0.0-4.el7.noarchpuppetdb-5.2.6-1.el7.noarch{code} Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Jira (PDB-4214) --data-urlencode 'pretty=true' does not work
Title: Message Title garrett honeycutt created an issue PuppetDB / PDB-4214 --data-urlencode 'pretty=true' does not work Issue Type: Bug Assignee: Unassigned Created: 2018/12/10 8:42 PM Environment: [root@puppetdb ~]# rpm -qa |grep -i puppet puppet-agent-5.5.8-1.el7.x86_64 puppet5-release-5.0.0-4.el7.noarch puppetdb-5.2.6-1.el7.noarch Running the query from the puppet master to a separate host running puppetdb and postgres. Priority: Normal Reporter: garrett honeycutt Following the instructions at the following link to provide pretty printed json does not work. https://puppet.com/docs/puppetdb/5.2/api/query/curl.html#pretty-querying-of-puppetdb I would expect to see print formatted json and instead get an error. [puppet]$ curl -X POST https://puppetdb.example.com:8081/pdb/query/v4/nodes \ --tlsv1 \ --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem \ --cert /etc/puppetlabs/puppet/ssl/certs/puppet.example.com.pem \