Get the list of `organizations` from Chef API

Hey Guys, I’m trying to get the list of organizations from our chef server using API Documentation. The response I get back from the request is a html format of login page for chef-manage.

I’m using postman tool and Basic Auth (Authentication, Username and Password)

Is anyone experienced the same? Appreciate all your help.

Basic auth isn’t going to work, you need to use the X-Ops-Authorization scheme. Basic auth only works for /stats.

Thank you for answering, By any chance is there any documentation available for this ?

Only what is on the docs site … if you’re using the latest Chef Infra Server the docs are at Otherwise you’ll have to search for older docs in the archives, like

You could dig into the knife code to see how it is done there. is the Chef::ServerAPI class, used by knife to talk to a Chef server.

There are a couple api clients out there. I’d recommend using one of them to make the api call. is one I support and it can be used to list organizations.

But, would knife opc work for you? The initial overhead to set up the call is lower than using the api calls.