In puppetdb v2 node api, it changes behavior with "GET /v2/nodes<http://docs.puppetlabs.com/puppetdb/1.2/api/query/v2/nodes.html#get-v2nodes>", which only returns active nodes now. In v1, it would return all nodes. So in puppetdb v2 node api, how is it possible to return all nodes (both active and deactivated ones)? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Hiya, So at the moment there is no way to do this with the /v2/nodes API - you can query particular nodes that are deactivated but you can''t filter around the deactivated status nor get a list of deactivated and activated nodes today. This is however a good feature request, if possible we''d appreciate if you could raise a request here for this functionality so its tracked: http://projects.puppetlabs.com/projects/puppetdb/issues/new ken. On Mon, Apr 22, 2013 at 4:09 AM, hai wu <haiwu.us@gmail.com> wrote:> In puppetdb v2 node api, it changes behavior with "GET /v2/nodes", which > only returns active nodes now. In v1, it would return all nodes. > > So in puppetdb v2 node api, how is it possible to return all nodes (both > active and deactivated ones)? > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Thanks Ken. Bug 20392 is now created for this. On Wed, Apr 24, 2013 at 12:46 PM, Ken Barber <ken@puppetlabs.com> wrote:> Hiya, > > So at the moment there is no way to do this with the /v2/nodes API - > you can query particular nodes that are deactivated but you can''t > filter around the deactivated status nor get a list of deactivated and > activated nodes today. > > This is however a good feature request, if possible we''d appreciate if > you could raise a request here for this functionality so its tracked: > > http://projects.puppetlabs.com/projects/puppetdb/issues/new > > ken. > > > On Mon, Apr 22, 2013 at 4:09 AM, hai wu <haiwu.us@gmail.com> wrote: > > In puppetdb v2 node api, it changes behavior with "GET /v2/nodes", which > > only returns active nodes now. In v1, it would return all nodes. > > > > So in puppetdb v2 node api, how is it possible to return all nodes (both > > active and deactivated ones)? > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Puppet Users" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to puppet-users+unsubscribe@googlegroups.com. > > To post to this group, send email to puppet-users@googlegroups.com. > > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Hey mate, It looks liek you got this "v2" API working. How did you setup that? I spend so much time to get this working but no luck. Whenever I try the url I get 404 error in puppetdb log... If you could help me then that would be great! Thanks Watchman On Monday, April 22, 2013 1:09:08 PM UTC+10, hyde wrote:> > In puppetdb v2 node api, it changes behavior with "GET /v2/nodes<http://docs.puppetlabs.com/puppetdb/1.2/api/query/v2/nodes.html#get-v2nodes>", > which only returns active nodes now. In v1, it would return all nodes. > > So in puppetdb v2 node api, how is it possible to return all nodes (both > active and deactivated ones)? >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
You should be able to use ''curl'' to access the API, there are some examples for /v2/nodes in the docs as a start ... and the rest of the end-points have similar examples: http://docs.puppetlabs.com/puppetdb/1.3/api/query/v2/nodes.html Also take a look at the general curl advice page: http://docs.puppetlabs.com/puppetdb/1.3/api/query/curl.html If you''re having issues getting it working, provide the commands you are trying in-thread so we can see it in detail. For example, this is my results: # curl -G -H "Accept: application/json" ''http://localhost:8080/v2/nodes'' [ { "name" : "puppetdb1.vm", "deactivated" : null, "catalog_timestamp" : "2013-07-22T12:20:07.945Z", "facts_timestamp" : "2013-07-22T12:15:46.434Z", "report_timestamp" : "2013-07-22T12:15:41.000Z" } ] ken. On Thu, Jul 25, 2013 at 5:49 AM, watchman <manojtr@gmail.com> wrote:> Hey mate, > > It looks liek you got this "v2" API working. How did you setup that? > I spend so much time to get this working but no luck. Whenever I try the url > I get 404 error in puppetdb log... > > If you could help me then that would be great! > > Thanks > Watchman > > > On Monday, April 22, 2013 1:09:08 PM UTC+10, hyde wrote: >> >> In puppetdb v2 node api, it changes behavior with "GET /v2/nodes", which >> only returns active nodes now. In v1, it would return all nodes. >> >> So in puppetdb v2 node api, how is it possible to return all nodes (both >> active and deactivated ones)? > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.