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


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

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:


         "name":"versions.rb",
         "path":"attributes/versions.rb",
         "url":"https://myserver:443/bookshelf/organization-3217b9e79830f0fa8747107257d4e50e/checksum-bec47221813e48f656813335fbf57677?AWSAccessKeyId=1d77956dc74704cfa99edc19d2f93bb7909ae802&Expires=1444350260&Signature=kNVJhVbKdSdXI5aLW6X7zS/wHw%3D",
         "checksum":"bec47221813e48f656813339fbf57677",
         "specificity":"default"
      }

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 403.

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)

Thanks,

Roberto Leibman



Archive powered by MHonArc 2.6.16.

§