Repositories
Repositories on our git service (clone, fetch and push over HTTPS and SSH), their rules on branches and tags, deploy and personal SSH keys, mirrors, and the record of every push.
/v1/projects/{project}/repositoriesThe project's repositories: its source repositories and each app's and function's#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
any
Response
200object
repositoriesRepository[]idstringrequireda source repository's
repo_…, or the app's or function's idnamestringrequiredkindstringrequiredone of
source,app,functionhost_labelstringrequiredits address label: <host_label>.git
descriptionstringclone_urlobjectrequiredhttpsstringrequiredsign in with any user name and an API key as the password
sshstringrequiredsign in with an SSH key added to the team
default_branchstringrequiredsigned_commitsbooleanmax_size_mbintegerits size limit (the plan's unless set)
size_bytesintegerbuildsbooleanrequiredtrue: a push builds and deploys (an app's or function's); false: a source repository
appobject | nullidstringnamestringkindstring
projectobject | nullidstringnamestring
created_atstring (date-time)
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/projects/my-api/repositories" \
-H "Authorization: Bearer $KEY"/v1/projects/{project}/repositoriesMake a source repository (pushes to it are kept, never built)#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
any
Request bodyapplication/json
namestringrequiredlowercase letters, digits and single hyphens, 1–63 characters; not the name of an app or function of the project
descriptionstringup to 300 characters
default_branchstringthe branch a clone checks out, and its pipelines' production
default
"main"host_labelstringits address label, unique on the platform (default: its name, or <name>-<project>)
Response
201RepositoryCreated
idstringrequireda source repository's
repo_…, or the app's or function's idnamestringrequiredkindstringrequiredone of
source,app,functionhost_labelstringrequiredits address label: <host_label>.git
descriptionstringclone_urlobjectrequiredhttpsstringrequiredsign in with any user name and an API key as the password
sshstringrequiredsign in with an SSH key added to the team
default_branchstringrequiredsigned_commitsbooleanmax_size_mbintegerits size limit (the plan's unless set)
size_bytesintegerbuildsbooleanrequiredtrue: a push builds and deploys (an app's or function's); false: a source repository
appobject | nullidstringnamestringkindstring
projectobject | nullidstringnamestring
created_atstring (date-time)
Errors
| Status | Description |
|---|---|
| 400 | Invalid: bad_name · bad_branch · bad_description · bad_host_label |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden · limit_exceeded |
| 404 | Not found: not_found |
| 409 | Taken: name_taken · host_label_taken |
| 500 | internal: an unexpected failure |
Example
curl -X POST "https://api.ibel.ai/v1/projects/my-api/repositories" \
-H "Authorization: Bearer $KEY" \
-d '{"name":"my-api"}'/v1/projects/{project}/repositories/{name}A repository: its clone addresses, default branch, signed commits, size and limit#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
anynamestringpathrequiredthe repository's name in the project: a source repository's, or an app's or function's name
kindstringquerywhen an app, a function and a source repository share a name:
source,apporfunctionone of
source,app,function
Response
200Repository
idstringrequireda source repository's
repo_…, or the app's or function's idnamestringrequiredkindstringrequiredone of
source,app,functionhost_labelstringrequiredits address label: <host_label>.git
descriptionstringclone_urlobjectrequiredhttpsstringrequiredsign in with any user name and an API key as the password
sshstringrequiredsign in with an SSH key added to the team
default_branchstringrequiredsigned_commitsbooleanmax_size_mbintegerits size limit (the plan's unless set)
size_bytesintegerbuildsbooleanrequiredtrue: a push builds and deploys (an app's or function's); false: a source repository
appobject | nullidstringnamestringkindstring
projectobject | nullidstringnamestring
created_atstring (date-time)
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/projects/my-api/repositories/my-api" \
-H "Authorization: Bearer $KEY"/v1/projects/{project}/repositories/{name}Delete a source repository with its contents (an app's goes with the app)#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin
Parameters
anynamestringpathrequiredthe repository's name in the project: a source repository's, or an app's or function's name
kindstringquerywhen an app, a function and a source repository share a name:
source,apporfunctionone of
source,app,function
Response
200object
namestringdeletedboolean
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 409 | not_source: an app's or function's repository |
| 500 | internal: an unexpected failure |
Example
curl -X DELETE "https://api.ibel.ai/v1/projects/my-api/repositories/my-api" \
-H "Authorization: Bearer $KEY"/v1/projects/{project}/repositories/{name}Change a repository's default branch, signed-commit check, size limit or description#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin
Parameters
anynamestringpathrequiredthe repository's name in the project: a source repository's, or an app's or function's name
kindstringquerywhen an app, a function and a source repository share a name:
source,apporfunctionone of
source,app,function
Request bodyapplication/json
default_branchstringsigned_commitsbooleantrue: every new commit pushed must be signed with an SSH key of a team member
max_size_mbinteger | nullthe repository's size limit, at most the plan's; null: the plan's
at least 1
descriptionstringup to 300 characters
Response
200Repository
idstringrequireda source repository's
repo_…, or the app's or function's idnamestringrequiredkindstringrequiredone of
source,app,functionhost_labelstringrequiredits address label: <host_label>.git
descriptionstringclone_urlobjectrequiredhttpsstringrequiredsign in with any user name and an API key as the password
sshstringrequiredsign in with an SSH key added to the team
default_branchstringrequiredsigned_commitsbooleanmax_size_mbintegerits size limit (the plan's unless set)
size_bytesintegerbuildsbooleanrequiredtrue: a push builds and deploys (an app's or function's); false: a source repository
appobject | nullidstringnamestringkindstring
projectobject | nullidstringnamestring
created_atstring (date-time)
Errors
| Status | Description |
|---|---|
| 400 | Invalid: bad_branch · bad_size · bad_description · bad_request |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl -X PATCH "https://api.ibel.ai/v1/projects/my-api/repositories/my-api" \
-H "Authorization: Bearer $KEY" \
-d '{"default_branch":"…","signed_commits":true,"max_size_mb":1,"description":"…"}'/v1/projects/{project}/repositories/{name}/rulesA repository's rules on branches and tags#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
anynamestringpathrequiredthe repository's name in the project: a source repository's, or an app's or function's name
kindstringquerywhen an app, a function and a source repository share a name:
source,apporfunctionone of
source,app,function
Response
200object
rulesRepositoryRule[]idstring (uuid)requiredpatternstringrequiredno_forcebooleanrequiredno_deletebooleanrequiredno_updatebooleanrequiredpushstring[]requiredcreated_atstring (date-time)
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/projects/my-api/repositories/my-api/rules" \
-H "Authorization: Bearer $KEY"/v1/projects/{project}/repositories/{name}/rulesProtect branches or tags: no force pushes, no deletes, pushes only by named keys or a pipeline#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin
Parameters
anynamestringpathrequiredthe repository's name in the project: a source repository's, or an app's or function's name
kindstringquerywhen an app, a function and a source repository share a name:
source,apporfunctionone of
source,app,function
Request bodyapplication/json
patternstringrequiredrefs/heads/<branch> or refs/tags/<tag>;
*within one part of the name,**across partsno_forcebooleanrefuse pushes that are not fast-forwards
default
trueno_deletebooleandefault
trueno_updatebooleanrefuse moving it once it exists (default true for tags, false for branches)
pushstring[]the only callers that may push there:
key:<API key id>,sshkey:<SSH key id>orpipeline; empty: anyone who may push0–20 items
Response
201RepositoryRuleCreated
idstring (uuid)requiredpatternstringrequiredno_forcebooleanrequiredno_deletebooleanrequiredno_updatebooleanrequiredpushstring[]requiredcreated_atstring (date-time)
Errors
| Status | Description |
|---|---|
| 400 | Invalid: bad_pattern · bad_push · bad_request |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden · limit_exceeded |
| 404 | Not found: not_found |
| 409 | rule_exists: a rule for that pattern |
| 500 | internal: an unexpected failure |
Example
curl -X POST "https://api.ibel.ai/v1/projects/my-api/repositories/my-api/rules" \
-H "Authorization: Bearer $KEY" \
-d '{"pattern":"…"}'/v1/projects/{project}/repositories/{name}/rules/{id}Remove a rule#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin
Parameters
anynamestringpathrequiredthe repository's name in the project: a source repository's, or an app's or function's name
idstring (uuid)pathrequiredthe rule's id
kindstringquerywhen an app, a function and a source repository share a name:
source,apporfunctionone of
source,app,function
Response
200object
idstringdeletedboolean
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl -X DELETE "https://api.ibel.ai/v1/projects/my-api/repositories/my-api/rules/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
-H "Authorization: Bearer $KEY"/v1/projects/{project}/repositories/{name}/rules/{id}Change a rule#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin
Parameters
anynamestringpathrequiredthe repository's name in the project: a source repository's, or an app's or function's name
idstring (uuid)pathrequiredthe rule's id
kindstringquerywhen an app, a function and a source repository share a name:
source,apporfunctionone of
source,app,function
Request bodyapplication/json
no_forcebooleanrefuse pushes that are not fast-forwards
default
trueno_deletebooleandefault
trueno_updatebooleanrefuse moving it once it exists (default true for tags, false for branches)
pushstring[]the only callers that may push there:
key:<API key id>,sshkey:<SSH key id>orpipeline; empty: anyone who may push0–20 items
Response
200RepositoryRule
idstring (uuid)requiredpatternstringrequiredno_forcebooleanrequiredno_deletebooleanrequiredno_updatebooleanrequiredpushstring[]requiredcreated_atstring (date-time)
Errors
| Status | Description |
|---|---|
| 400 | Invalid: bad_push · bad_request |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl -X PATCH "https://api.ibel.ai/v1/projects/my-api/repositories/my-api/rules/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
-H "Authorization: Bearer $KEY" \
-d '{"no_force":true,"no_delete":true,"no_update":true,"push":["…"]}'/v1/projects/{project}/repositories/{name}/keysA repository's deploy keys (SSH keys for that repository only)#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
anynamestringpathrequiredthe repository's name in the project: a source repository's, or an app's or function's name
kindstringquerywhen an app, a function and a source repository share a name:
source,apporfunctionone of
source,app,function
Response
200object
keysSshKey[]idstring (uuid)requirednamestringrequiredtypestringrequiredfingerprintstringrequiredSHA256:…, as ssh-keygen -l shows it
public_keystringaccessstringrequiredone of
read,writepersonobjectidstringemailstring
created_atstring (date-time)last_used_atstring (date-time) | null
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/projects/my-api/repositories/my-api/keys" \
-H "Authorization: Bearer $KEY"/v1/projects/{project}/repositories/{name}/keysAdd a deploy key: an SSH key that reads (default) or also pushes this repository only#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
anynamestringpathrequiredthe repository's name in the project: a source repository's, or an app's or function's name
kindstringquerywhen an app, a function and a source repository share a name:
source,apporfunctionone of
source,app,function
Request bodyapplication/json
namestringrequiredup to 100 characters
public_keystringrequiredone line of an SSH public key (the .pub file): Ed25519, ECDSA or RSA of 3072 bits or more
accessstringone of
read,write
Response
201SshKeyCreated
idstring (uuid)requirednamestringrequiredtypestringrequiredfingerprintstringrequiredSHA256:…, as ssh-keygen -l shows it
public_keystringaccessstringrequiredone of
read,writepersonobjectidstringemailstring
created_atstring (date-time)last_used_atstring (date-time) | null
Errors
| Status | Description |
|---|---|
| 400 | Invalid: bad_name · bad_key · bad_access |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden · limit_exceeded |
| 404 | Not found: not_found |
| 409 | key_taken: the key is already added (one key is one sign-in) |
| 500 | internal: an unexpected failure |
Example
curl -X POST "https://api.ibel.ai/v1/projects/my-api/repositories/my-api/keys" \
-H "Authorization: Bearer $KEY" \
-d '{"name":"my-api","public_key":"…"}'/v1/projects/{project}/repositories/{name}/keys/{id}Remove a deploy key (it stops working at once)#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
anynamestringpathrequiredthe repository's name in the project: a source repository's, or an app's or function's name
idstring (uuid)pathrequiredthe key's id
kindstringquerywhen an app, a function and a source repository share a name:
source,apporfunctionone of
source,app,function
Response
200object
idstringdeletedboolean
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl -X DELETE "https://api.ibel.ai/v1/projects/my-api/repositories/my-api/keys/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
-H "Authorization: Bearer $KEY"/v1/projects/{project}/repositories/{name}/mirrorsA repository's mirrors and how their last run went (never their secrets)#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
anynamestringpathrequiredthe repository's name in the project: a source repository's, or an app's or function's name
kindstringquerywhen an app, a function and a source repository share a name:
source,apporfunctionone of
source,app,function
Response
200object
mirrorsRepositoryMirror[]idstring (uuid)requireddirectionstringrequiredone of
in,outurlstringrequiredusernamestring | nullsecret_hintstring | nullthe secret's last 4 characters
prunebooleaninterval_minutesinteger | nulllast_run_atstring (date-time) | nulllast_statusstring | nullone of
ok,failed,running,nulllast_errorstring | nullcreated_atstring (date-time)
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/projects/my-api/repositories/my-api/mirrors" \
-H "Authorization: Bearer $KEY"/v1/projects/{project}/repositories/{name}/mirrorsCopy every push to another host (out), or follow another host's repository (in: a source repository only; pushes here are then refused)#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin
Parameters
anynamestringpathrequiredthe repository's name in the project: a source repository's, or an app's or function's name
kindstringquerywhen an app, a function and a source repository share a name:
source,apporfunctionone of
source,app,function
Request bodyapplication/json
directionstringrequiredone of
in,outurlstringrequiredthe other repository's https:// address
usernamestringup to 200 characters
secretstringa token or password for the other host; kept sealed and never shown again
prunebooleanremove branches and tags the other side no longer has
default
trueinterval_minutesintegerin: how often it is brought up to date
5–1440 · default
10
Response
201RepositoryMirrorCreated
idstring (uuid)requireddirectionstringrequiredone of
in,outurlstringrequiredusernamestring | nullsecret_hintstring | nullthe secret's last 4 characters
prunebooleaninterval_minutesinteger | nulllast_run_atstring (date-time) | nulllast_statusstring | nullone of
ok,failed,running,nulllast_errorstring | nullcreated_atstring (date-time)
Errors
| Status | Description |
|---|---|
| 400 | Invalid: bad_direction · bad_url (https only, public addresses) · bad_username · bad_secret · bad_interval · not_source |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden · limit_exceeded |
| 404 | Not found: not_found |
| 409 | mirror_exists: the repository already follows another |
| 500 | internal: an unexpected failure |
Example
curl -X POST "https://api.ibel.ai/v1/projects/my-api/repositories/my-api/mirrors" \
-H "Authorization: Bearer $KEY" \
-d '{"direction":"in","url":"https://example.com"}'/v1/projects/{project}/repositories/{name}/mirrors/{id}Remove a mirror#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin
Parameters
anynamestringpathrequiredthe repository's name in the project: a source repository's, or an app's or function's name
idstring (uuid)pathrequiredthe mirror's id
kindstringquerywhen an app, a function and a source repository share a name:
source,apporfunctionone of
source,app,function
Response
200object
idstringdeletedboolean
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl -X DELETE "https://api.ibel.ai/v1/projects/my-api/repositories/my-api/mirrors/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
-H "Authorization: Bearer $KEY"/v1/projects/{project}/repositories/{name}/mirrors/{id}/syncRun a mirror now#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
anynamestringpathrequiredthe repository's name in the project: a source repository's, or an app's or function's name
idstring (uuid)pathrequiredthe mirror's id
kindstringquerywhen an app, a function and a source repository share a name:
source,apporfunctionone of
source,app,function
Response
202RepositoryMirrorAccepted
idstring (uuid)requireddirectionstringrequiredone of
in,outurlstringrequiredusernamestring | nullsecret_hintstring | nullthe secret's last 4 characters
prunebooleaninterval_minutesinteger | nulllast_run_atstring (date-time) | nulllast_statusstring | nullone of
ok,failed,running,nulllast_errorstring | nullcreated_atstring (date-time)
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
| 503 | unavailable: mirrors cannot run right now |
Example
curl -X POST "https://api.ibel.ai/v1/projects/my-api/repositories/my-api/mirrors/88e2fe1d-6d75-4de5-8c8f-27380ec66903/sync" \
-H "Authorization: Bearer $KEY"/v1/projects/{project}/repositories/{name}/eventsEvery push, tag and delete, with the commit before and after, newest first (50 a page, at most 200)#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
anynamestringpathrequiredthe repository's name in the project: a source repository's, or an app's or function's name
kindstringquerywhen an app, a function and a source repository share a name:
source,apporfunctionone of
source,app,functionanyany
Response
200object
eventsRepositoryEvent[]idstring (uuid)requiredkindstringrequiredone of
push,tag,deleterefstringrequiredbeforestring | nullnull: created
afterstring | nullnull: deleted
forcedbooleanviastringrequiredone of
https,ssh,mirroractorstringcreated_atstring (date-time)
next_cursorstring | nullsend as
cursorfor the next page; null on the last page
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/projects/my-api/repositories/my-api/events" \
-H "Authorization: Bearer $KEY"/v1/ssh-keysYour SSH keys for cloning and pushing (all=1, owner or admin: every member's)#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
allstringquery1: every member's keys (owner or admin)one of
1
Response
200object
keysSshKey[]idstring (uuid)requirednamestringrequiredtypestringrequiredfingerprintstringrequiredSHA256:…, as ssh-keygen -l shows it
public_keystringaccessstringrequiredone of
read,writepersonobjectidstringemailstring
created_atstring (date-time)last_used_atstring (date-time) | null
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/ssh-keys" \
-H "Authorization: Bearer $KEY"/v1/ssh-keysAdd your SSH key: it reads (and, with write, pushes) every repository of the team you may#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer, viewer
Request bodyapplication/json
namestringrequiredup to 100 characters
public_keystringrequiredone line of an SSH public key (the .pub file): Ed25519, ECDSA or RSA of 3072 bits or more
accessstringone of
read,write· default"write"
Response
201SshKeyCreated
idstring (uuid)requirednamestringrequiredtypestringrequiredfingerprintstringrequiredSHA256:…, as ssh-keygen -l shows it
public_keystringaccessstringrequiredone of
read,writepersonobjectidstringemailstring
created_atstring (date-time)last_used_atstring (date-time) | null
Errors
| Status | Description |
|---|---|
| 400 | Invalid: bad_name · bad_key · bad_access · no_person (an API key no person made) |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden · limit_exceeded |
| 409 | key_taken: the key is already added |
| 500 | internal: an unexpected failure |
Example
curl -X POST "https://api.ibel.ai/v1/ssh-keys" \
-H "Authorization: Bearer $KEY" \
-d '{"name":"my-api","public_key":"…"}'/v1/ssh-keys/{id}Remove an SSH key (yours; an owner or admin, anyone's)#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
idstring (uuid)pathrequiredthe key's id
Response
200object
idstringdeletedboolean
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl -X DELETE "https://api.ibel.ai/v1/ssh-keys/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
-H "Authorization: Bearer $KEY"