Schema overview

A map of the DeepSource GraphQL API schema — root queries, nested queries, and all available mutations.

This page gives you a bird's-eye view of the API. Use it to find the right query or mutation, then follow the links for full details and examples.

Root Queries

These are top-level entry points you can call directly.

QueryDescriptionDetails
viewerGet the authenticated user's profile and accountsViewer
accountLook up a DeepSource account (team or individual)Account
repositoryLook up a repository and its analysis dataRepository
runFetch an analysis run by UID or commit SHAAnalysis Run
analyzerFetch a single analyzer by shortcodeAnalyzer
analyzersList all available analyzersAnalyzers
codeFormatterFetch a single code formatter by shortcodeCode Formatter
codeFormattersList all available code formattersCode Formatters

Nested Queries

These are accessed through the repository { ... } query.

FieldDescriptionDetails
analysisRunsPast analysis runs for the repositoryAnalysis Runs
pullRequest(number)Fetch a specific pull request by numberPull Request
issuesAll issues raised in the default branchRepository
issueOccurrencesIssue occurrences in the default branchCheck
ignoreRulesIgnore rules configured for the repositoryIssue
reportsCompliance and trend reportsReports
metricsCode metrics (coverage, etc.)Metrics
enabledAnalyzersAnalyzers enabled in the repositoryAnalyzers
targetsSCA targets (manifest/lockfile pairs)Repository
dependencyVulnerabilityOccurrencesDependency vulnerability occurrencesRepository
dependencyVulnerabilityOccurrence(id)A specific vulnerability occurrence by IDRepository
target(id)A specific SCA target by IDRepository

Queries are also available through account { ... }:

FieldDescriptionDetails
repositoriesRepositories belonging to the accountRepositories
membersTeam members (empty for individual accounts)Team
reportsAccount-level reportsReports
suppressedIssuesIssues suppressed at the team levelAccount

Mutations

All mutations available in the API, grouped by area.

Repository management

MutationDescriptionDetails
activateRepositoryActivate analysis on a repositoryRepository
deactivateRepositoryDeactivate analysis on a repositoryRepository
regenerateRepositoryDSNRegenerate a repository's DSNRepository
updateRepositoryDefaultBranchChange the default branch for analysisRepository

Quality gates

MutationDescriptionDetails
updateRepositoryIssueCategorySettingConfigure issue category quality gatesRepository
updateRepositoryIssuePrioritySettingConfigure issue priority quality gatesRepository
updateRepositoryMetricSettingConfigure metric quality gatesRepository
setRepositoryMetricThresholdSet the threshold value for a metricMetric

Team-level issue suppression

MutationDescriptionDetails
suppressIssueForTeamSuppress an issue across all team repositoriesTeam
unsuppressIssueForTeamRemove a team-level issue suppressionTeam

On this page