For the complete documentation index, see llms.txt. This page is also available as Markdown.

GitHub

Browse connected GitHub accounts, repositories and source files.

List the GitHub accounts and organizations the caller connected through the Kinesis GitHub App. Connecting one is a browser step (connectUrl): open a project, New app, Source: GitHub.

get

Requires vcs:read (Browse connected GitHub accounts, their repositories, branches and commits).

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Responses
200

OK

application/json
get/vcs/github/accounts
GET /v1/vcs/github/accounts HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "enabled": true,
  "accounts": [
    {
      "installationId": 1,
      "login": "text",
      "type": "user",
      "avatarUrl": null
    }
  ],
  "connectUrl": "text"
}

List the repositories a connected GitHub installation can read, alphabetically

get

Requires vcs:read (Browse connected GitHub accounts, their repositories, branches and commits).

Errors specific to this operation:

  • 503 github_not_configured: GitHub deployments are not enabled on this server

  • 404 github_installation_not_found: The caller has no connected GitHub account with this installation id; connect it in the dashboard

  • 404 github_repo_not_found: The installation cannot see the repository; grant the GitHub App access to it

  • 502 upstream_github: GitHub did not answer; retry shortly

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Query parameters
installationIdintegerRequired

GitHub App installation id, from the connected accounts list

searchstring · min: 1 · max: 100Optional

Case-insensitive substring of owner/name

limitinteger · min: 1 · max: 200Optional

Items per page, 1 to 200 (default 50)

cursorstring · min: 1 · max: 512Optional

nextCursor from the previous page; omit for the first page

Responses
200

OK

application/json
get/vcs/github/repos
GET /v1/vcs/github/repos?installationId=1 HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "repos": [
    {
      "id": 1,
      "name": "text",
      "defaultBranch": "text",
      "private": true,
      "url": "text",
      "description": null,
      "language": null,
      "updatedAt": "text"
    }
  ],
  "nextCursor": null
}

List the branches of a repository with the sha each points at

get

Requires vcs:read (Browse connected GitHub accounts, their repositories, branches and commits).

Errors specific to this operation:

  • 503 github_not_configured: GitHub deployments are not enabled on this server

  • 404 github_installation_not_found: The caller has no connected GitHub account with this installation id; connect it in the dashboard

  • 404 github_repo_not_found: The installation cannot see the repository; grant the GitHub App access to it

  • 502 upstream_github: GitHub did not answer; retry shortly

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Query parameters
installationIdintegerRequired

GitHub App installation id, from the connected accounts list

repostringRequired

Repository as owner/name

Pattern: ^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\/[A-Za-z0-9._-]{1,100}$
Responses
200

OK

application/json
get/vcs/github/branches
GET /v1/vcs/github/branches?installationId=1&repo=text HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "defaultBranch": "text",
  "branches": [
    {
      "name": "text",
      "sha": "text",
      "protected": true
    }
  ]
}

List the newest commits of a branch, or look up one commit by sha. The sha of a commit can be passed to apps.builds.create to build that commit rather than the branch head.

get

Requires vcs:read (Browse connected GitHub accounts, their repositories, branches and commits).

Errors specific to this operation:

  • 503 github_not_configured: GitHub deployments are not enabled on this server

  • 404 github_installation_not_found: The caller has no connected GitHub account with this installation id; connect it in the dashboard

  • 404 github_repo_not_found: The installation cannot see the repository; grant the GitHub App access to it

  • 502 upstream_github: GitHub did not answer; retry shortly

  • 404 github_branch_not_found: The repository has no such branch

  • 404 github_commit_not_found: No commit has this sha

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Query parameters
installationIdintegerRequired

GitHub App installation id, from the connected accounts list

repostringRequired

Repository as owner/name

Pattern: ^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\/[A-Za-z0-9._-]{1,100}$
branchstring · min: 1 · max: 255Optional

Branch to list; default: the repository's default branch

shastringOptional

Look up this one commit instead of listing a branch

