Skip to content
cloudhostDocs
API reference

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.

GET/v1/projects/{project}/repositories

The 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[]
    • idstringrequired

      a source repository's repo_…, or the app's or function's id

    • namestringrequired
    • kindstringrequired

      one of source, app, function

    • host_labelstringrequired

      its address label: <host_label>.git

    • descriptionstring
    • clone_urlobjectrequired
    • default_branchstringrequired
    • signed_commitsboolean
    • max_size_mbinteger

      its size limit (the plan's unless set)

    • size_bytesinteger
    • buildsbooleanrequired

      true: a push builds and deploys (an app's or function's); false: a source repository

    • appobject | null
    • projectobject | null
    • created_atstring (date-time)

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
500internal: an unexpected failure

Example

curl "https://api.ibel.ai/v1/projects/my-api/repositories" \
  -H "Authorization: Bearer $KEY"
POST/v1/projects/{project}/repositories

Make 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

  • namestringrequired

    lowercase letters, digits and single hyphens, 1–63 characters; not the name of an app or function of the project

  • descriptionstring

    up to 300 characters

  • default_branchstring

    the branch a clone checks out, and its pipelines' production

    default "main"

  • host_labelstring

    its address label, unique on the platform (default: its name, or <name>-<project>)

Response

201RepositoryCreated

  • idstringrequired

    a source repository's repo_…, or the app's or function's id

  • namestringrequired
  • kindstringrequired

    one of source, app, function

  • host_labelstringrequired

    its address label: <host_label>.git

  • descriptionstring
  • clone_urlobjectrequired
  • default_branchstringrequired
  • signed_commitsboolean
  • max_size_mbinteger

    its size limit (the plan's unless set)

  • size_bytesinteger
  • buildsbooleanrequired

    true: a push builds and deploys (an app's or function's); false: a source repository

  • appobject | null
  • projectobject | null
  • created_atstring (date-time)

Errors

StatusDescription
400Invalid: bad_name · bad_branch · bad_description · bad_host_label
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden · limit_exceeded
404Not found: not_found
409Taken: name_taken · host_label_taken
500internal: an unexpected failure

Example

curl -X POST "https://api.ibel.ai/v1/projects/my-api/repositories" \
  -H "Authorization: Bearer $KEY" \
  -d '{"name":"my-api"}'
GET/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

  • any
  • namestringpathrequired

    the repository's name in the project: a source repository's, or an app's or function's name

  • kindstringquery

    when an app, a function and a source repository share a name: source, app or function

    one of source, app, function

Response

200Repository

  • idstringrequired

    a source repository's repo_…, or the app's or function's id

  • namestringrequired
  • kindstringrequired

    one of source, app, function

  • host_labelstringrequired

    its address label: <host_label>.git

  • descriptionstring
  • clone_urlobjectrequired
  • default_branchstringrequired
  • signed_commitsboolean
  • max_size_mbinteger

    its size limit (the plan's unless set)

  • size_bytesinteger
  • buildsbooleanrequired

    true: a push builds and deploys (an app's or function's); false: a source repository

  • appobject | null
  • projectobject | null
  • created_atstring (date-time)

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
500internal: an unexpected failure

Example

curl "https://api.ibel.ai/v1/projects/my-api/repositories/my-api" \
  -H "Authorization: Bearer $KEY"
DELETE/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

  • any
  • namestringpathrequired

    the repository's name in the project: a source repository's, or an app's or function's name

  • kindstringquery

    when an app, a function and a source repository share a name: source, app or function

    one of source, app, function

Response

200object

  • namestring
  • deletedboolean

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
409not_source: an app's or function's repository
500internal: an unexpected failure

Example

curl -X DELETE "https://api.ibel.ai/v1/projects/my-api/repositories/my-api" \
  -H "Authorization: Bearer $KEY"
PATCH/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

  • any
  • namestringpathrequired

    the repository's name in the project: a source repository's, or an app's or function's name

  • kindstringquery

    when an app, a function and a source repository share a name: source, app or function

    one of source, app, function

Request bodyapplication/json

  • default_branchstring
  • signed_commitsboolean

    true: every new commit pushed must be signed with an SSH key of a team member

  • max_size_mbinteger | null

    the repository's size limit, at most the plan's; null: the plan's

    at least 1

  • descriptionstring

    up to 300 characters

Response

200Repository

  • idstringrequired

    a source repository's repo_…, or the app's or function's id

  • namestringrequired
  • kindstringrequired

    one of source, app, function

  • host_labelstringrequired

    its address label: <host_label>.git

  • descriptionstring
  • clone_urlobjectrequired
  • default_branchstringrequired
  • signed_commitsboolean
  • max_size_mbinteger

    its size limit (the plan's unless set)

  • size_bytesinteger
  • buildsbooleanrequired

    true: a push builds and deploys (an app's or function's); false: a source repository

  • appobject | null
  • projectobject | null
  • created_atstring (date-time)

Errors

StatusDescription
400Invalid: bad_branch · bad_size · bad_description · bad_request
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: 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":"…"}'
GET/v1/projects/{project}/repositories/{name}/rules

A repository's rules on branches and tags#

Credential
An API key or a dashboard session
Roles
Any role

Parameters

  • any
  • namestringpathrequired

    the repository's name in the project: a source repository's, or an app's or function's name

  • kindstringquery

    when an app, a function and a source repository share a name: source, app or function

    one of source, app, function

Response

200object

  • rulesRepositoryRule[]
    • idstring (uuid)required
    • patternstringrequired
    • no_forcebooleanrequired
    • no_deletebooleanrequired
    • no_updatebooleanrequired
    • pushstring[]required
    • created_atstring (date-time)

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
500internal: an unexpected failure

Example

curl "https://api.ibel.ai/v1/projects/my-api/repositories/my-api/rules" \
  -H "Authorization: Bearer $KEY"
POST/v1/projects/{project}/repositories/{name}/rules

Protect 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

  • any
  • namestringpathrequired

    the repository's name in the project: a source repository's, or an app's or function's name

  • kindstringquery

    when an app, a function and a source repository share a name: source, app or function

    one of source, app, function

Request bodyapplication/json

  • patternstringrequired

    refs/heads/<branch> or refs/tags/<tag>; * within one part of the name, ** across parts

  • no_forceboolean

    refuse pushes that are not fast-forwards

    default true

  • no_deleteboolean

    default true

  • no_updateboolean

    refuse 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> or pipeline; empty: anyone who may push

    0–20 items

Response

201RepositoryRuleCreated

  • idstring (uuid)required
  • patternstringrequired
  • no_forcebooleanrequired
  • no_deletebooleanrequired
  • no_updatebooleanrequired
  • pushstring[]required
  • created_atstring (date-time)

Errors

StatusDescription
400Invalid: bad_pattern · bad_push · bad_request
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden · limit_exceeded
404Not found: not_found
409rule_exists: a rule for that pattern
500internal: 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":"…"}'
DELETE/v1/projects/{project}/repositories/{name}/rules/{id}

Remove a rule#

Credential
An API key or a dashboard session
Roles
owner, admin

Parameters

  • any
  • namestringpathrequired

    the repository's name in the project: a source repository's, or an app's or function's name

  • idstring (uuid)pathrequired

    the rule's id

  • kindstringquery

    when an app, a function and a source repository share a name: source, app or function

    one of source, app, function

Response

200object

  • idstring
  • deletedboolean

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: 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"
PATCH/v1/projects/{project}/repositories/{name}/rules/{id}

Change a rule#

Credential
An API key or a dashboard session
Roles
owner, admin

Parameters

  • any
  • namestringpathrequired

    the repository's name in the project: a source repository's, or an app's or function's name

  • idstring (uuid)pathrequired

    the rule's id

  • kindstringquery

    when an app, a function and a source repository share a name: source, app or function

    one of source, app, function

Request bodyapplication/json

  • no_forceboolean

    refuse pushes that are not fast-forwards

    default true

  • no_deleteboolean

    default true

  • no_updateboolean

    refuse 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> or pipeline; empty: anyone who may push

    0–20 items

Response

200RepositoryRule

  • idstring (uuid)required
  • patternstringrequired
  • no_forcebooleanrequired
  • no_deletebooleanrequired
  • no_updatebooleanrequired
  • pushstring[]required
  • created_atstring (date-time)

Errors

StatusDescription
400Invalid: bad_push · bad_request
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: 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":["…"]}'
GET/v1/projects/{project}/repositories/{name}/keys

A repository's deploy keys (SSH keys for that repository only)#

Credential
An API key or a dashboard session
Roles
Any role

Parameters

  • any
  • namestringpathrequired

    the repository's name in the project: a source repository's, or an app's or function's name

  • kindstringquery

    when an app, a function and a source repository share a name: source, app or function

    one of source, app, function

Response

200object

  • keysSshKey[]
    • idstring (uuid)required
    • namestringrequired
    • typestringrequired
    • fingerprintstringrequired

      SHA256:…, as ssh-keygen -l shows it

    • public_keystring
    • accessstringrequired

      one of read, write

    • personobject
    • created_atstring (date-time)
    • last_used_atstring (date-time) | null

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
500internal: an unexpected failure

Example

curl "https://api.ibel.ai/v1/projects/my-api/repositories/my-api/keys" \
  -H "Authorization: Bearer $KEY"
POST/v1/projects/{project}/repositories/{name}/keys

Add 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

  • any
  • namestringpathrequired

    the repository's name in the project: a source repository's, or an app's or function's name

  • kindstringquery

    when an app, a function and a source repository share a name: source, app or function

    one of source, app, function

Request bodyapplication/json

  • namestringrequired

    up to 100 characters

  • public_keystringrequired

    one line of an SSH public key (the .pub file): Ed25519, ECDSA or RSA of 3072 bits or more

  • accessstring

    one of read, write

Response

201SshKeyCreated

  • idstring (uuid)required
  • namestringrequired
  • typestringrequired
  • fingerprintstringrequired

    SHA256:…, as ssh-keygen -l shows it

  • public_keystring
  • accessstringrequired

    one of read, write

  • personobject
  • created_atstring (date-time)
  • last_used_atstring (date-time) | null

Errors

StatusDescription
400Invalid: bad_name · bad_key · bad_access
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden · limit_exceeded
404Not found: not_found
409key_taken: the key is already added (one key is one sign-in)
500internal: 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":"…"}'
DELETE/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

  • any
  • namestringpathrequired

    the repository's name in the project: a source repository's, or an app's or function's name

  • idstring (uuid)pathrequired

    the key's id

  • kindstringquery

    when an app, a function and a source repository share a name: source, app or function

    one of source, app, function

Response

200object

  • idstring
  • deletedboolean

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: 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"
GET/v1/projects/{project}/repositories/{name}/mirrors

A repository's mirrors and how their last run went (never their secrets)#

Credential
An API key or a dashboard session
Roles
Any role

Parameters

  • any
  • namestringpathrequired

    the repository's name in the project: a source repository's, or an app's or function's name

  • kindstringquery

    when an app, a function and a source repository share a name: source, app or function

    one of source, app, function

Response

200object

  • mirrorsRepositoryMirror[]
    • idstring (uuid)required
    • directionstringrequired

      one of in, out

    • urlstringrequired
    • usernamestring | null
    • secret_hintstring | null

      the secret's last 4 characters

    • pruneboolean
    • interval_minutesinteger | null
    • last_run_atstring (date-time) | null
    • last_statusstring | null

      one of ok, failed, running, null

    • last_errorstring | null
    • created_atstring (date-time)

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
500internal: an unexpected failure

Example

curl "https://api.ibel.ai/v1/projects/my-api/repositories/my-api/mirrors" \
  -H "Authorization: Bearer $KEY"
POST/v1/projects/{project}/repositories/{name}/mirrors

Copy 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

  • any
  • namestringpathrequired

    the repository's name in the project: a source repository's, or an app's or function's name

  • kindstringquery

    when an app, a function and a source repository share a name: source, app or function

    one of source, app, function

Request bodyapplication/json

  • directionstringrequired

    one of in, out

  • urlstringrequired

    the other repository's https:// address

  • usernamestring

    up to 200 characters

  • secretstring

    a token or password for the other host; kept sealed and never shown again

  • pruneboolean

    remove branches and tags the other side no longer has

    default true

  • interval_minutesinteger

    in: how often it is brought up to date

    5–1440 · default 10

Response

201RepositoryMirrorCreated

  • idstring (uuid)required
  • directionstringrequired

    one of in, out

  • urlstringrequired
  • usernamestring | null
  • secret_hintstring | null

    the secret's last 4 characters

  • pruneboolean
  • interval_minutesinteger | null
  • last_run_atstring (date-time) | null
  • last_statusstring | null

    one of ok, failed, running, null

  • last_errorstring | null
  • created_atstring (date-time)

Errors

StatusDescription
400Invalid: bad_direction · bad_url (https only, public addresses) · bad_username · bad_secret · bad_interval · not_source
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden · limit_exceeded
404Not found: not_found
409mirror_exists: the repository already follows another
500internal: 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"}'
DELETE/v1/projects/{project}/repositories/{name}/mirrors/{id}

Remove a mirror#

Credential
An API key or a dashboard session
Roles
owner, admin

Parameters

  • any
  • namestringpathrequired

    the repository's name in the project: a source repository's, or an app's or function's name

  • idstring (uuid)pathrequired

    the mirror's id

  • kindstringquery

    when an app, a function and a source repository share a name: source, app or function

    one of source, app, function

Response

200object

  • idstring
  • deletedboolean

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: 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"
POST/v1/projects/{project}/repositories/{name}/mirrors/{id}/sync

Run a mirror now#

Credential
An API key or a dashboard session
Roles
owner, admin, developer

Parameters

  • any
  • namestringpathrequired

    the repository's name in the project: a source repository's, or an app's or function's name

  • idstring (uuid)pathrequired

    the mirror's id

  • kindstringquery

    when an app, a function and a source repository share a name: source, app or function

    one of source, app, function

Response

202RepositoryMirrorAccepted

  • idstring (uuid)required
  • directionstringrequired

    one of in, out

  • urlstringrequired
  • usernamestring | null
  • secret_hintstring | null

    the secret's last 4 characters

  • pruneboolean
  • interval_minutesinteger | null
  • last_run_atstring (date-time) | null
  • last_statusstring | null

    one of ok, failed, running, null

  • last_errorstring | null
  • created_atstring (date-time)

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure
503unavailable: 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"
GET/v1/projects/{project}/repositories/{name}/events

Every 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

  • any
  • namestringpathrequired

    the repository's name in the project: a source repository's, or an app's or function's name

  • kindstringquery

    when an app, a function and a source repository share a name: source, app or function

    one of source, app, function

  • any
  • any

Response

200object

  • eventsRepositoryEvent[]
    • idstring (uuid)required
    • kindstringrequired

      one of push, tag, delete

    • refstringrequired
    • beforestring | null

      null: created

    • afterstring | null

      null: deleted

    • forcedboolean
    • viastringrequired

      one of https, ssh, mirror

    • actorstring
    • created_atstring (date-time)
  • next_cursorstring | null

    send as cursor for the next page; null on the last page

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
404Not found: not_found
500internal: an unexpected failure

Example

curl "https://api.ibel.ai/v1/projects/my-api/repositories/my-api/events" \
  -H "Authorization: Bearer $KEY"
GET/v1/ssh-keys

Your 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

  • allstringquery

    1: every member's keys (owner or admin)

    one of 1

Response

200object

  • keysSshKey[]
    • idstring (uuid)required
    • namestringrequired
    • typestringrequired
    • fingerprintstringrequired

      SHA256:…, as ssh-keygen -l shows it

    • public_keystring
    • accessstringrequired

      one of read, write

    • personobject
    • created_atstring (date-time)
    • last_used_atstring (date-time) | null

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
500internal: an unexpected failure

Example

curl "https://api.ibel.ai/v1/ssh-keys" \
  -H "Authorization: Bearer $KEY"
POST/v1/ssh-keys

Add 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

  • namestringrequired

    up to 100 characters

  • public_keystringrequired

    one line of an SSH public key (the .pub file): Ed25519, ECDSA or RSA of 3072 bits or more

  • accessstring

    one of read, write · default "write"

Response

201SshKeyCreated

  • idstring (uuid)required
  • namestringrequired
  • typestringrequired
  • fingerprintstringrequired

    SHA256:…, as ssh-keygen -l shows it

  • public_keystring
  • accessstringrequired

    one of read, write

  • personobject
  • created_atstring (date-time)
  • last_used_atstring (date-time) | null

Errors

StatusDescription
400Invalid: bad_name · bad_key · bad_access · no_person (an API key no person made)
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden · limit_exceeded
409key_taken: the key is already added
500internal: an unexpected failure

Example

curl -X POST "https://api.ibel.ai/v1/ssh-keys" \
  -H "Authorization: Bearer $KEY" \
  -d '{"name":"my-api","public_key":"…"}'
DELETE/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)pathrequired

    the key's id

Response

200object

  • idstring
  • deletedboolean

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

Example

curl -X DELETE "https://api.ibel.ai/v1/ssh-keys/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY"