Repositories
A repository is a private Git store owned by your user. There are no public repos in the product today.
Name rules
Section titled “Name rules”- Recommended:
^[a-z0-9_-]+$ - Web UI: 1 to 32 characters
- API: 1 to 64 characters
- Unique per user.
POSTreturns 409 if the name is taken.
Create
Section titled “Create”amendable repo create my-repo --description "scratch space"amendable repo create my-repo --storage-bucket-id 11111111-1111-1111-1111-111111111111--storage-bucket-id must be a verified (ACTIVE) BYO bucket you own. Omit it to use the account default bucket, or platform storage if you have no default.
curl -sS -X POST https://api.amendable.io/v1/repositories \ -H "access-token: $AMENDABLE_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name":"my-repo","description":"scratch space"}'import osimport httpx
httpx.post( "https://api.amendable.io/v1/repositories", headers={"access-token": os.environ["AMENDABLE_TOKEN"]}, json={"name": "my-repo"},).raise_for_status()Needs grant API_REPOS_WRITE or ALL.
Response (201):
{ "username": "demo", "name": "my-repo", "active": true, "description": "scratch space", "storage_source": "platform"}storage_source is repo (bound bucket), default (account default BYO), or platform.
List and get
Section titled “List and get”amendable repo list --jsonamendable repo get my-repo --jsoncurl -sS https://api.amendable.io/v1/repositories \ -H "access-token: $AMENDABLE_TOKEN"
curl -sS https://api.amendable.io/v1/repos/$AMENDABLE_USERNAME/my-repo \ -H "access-token: $AMENDABLE_TOKEN"List and get accept any valid token. They only return repositories the token’s scope can see.
Clone URL and browse URL
Section titled “Clone URL and browse URL”git clone https://amendable.io/r/<username>/<repo>.githttps://amendable.io/r/<username>/<repo>https://amendable.io/r/<username>/<repo>/commits/<branch>https://amendable.io/r/<username>/<repo>/blob/<branch>/<path>https://amendable.io/r/<username>/<repo>/raw/<branch>/<path>amendable repo url my-repo prints the clone URL.
Delete
Section titled “Delete”amendable repo delete my-repo --yescurl -sS -X DELETE \ https://api.amendable.io/v1/repos/$AMENDABLE_USERNAME/my-repo \ -H "access-token: $AMENDABLE_TOKEN"204 on success. 404 if the name is wrong or the token cannot see it. Needs API_REPOS_WRITE or ALL.
Deleting a repo does not delete a BYO bucket. The bucket cannot be deleted while any repo still depends on it.
Quotas that block create
Section titled “Quotas that block create”| Limit | Free default | Error |
|---|---|---|
| Active repositories | 5 | 422 active quota exceeded |
| Total repositories (including inactive) | 25 | 422 total quota exceeded |
Paid plans raise both. See Usage and quotas.