Repositories
A repository has a large number of moving parts. Over time, you'll be able to access all of these using the API as well as the web interface. At present, you can access a list of all available repositories for any project within your account with various properties (as shown below).
API URLs
You an use any of the API urls below to retrieve information about repositories within individual projects. You need to pass the project's permalink into the URL for all requests.
| Data | Method | URL | 
| All repositories for a specific project | GET | /project/repositories | 
| Create repository | POST | /project/repositories | 
| Specific repository | GET | /project/repository | 
| Delete repository | DELETE | /project/repository | 
Object Properties
The XML output below shows the properties which are returned by default when accessing project details.
GET /project/repository
<repository>
  <name>Gem</name>
  <permalink>gem</permalink>
  <disk-usage>450560</disk-usage>
  <last-commit-ref>57f5897e1c14631dbecfa29b647bef02cc631559</last-commit-ref>
  <clone-url>git@codebasehq.com:account/codebase/gem.git</clone-url>
  <source></source>
  <sync type="boolean">false</sync>
  <last-sync-at type="datetime" nil="true"></last-sync-at>
</repository>
- namecontains the repositories's name as entered
- permalinkis the permalink for the repository
- disk-usagethe amount of disk space this repository is using in bytes.
- last-commit-refthe reference of the last commit which was pushed into this repository.
- clone-urlthe URL which can be used to checkout/clone this repository.
All other variables are part of the importing and sync options (currently only available on Git repositories).
- sourcethe URL of the repository where this repository was imported from. Blank if the repository was not imported.
- syncwhether or not this repository is currently being kept in sync with the- source.
- last-sync-atthe last time we fetched data from the remote repository (- source).
Creating Repository
Just send the name SCM type, and optionally the permalink of your repository to /project/repositories
POST /project/repositories
<repository>
  <name>Gem</name>
  <scm>git</scm>
</repository>