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.
Requires vcs:read (Browse connected GitHub accounts, their repositories, branches and commits).
An API key from Account settings, e.g. kn_...
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
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"
}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 server404
github_installation_not_found: The caller has no connected GitHub account with this installation id; connect it in the dashboard404
github_repo_not_found: The installation cannot see the repository; grant the GitHub App access to it502
upstream_github: GitHub did not answer; retry shortly
An API key from Account settings, e.g. kn_...
GitHub App installation id, from the connected accounts list
Case-insensitive substring of owner/name
Items per page, 1 to 200 (default 50)
nextCursor from the previous page; omit for the first page
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
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
}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 server404
github_installation_not_found: The caller has no connected GitHub account with this installation id; connect it in the dashboard404
github_repo_not_found: The installation cannot see the repository; grant the GitHub App access to it502
upstream_github: GitHub did not answer; retry shortly
An API key from Account settings, e.g. kn_...
GitHub App installation id, from the connected accounts list
Repository as owner/name
^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\/[A-Za-z0-9._-]{1,100}$OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
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.
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 server404
github_installation_not_found: The caller has no connected GitHub account with this installation id; connect it in the dashboard404
github_repo_not_found: The installation cannot see the repository; grant the GitHub App access to it502
upstream_github: GitHub did not answer; retry shortly404
github_branch_not_found: The repository has no such branch404
github_commit_not_found: No commit has this sha
An API key from Account settings, e.g. kn_...
GitHub App installation id, from the connected accounts list
Repository as owner/name
^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\/[A-Za-z0-9._-]{1,100}$Branch to list; default: the repository's default branch
Look up this one commit instead of listing a branch
^[0-9a-fA-F]{7,40}$Commits to return, 1 to 100 (default 20)
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
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.
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 server404
github_installation_not_found: The caller has no connected GitHub account with this installation id; connect it in the dashboard404
github_repo_not_found: The installation cannot see the repository; grant the GitHub App access to it502
upstream_github: GitHub did not answer; retry shortly404
github_branch_not_found: The repository has no such branch
An API key from Account settings, e.g. kn_...
GitHub App installation id, from the connected accounts list
Repository as owner/name
^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\/[A-Za-z0-9._-]{1,100}$Branch to inspect; default: the repository's default branch
Build context directory (default /)
Dockerfile path relative to contextDir (default Dockerfile)
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
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.
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 server404
github_installation_not_found: The caller has no connected GitHub account with this installation id; connect it in the dashboard404
github_repo_not_found: The installation cannot see the repository; grant the GitHub App access to it502
upstream_github: GitHub did not answer; retry shortly404
github_path_not_found: The branch or the path does not exist422
github_file_too_large: GitHub does not serve files over 100 MB429
github_rate_limited: GitHub is rate limiting the installation; retry after retryAfterSec, when given
An API key from Account settings, e.g. kn_...
GitHub App installation id, from the connected accounts list
Repository as owner/name
^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\/[A-Za-z0-9._-]{1,100}$Branch to read; default: the repository's default branch
File or directory, relative to the repository root; omit for the root
Bytes of a file to return, at most 262144 (default 65536)
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
The request is valid but cannot be carried out on this resource (github_file_too_large, ...)
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
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?
