Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > Guides > RightScale API 1.5 > Examples > Cookbooks > List Cookbooks

List Cookbooks

List all cookbooks in an account.

icon_curl_v1.png    

Table of Contents

Curl

Prerequisite:  Example assumes you have previously authenticated, and your valid session cookie is in 'mycookie'.

Example Call

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

Sample Output

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>
. . . 
You must to post a comment.
Last modified
12:14, 6 Sep 2013

Tags

This page has no custom tags.

Classifications

This page has no classifications.

Announcements

None


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