[chef] Re: Re: REST API question: How to fetch file?

Chronological Thread 
  • From: Roberto Leibman < >
  • To:
  • Subject: [chef] Re: Re: REST API question: How to fetch file?
  • Date: Thu, 8 Oct 2015 13:14:11 -0700

On 10/08/2015 12:27 PM, Noah Kantrowitz wrote:
On Oct 8, 2015, at 1:59 PM, Roberto Leibman 
< >

I need to fetch an attribute file from the chef service...

Using the REST API, I call

GET /organizations/NAME/cookbooks/NAME/VERSION

And among other things I get:


I tried to fetch the file using the url given (either directly, or using the 
same signature schema as other REST api calls), but it doesn't work, I get a 

What is the meaning of the URL if it's not to fetch the file? How do I fetch 
the file? Is there a different REST api call that will give me the file 
directly (since I know everything else about it)
What are you trying to do? Attempting to manually re-implement cookbook 
downloads seems like a bad idea. Can you illustrate your use case?

Excelent question. I need to provide some limited functionality to some users that's similar to the chef web ui, in particular, I need to be able to display a file that's calculated (i.e. not in source control anywhere else)... the file itself is a calculation of all the npm packages that are "latest" when my cookbook is "cooked" into chef-client.

Why do you think that seems like a bad idea?

Archive powered by MHonArc 2.6.16.