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 > Repositories > List Repositories

List Repositories

List all repositories of 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 repositories added in an account. If you are looking for a specific repository, you can list all the repositories to locate the repository ID and perform a Show Repository

#!/bin/sh -e
curl -i -H X_API_VERSION:1.5 -b mycookie -X GET https://my.rightscale.com/api/repositories.xml

Sample Output

Note:  Truncated XML output without headers included (to save space).

<?xml version="1.0" encoding="UTF-8"?>
<repositories>
  <repository>
    <links>
      <link rel="self" href="/api/repositories/13"/>
    </links>
    <updated_at>2013/08/29 05:37:44 +0000</updated_at>
    <source_type>git</source_type>
    <read_only>false</read_only>
    <credentials>
      <ssh_key></ssh_key>
    </credentials>
    <asset_paths>
      <cookbooks>
        <cookbook>cookbooks</cookbook>
      </cookbooks>
    </asset_paths>
    <source>git://github.com/rightscale/cookbooks_public.git</source>
    <created_at>2009/09/16 05:28:40 +0000</created_at>
    <commit_reference></commit_reference>
    <description>From JohnDoe - RightScale</description>
    <name>GitHub - rightscale/cookbooks_public</name>
    <fetch_status>
      <succeeded_at>2013/08/29 05:37:44 +0000</succeeded_at>
      <succeeded_commit>0f255c3877210f6ece0a9cc8fc410c9c4f974055</succeeded_commit>
    </fetch_status>
    <id>13</id>
    <actions>
      <action rel="cookbook_import_preview"/>
      <action rel="cookbook_import"/>
      <action rel="refetch"/>
      <action rel="resolve"/>
    </actions>
  </repository>
  <repository>
    <links>
      <link rel="self" href="/api/repositories/120"/>
    </links>
    <updated_at>2013/05/24 03:15:34 +0000</updated_at>
    <source_type>svn</source_type>
    <read_only>false</read_only>
    <credentials>
      <username>text:jondoe</username>
      <password>text:password1</password>
    </credentials>
. . . 
You must to post a comment.
Last modified
12:16, 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.