Pattern: ^[0-9a-fA-F]{7,40}$
limitinteger · min: 1 · max: 100Optional

Commits to return, 1 to 100 (default 20)

Responses
200

OK

application/json
get/vcs/github/commits
GET /v1/vcs/github/commits?installationId=1&repo=text HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "branch": null,
  "commits": [
    {
      "sha": "text",
      "message": "text",
      "author": "text",
      "committedAt": "text"
    }
  ]
}

Find the Dockerfiles in a repository and check that contextDir plus dockerfilePath names one; for the resolved file, report the ports it exposes and its CMD and ENTRYPOINT. A repository without a Dockerfile can still be deployed: write one and pass it as source.dockerfileContent to apps.create.

get

Requires vcs:read (Browse connected GitHub accounts, their repositories, branches and commits).

Errors specific to this operation:

  • 503 github_not_configured: GitHub deployments are not enabled on this server

  • 404 github_installation_not_found: The caller has no connected GitHub account with this installation id; connect it in the dashboard

  • 404 github_repo_not_found: The installation cannot see the repository; grant the GitHub App access to it

  • 502 upstream_github: GitHub did not answer; retry shortly

  • 404 github_branch_not_found: The repository has no such branch

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Query parameters
installationIdintegerRequired

GitHub App installation id, from the connected accounts list

repostringRequired

Repository as owner/name

Pattern: ^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\/[A-Za-z0-9._-]{1,100}$
branchstring · min: 1 · max: 255Optional

Branch to inspect; default: the repository's default branch

contextDirstring · min: 1 · max: 512Optional

Build context directory (default /)

dockerfilePathstring · min: 1 · max: 512Optional

Dockerfile path relative to contextDir (default Dockerfile)

Responses
200

OK

application/json
get/vcs/github/dockerfiles
GET /v1/vcs/github/dockerfiles?installationId=1&repo=text HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "dockerfiles": [
    "text"
  ],
  "resolvedPathExists": true,
  "truncated": true,
  "exposedPorts": [
    {
      "port": 1,
      "protocol": "tcp"
    }
  ],
  "command": [
    "text"
  ],
  "entrypoint": [
    "text"
  ]
}

Read a directory listing or a file of a repository, at the root or a path, on a branch. A text file comes back as content (up to maxBytes, then truncated); a binary file, or one over 1 MB, comes back without it. The way to see what a repository is built from (package.json, requirements.txt, ...) before writing its Dockerfile.

get

Requires vcs:read (Browse connected GitHub accounts, their repositories, branches and commits).

Errors specific to this operation:

  • 503 github_not_configured: GitHub deployments are not enabled on this server

  • 404 github_installation_not_found: The caller has no connected GitHub account with this installation id; connect it in the dashboard

  • 404 github_repo_not_found: The installation cannot see the repository; grant the GitHub App access to it

  • 502 upstream_github: GitHub did not answer; retry shortly

  • 404 github_path_not_found: The branch or the path does not exist

  • 422 github_file_too_large: GitHub does not serve files over 100 MB

  • 429 github_rate_limited: GitHub is rate limiting the installation; retry after retryAfterSec, when given

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Query parameters
installationIdintegerRequired

GitHub App installation id, from the connected accounts list

repostringRequired

Repository as owner/name

Pattern: ^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\/[A-Za-z0-9._-]{1,100}$
branchstring · min: 1 · max: 255Optional

Branch to read; default: the repository's default branch

pathstring · min: 1 · max: 512Optional

File or directory, relative to the repository root; omit for the root

maxBytesinteger · min: 1 · max: 262144Optional

Bytes of a file to return, at most 262144 (default 65536)

Responses
200

OK

application/json
get/vcs/github/contents
GET /v1/vcs/github/contents?installationId=1&repo=text HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "branch": "text",
  "path": "text",
  "type": "dir",
  "entries": [
    {
      "name": "text",
      "path": "text",
      "type": "file",
      "size": 1
    }
  ],
  "content": null,
  "size": 1,
  "truncated": true,
  "binary": true,
  "target": null
}

Was this helpful?