List all cookbooks in an account.
Table of Contents
Prerequisite: Example assumes you have previously authenticated, and your valid session cookie is in 'mycookie'.
The following example will list all cookbooks that have been imported into an account from the repositories section. Cookbooks will appear in your account when you import ServerTemplates into your account from the MultiCloud MarketPlace or if you import them into your account from the repositories section. To import your own cookbooks into RightScale, you need create a repository and import cookbooks from the repository. For more information, see Create Repository and Import Cookbook from a Repository.
#!/bin/sh -e curl -i -H X_API_VERSION:1.5 -b mycookie -X GET https://my.rightscale.com/api/cookbooks.xml
Note: Truncated XML output without headers included (to save space).
<?xml version="1.0" encoding="UTF-8"?> <cookbooks> <cookbook> <links> <link rel="self" href="/api/cookbooks/580488001"/> </links> <updated_at>2013/09/04 17:32:00 +0000</updated_at> <version>2.2.1</version> <created_at>2013/09/03 17:11:45 +0000</created_at> <source_info_summary>RightScale</source_info_summary> <state>normal</state> <name>yum</name> <namespace>alternate</namespace> <id>580488001</id> <actions> <action rel="freeze"/> <action rel="follow"/> <action rel="obsolete"/> </actions> </cookbook> <cookbook> <links> <link rel="self" href="/api/cookbooks/580486001"/> </links> <updated_at>2013/09/04 17:31:59 +0000</updated_at> <version>1.9.3</version> <created_at>2013/09/03 17:11:44 +0000</created_at> <source_info_summary>RightScale</source_info_summary> <state>normal</state> <name>apt</name> <namespace>alternate</namespace> <id>580486001</id> <actions> <action rel="freeze"/> <action rel="follow"/> <action rel="obsolete"/> </actions> </cookbook> . . .
© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.