Get GitOps settings and sync history
The teamspace’s GitOps manifest sync (Pro and Enterprise, the plan or a trial): the settings, the plan’s limits and the newest syncs. Any member can call it.
1 min read
get/v2/teamspaces/{teamspaceId}/gitops
Request example
curl --request GET \
--url https://context7.com/api/v2/teamspaces/{teamspaceId}/gitops \
--header 'Authorization: Bearer <token>'import requests
url = "https://context7.com/api/v2/teamspaces/{teamspaceId}/gitops"
headers = {
"Authorization": "Bearer <token>",
}
response = requests.request("GET", url, headers=headers)
print(response.text)const response = await fetch('https://context7.com/api/v2/teamspaces/{teamspaceId}/gitops', {
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
console.log(data);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://context7.com/api/v2/teamspaces/{teamspaceId}/gitops',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer <token>',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://context7.com/api/v2/teamspaces/{teamspaceId}/gitops"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://context7.com/api/v2/teamspaces/{teamspaceId}/gitops"))
.header("Authorization", "Bearer <token>")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());require 'uri'
require 'net/http'
url = URI('https://context7.com/api/v2/teamspaces/{teamspaceId}/gitops')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = url.scheme == 'https'
request = Net::HTTP::Get.new(url)
request['Authorization'] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyResponse
{
"planAllowed": true,
"tier": "pro",
"limits": {
"tier": "pro",
"maxEntries": 1,
"maxParsesPerSync": 1,
"maxParsesPerDay": 1,
"maxRefreshLibraries": 1
},
"config": {
"enabled": true,
"repoUrl": "https://github.com/acme/context7-config",
"branch": "<string>",
"filePath": "repos.yaml",
"prune": true,
"configuredBy": "<string>",
"lastSyncedAt": "2026-08-10T12:00:00Z",
"updatedAt": "2026-08-10T12:00:00Z"
},
"running": true,
"runs": [
{
"id": "<string>",
"at": "2026-08-10T12:00:00Z",
"trigger": "push",
"ok": true,
"commitSha": "<string>",
"entries": 1,
"created": 1,
"updated": 1,
"tracked": 1,
"unchanged": 1,
"pruned": 1,
"skipped": 1,
"failed": 1,
"removalsHeld": 1,
"deferred": 1,
"results": [
{
"libraryName": "<string>",
"repoUrl": "<string>",
"outcome": "created",
"message": "<string>"
}
],
"error": "<string>",
"note": "<string>"
}
]
}{
"error": "validation_error",
"message": "Library name is required"
}{
"error": "invalid_library_id",
"message": "Invalid library ID format. Expected: `/owner/repo` for GitHub repositories, or `/<source>/<id>` for other sources (the URL path of the library on context7.com)"
}{
"error": "invalid_api_key",
"message": "Invalid API key. Please check your API key. API keys should start with 'ctx7sk' prefix."
}{
"error": "access_denied",
"message": "Access denied: Library /owner/repo is not included in your allowed libraries"
}{
"error": "forbidden",
"message": "Only team owners and admins can add private repositories"
}{
"error": "api_keys_disabled",
"message": "This teamspace does not allow API keys. Connect with OAuth instead: run `npx ctx7@latest setup --mcp --oauth`, or see https://context7.com/docs/howto/oauth"
}{
"error": "forbidden",
"message": "Private repositories require a pro plan or team. Upgrade at https://context7.com/plans"
}{
"error": "internal_error",
"message": "An error occurred while processing your request"
}get/v2/teamspaces/{teamspaceId}/gitops
Authorization
Get your API key at context7.com/dashboard. Treat your API key like a password and store it securely. Every key can read the management API (
/v2/teamspaces/*), except personal data: member and invitation emails, library requesters, visitor questions, Docs7 reader searches, conversations, feedback and feature requests, and the GitHub account behind a build. To read those or make changes there, the key must be created with Write access ticked; other keys get 403 write_access_required. A teamspace can limit API keys to owners and admins, or turn them off for OAuth only; a key that its teamspace's policy refuses gets 403 api_key_admins_only or api_keys_disabled.Path parameters
Teamspace id (from
GET /v2/teamspaces).Responses
application/json
GitOps settings and history
The teamspace is on Pro or Enterprise (the plan or an active trial).
The plan's GitOps tier; null when GitOps is not available.
Options:
proenterpriseShow child attributesHide child attributes
Options:
proenterpriseEntries one manifest may list (Pro 20, Enterprise 100); a longer manifest is refused.
Parses one sync may start (Pro 5, Enterprise 20); the rest wait for the next sync.
Parses and refreshes the teamspace's syncs may start in a UTC day (Pro 20, Enterprise 100); the rest wait for the next day.
Private libraries with automatic refresh on per teamspace (Pro 10); null is no cap. A manifest
refresh over it stays off and is reported for its entry.Show child attributesHide child attributes
Sync on push and once a day.
Example:"https://github.com/acme/context7-config"
Empty: the repository's default branch.
Example:"repos.yaml"
Remove the private libraries GitOps added once the manifest no longer lists them. Libraries added in the dashboard or the API are never removed.
Clerk user id of the owner or admin every sync runs as.
Newest first, at most 20.
Show child attributesHide child attributes
Options:
pushschedulemanualapiFalse when the sync stopped before any entry (see
error).The manifest branch's head commit.
Libraries added outside GitOps that it tracks from now on. Absent in runs stored before it existed.
Every other outcome but
untracked: unsupported, deferred, busy and kept entries, held removals, and final skips.Removals waiting for a confirmed sync.
Entries over the parse limit of one sync.
Show child attributesHide child attributes
The same words as the preview's
outcome, plus added_outside (added outside GitOps during the sync; the next sync tracks it), skipped and failed. Runs stored before tracked existed use only created, updated, unchanged, pruned, skipped and failed.Options:
createdupdatedtrackeduntrackedunchangeddeferredbusyunsupportedkeptprunedadded_outsideskippedfailedWas this page helpful?