Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Protocol reference

Grovedock speaks gRPC (HTTP/2, and gRPC-Web for browsers). The gd.v1 package is stable: it changes only by adding. Generate a client for any language from the files below; the SDKs wrap the read calls for Python, TypeScript and Go.

Calls to a server that hosts many repositories name one with the x-gd-repo: OWNER/NAME header. Every call takes a bearer token in authorization when the server requires one.

gd.proto

Source

Objects

Tier-agnostic object service. Served identically by server, cache and daemon.

CallRequestResponseWhat it does
GetIdListstream ObjectPayload
Putstream ObjectPayloadPutObjectsResponse
MissingIdListIdListReturns the subset of ids the tier cannot serve.

Changesets

CallRequestResponseWhat it does
CreateCreateChangesetRequestChangesetInfo
GetResolveRequestChangesetInfo

Refs

Refs name changesets: branches, and tags under tags/ (tags/v1.2.0). A tag is made once (CompareAndSwap from nothing) and never moves: swapping an existing tag fails, and nothing lands on one. Git sees them as refs/tags/*.

CallRequestResponseWhat it does
GetRefNameRefValue
CompareAndSwapCasRequestCasResponse
ListEmptyRefList

Land

Server-side rebase + lock-free compare-and-swap of a ref.

CallRequestResponseWhat it does
LandLandRequestLandResponse

History

CallRequestResponseWhat it does
LogLogRequeststream ChangesetInfo
BlameBlameRequestBlameResponse

Diff

CallRequestResponseWhat it does
DiffDiffRequestDiffResponse

MergeBase

CallRequestResponseWhat it does
MergeBaseMergeBaseRequestMergeBaseResponse

CodeSearch

CallRequestResponseWhat it does
SearchCodeSearchCodeRequestSearchCodeResponse
FindSymbolFindSymbolRequestFindSymbolResponse

Browse

CallRequestResponseWhat it does
ListDirBrowseRequestListDirResponse
ReadFileBrowseRequestReadFileResponse
FindFindRequestFindResponse
CheckoutCheckoutRequeststream CheckoutPiecePath-scoped checkout: only files the caller may read. Used by principals with restricted read access, who may not read objects by id.

Access

CallRequestResponseWhat it does
WhoAmIEmptyWhoAmIResponse

Locks

CallRequestResponseWhat it does
LockLockRequestLockInfo
UnlockUnlockRequestEmpty
ListListLocksRequestLockList

gd_imports.proto

Source

Imports

CallRequestResponseWhat it does
StartImportStartImportRequestImportFor an owner you administer (your account, or an organisation). The repository is made at once; history, pull requests and issues follow.
GetImportImportRefImport
ListImportsEmptyListImportsResponseYour imports, newest first.

gd_insights.proto

Source

Insights

CallRequestResponseWhat it does
FlowFlowRequestFlowResponseFor administrators of the organisation.

gd_issues.proto

Source

Issues

CallRequestResponseWhat it does
ListIssuesListIssuesRequestListIssuesResponse
IssueFacetsRepositoryRefFacetsViews: open, mine, unassigned, fixing, authored, closed.
GetIssueIssueRefIssue
CreateIssueCreateIssueRequestIssue
UpdateIssueUpdateIssueRequestIssue
ListIssueCommentsIssueRefListCommentsResponse
AddIssueCommentAddIssueCommentRequestComment
EditIssueCommentEditCommentRequestComment
ListLabelsRepositoryRefListLabelsResponseLabels: every label in use or described, with its colour, description and counts.
SetLabelSetLabelRequestLabelDescribes a label (colour, description), or renames it everywhere it’s used.
DeleteLabelLabelRefEmptyRemoves a label from every issue and change request.
ListMilestonesListMilestonesRequestListMilestonesResponseMilestones: a goal with a date, and the issues and change requests planned for it.
CreateMilestoneMilestoneMilestone
UpdateMilestoneUpdateMilestoneRequestMilestone
DeleteMilestoneMilestoneRefEmptyIts issues and change requests keep everything but the milestone.
UploadImageUploadImageRequestImageRefImages for comments and descriptions (PNG, JPEG, GIF or WebP, up to 10 MB). Anyone who can comment can upload one; anyone who can read the repository can see it.
GetImageImageRefImage
FetchImageFetchImageRequestImageAn image on another site that Markdown shows (a README’s badges), fetched by the server so that site never learns who reads the text. Signed-in callers only; up to 5 MB.

gd_landing.proto

Source

Landing

CallRequestResponseWhat it does
SetLandWhenReadySetLandWhenReadyRequestChangeRequestLands the change request by itself once nothing blocks it (reviews, checks, conflicts), as the caller. A new version keeps it on; landing, closing or turning it off ends it.

gd_packet.proto

Source

Packets

CallRequestResponseWhat it does
GetReviewPacketChangeRequestRefReviewPacket

gd_platform.proto

Source

Platform

CallRequestResponseWhat it does
SetAgentControlsSetAgentControlsRequestAccount
ViewerEmptyViewerResponse
GetAccountOrgNameAccount
ListOrganizationsEmptyListOrganizationsResponse
GetOrganizationOrgNameOrganization
CreateOrganizationCreateOrganizationRequestOrganization
ListMembersOrgNameListMembersResponse
SetMemberSetMemberRequestMember
ListTeamsOrgNameListTeamsResponse
SetTeamTeamTeamCreates the team, or replaces its name, description and members.
DeleteTeamTeamRefEmpty
ListRepositoriesListRepositoriesRequestListRepositoriesResponse
GetRepositoryRepositoryRefRepository
CreateRepositoryCreateRepositoryRequestRepository
UpdateRepositoryUpdateRepositoryRequestRepository
RenameRepositoryRenameRepositoryRequestRepository
DeleteRepositoryDeleteRepositoryRequestEmpty
ListGrantsRepositoryRefListGrantsResponse
SetGrantSetGrantRequestGrant
ListTokensEmptyListTokensResponse
GetNotificationSettingsEmptyNotificationSettingsWhat the caller gets emailed about.
SetNotificationSettingsNotificationSettingsNotificationSettings
CreateTokenCreateTokenRequestCreateTokenResponse
RevokeTokenRevokeTokenRequestEmpty
ListWebhooksRepositoryRefListWebhooksResponse
CreateWebhookCreateWebhookRequestCreateWebhookResponse
DeleteWebhookWebhookRefEmpty
ListWebhookDeliveriesWebhookRefListWebhookDeliveriesResponse
PingWebhookWebhookRefWebhookDeliverySends a ping event now.
LinkIdentityLinkIdentityRequestEmptyLets an identity sign in as an existing account, e.g. the first administrator’s email address. Site administrators only.
CreateInvitationCreateInvitationRequestCreateInvitationResponseInvitations to an organisation: a single-use link, valid 7 days, emailed when the server sends mail. Whoever opens it and signs in joins with the role. Organisation administrators.
ListInvitationsOrgNameListInvitationsResponseInvitations not yet accepted, including expired ones.
RevokeInvitationInvitationRefEmpty
GetUsageGetUsageRequestUsagePlans and usage (ADR-035). An organisation’s active agents, people, storage and limits: its administrators and site administrators.
AgentStatsAgentStatsRequestAgentStatsResponseHow each agent of an organisation is doing: what it landed day by day, its change requests, failed checks and refused lands (organisation administrators).
AgentActivityAgentActivityRequestAgentActivityResponseWhat one agent did, session by session: reads, searches, lands (and refusals, with why), change requests, failed checks (organisation administrators, and the person it answers to).
SetLimitsSetLimitsRequestOrgLimitsReplaces an organisation’s limits (not its suspension). Site administrators only.
SetSuspendedSetSuspendedRequestOrgLimitsA suspended organisation can read but not write. Site administrators only.
GetCapabilitiesEmptyCapabilitiesWhat this server offers: anyone may ask.
GetLicenseEmptyLicenseThe support licence this server was started with. Site administrators only.

Reviews

CallRequestResponseWhat it does
ListChangeRequestsListChangeRequestsRequestListChangeRequestsResponse
ChangeRequestFacetsRepositoryRefFacetsViews: attention, open, ready, blocked, agents, mine, drafts, landed, closed.
GetChangeRequestChangeRequestRefChangeRequest
CreateChangeRequestCreateChangeRequestRequestChangeRequest
UpdateChangeRequestUpdateChangeRequestRequestChangeRequest
ListCommentsChangeRequestRefListCommentsResponse
AddCommentAddCommentRequestComment
EditCommentEditCommentRequestComment
ResolveThreadResolveThreadRequestComment
SubmitReviewSubmitReviewRequestChangeRequest
LandChangeRequestRefLandChangeRequestResponse
RebaseChangeRequestRefChangeRequestRe-applies the change on the target’s tip. Edits that do not overlap what landed since are carried over; otherwise it fails with FAILED_PRECONDITION naming the files that conflict. Approvals made on the old version stop counting when the protection says so. Replays the branch’s changes on the target’s tip. Files both changed are merged line by line; it fails only where their edits clash (see Conflicts).
ConflictsChangeRequestRefConflictReportWhere a change request clashes with its target, file by file: the three versions, and the merge (clean, or with conflict markers where the edits clash).
ResolveConflictsResolveConflictsRequestChangeRequestRebases with the clashing files settled: each given in full, or deleted. Files that merge cleanly needn’t be given.
RevertAgentRevertAgentRequestRevertPlanUndoes everything an agent landed on a branch since a time, as one change request (or, with dry_run, says what that would undo). Later changes by others to the same files are kept where they don’t overlap; where they do, the file is left as it is and listed.
ListProtectionsRepositoryRefListProtectionsResponse
SetProtectionProtectionProtection
DeleteProtectionProtectionRefEmpty
ReportCheckReportCheckRequestChangeRequest
InboxInboxRequestInboxResponse
MarkInboxMarkInboxRequestEmpty
ListEventsListEventsRequestListEventsResponse

gd_releases.proto

Source

Releases

CallRequestResponseWhat it does
ListReleasesListReleasesRequestListReleasesResponse
GetReleaseReleaseRefRelease
CreateReleaseCreateReleaseRequestRelease
UpdateReleaseUpdateReleaseRequestRelease
DeleteReleaseReleaseRefEmptyThe release goes; its tag stays.
GenerateReleaseNotesReleaseNotesRequestReleaseNotes
AddReleaseAssetAddReleaseAssetRequestRelease
DeleteReleaseAssetDeleteReleaseAssetRequestRelease
ReleaseAssetUrlReleaseAssetRefReleaseAssetLink
ReleaseUploadUrlReleaseAssetRefReleaseAssetLinkA link to PUT one file’s bytes to: the server stores them in chunks as they arrive and attaches the file (replacing one of the same name). For browsers, which can’t chunk.

gd_runs.proto

Source

Runs

CallRequestResponseWhat it does
ListRunsListRunsRequestListRunsResponseRuns of a repository, newest first. Read access.
GetRunRunRefRun
ReadLogReadLogRequestReadLogResponseA job’s log, from a byte offset: call again with next_offset to follow a live job.
CancelRunRunRefRunWrite access.
RerunRunRerunRequestRunRuns it again on the same change: the failed jobs (and what needs them), or all.
ListWorkflowsListWorkflowsRequestListWorkflowsResponseThe workflows a branch has (default: the default branch): what starts each, its jobs, and why one can’t be read. Read access.
ArtifactUrlRunArtifactRefArtifactLinkA link to download one of a run’s artifacts (files a job kept), good for a few minutes.
StartRunStartRunRequestRunStarts a workflow that can be started by hand (manual, GitHub’s workflow_dispatch).
ApproveRunRunRefRunLets a run of an outsider’s code (a fork) go ahead. Maintain access.
SetSecretSetSecretRequestEmptySecrets: names and when they changed are listed; values are never sent back. Only runs of code already on a protected branch get them. Admin access.
ListSecretsRepositoryRefListSecretsResponse
DeleteSecretSecretRefEmpty
RegisterRunnerRegisterRunnerRequestRegisterRunnerResponseRunners belong to an owner (a person or an organisation) and take jobs for its repositories. Registering and removing need the owner’s administrators.
ListRunnersListRunnersRequestListRunnersResponse
RemoveRunnerRemoveRunnerRequestEmpty
ClaimJobClaimJobRequestClaimJobResponseCalled by runners, which identify themselves with their key in the x-gd-runner header (not a person’s token). Waits up to wait_ms for a job that fits the runner’s labels.
RunnerArtifactsRunnerArtifactsRequestRunnerArtifactsResponseLinks for a job’s runner to upload an artifact of its run, or download one (empty name: every artifact of the run).
RunnerReleaseRunnerReleaseRequestRunnerReleaseResponseMakes (or adds to) a release from a trusted run, as whoever caused the run, and gives links to upload its files. The job’s steps never hold a token that could do this.
ReportJobReportJobRequestReportJobResponseProgress of a claimed job: log output, steps, and finally its result. Answers whether the job was cancelled, so the runner stops it.

gd_social.proto

Source

Social

CallRequestResponseWhat it does
GetProfileOrgNameProfileA person’s page. Anyone may look; it shows only what the viewer can read.
SetProfileSetProfileRequestProfileYour name and bio.
SetStarSetStarRequestRepositoryStar a repository you can read, or take the star back. People only.
SetWatchSetWatchRequestRepositoryHow much of a repository’s news reaches you.
ListStarredListStarredRequestListRepositoriesResponseA person’s starred repositories, newest star first.
ExploreExploreRequestExploreResponsePublic repositories, for anyone, signed in or not.
ForkRepositoryForkRequestRepositoryA copy of a repository you can read, in an organisation where you may make repositories: every branch and tag, sharing the source’s history rather than copying it. A private repository’s forks stay in its organisation and private.
ListForksRepositoryRefListRepositoriesResponseForks of a repository that the caller can read.
CompareForkRepositoryRefForkStatusHow a fork’s default branch stands against its source’s: changes ahead and behind.
UpdateForkRepositoryRefForkStatusBrings the source’s new work into a fork’s default branch: at once when the fork has nothing of its own on it, else as a change request in the fork (both sides changed, so a person looks). Takes Write on the fork.