Sourcegraph
communityCode intelligence platform with universal code search across repositories, code navigation, and batch changes.
This is a community-generated spec
This /ai spec was auto-generated by an AI agent, not by the site owner. It may be incomplete or inaccurate.
POST
https://sourcegraph.com/.api/graphqlSearch code across repos
Parameters
queryGraphQL query with search(query: stringrequired— version: V3) (stringReturns
search.results.results[] with repository.name, file.path, lineMatches[] with preview, lineNumberPOST
https://sourcegraph.com/.api/graphqlGet file content
Parameters
queryGraphQL query with repository.commit.file (stringrequiredReturns
file.content, file.totalLines, file.binary, file.byteSizePOST
https://sourcegraph.com/.api/graphqlList repositories
Parameters
queryGraphQL query with repositories(queryrequired— first) (stringReturns
repositories.nodes[] with name, description, url, externalRepository.serviceType, mirrorInfo.cloneProgress