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 <[email protected]> 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 [email protected].
> To post to this group, send email to [email protected].
> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to