canonical: https://jentic.com/apis/codeclimate.com/codeclimate

# Code Climate Quality API

Jentic publishes the only available OpenAPI specification for Code Climate Quality API, keeping it validated and agent-ready. Code Climate (now operating as Qlty) is a code quality and maintainability platform that analyses repositories for issues, complexity, duplication, and technical debt. The Quality API exposes 8 read-oriented endpoints over the api.qlty.sh host, covering workspaces, projects, issues, project metrics, and file-level metrics. Authentication is a Bearer token tied to a Qlty user, so agents can pull quality signals into dashboards, pull request automation, or risk reports without scraping the web UI.

## For AI agents

Read code quality signals - issues, project metrics, and file metrics - for repositories analysed by Code Climate (Qlty), authenticated with a Bearer token.

## Scope

Does not handle test coverage, security vulnerability scanning, or write operations on Qlty projects - use for reading code quality metrics and issues only.

## Capabilities

- List every Qlty workspace the authenticated user can access via GET /workspaces
- Enumerate the projects under a GitHub owner with GET `/gh/{ownerKeyOrId}/projects`
- Retrieve aggregate quality metrics for a project via GET `/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/metrics`
- Pull file-level metrics to find the most complex or duplicated files in a repository
- Stream the open code quality issues for a project to feed pull request review agents
- Resolve the authenticated user's profile via GET /user for downstream attribution

## Use cases

### Pull Request Quality Gating

Read Code Climate issues for a project as part of a pull request review pipeline so the reviewing agent can flag any newly introduced quality regressions. The agent calls GET `/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/issues`, diffs against the base branch, and posts a structured comment. Helps engineering leaders enforce a quality bar without manual triage.

Example prompt: Call GET `/gh/acme/projects/web-app/issues`, filter to issues touching files in the PR diff, and post a summary comment listing each issue with its severity

### Engineering Metrics Dashboards

Pull project-level and file-level metrics across an entire engineering portfolio for a leadership dashboard. The API supports per-project metrics and per-file breakdowns so a dashboard can answer 'where is our technical debt concentrated?' without each team having to surface the data manually. Updates run on a schedule rather than ad hoc.

Example prompt: For every project under owner 'acme' fetch GET `/gh/acme/projects/{projectKeyOrId}/metrics` and POST the results to a Looker datasource

### Hotspot Discovery for Refactoring Sprints

Identify the files with the highest complexity and most outstanding issues so a refactoring sprint can target the right code. The file metrics endpoint returns per-file scores, which the agent can rank to produce a prioritised list. Replaces gut-feel decisions about what to refactor with data from the same engine that scored every recent commit.

Example prompt: Call GET `/gh/acme/projects/web-app/files`, sort by complexity descending, and produce a top-10 list with file path, complexity score, and open issue count

### Workspace Onboarding Audits

When a new team joins Qlty, audit which workspaces and projects are visible, then verify that every active GitHub repository has an associated Qlty project. The agent enumerates GET /workspaces and GET `/gh/{ownerKeyOrId}/projects` and reconciles against the GitHub API to flag missing coverage. Catches blind spots before they show up in a board review.

Example prompt: List all workspaces with GET /workspaces, list projects per owner with GET `/gh/{ownerKeyOrId}/projects`, then list repos via the GitHub API and report repositories without a matching Qlty project

### Agent-Driven Quality Lookups via Jentic

A Jentic-connected agent can answer ad hoc questions like 'how bad is the quality of our payments service right now?' by issuing the right Code Climate Quality API call and summarising the response. Jentic stores the Bearer token in its vault so the agent never receives the raw secret. The whole loop - search, load, execute, summarise - runs in seconds.

Example prompt: Search Jentic for 'get Code Climate project metrics', load the schema, execute against project 'payments-service', and return a one-paragraph quality summary

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/workspaces` | List Qlty workspaces |
| GET | `/workspaces/{keyOrId}` | Retrieve a single workspace |
| GET | `/gh/{ownerKeyOrId}/projects` | List projects under a GitHub owner |
| GET | `/gh/{ownerKeyOrId}/projects/{keyOrId}` | Retrieve a single project |
| GET | `/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/issues` | List open code quality issues for a project |
| GET | `/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/metrics` | Get aggregate metrics for a project |
| GET | `/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/files` | Get per-file metrics |
| GET | `/user` | Get the authenticated user |

## Key resources

- **Workspaces** — List and retrieve Qlty workspaces the authenticated user can access
- **Projects** — Enumerate and retrieve projects scoped to a GitHub owner
- **Issues** — Read open code quality issues for a project
- **Metrics** — Pull project-level aggregate metrics and file-level metrics
- **User** — Resolve the authenticated user's profile

## Why Jentic

- **Setup:** Wiring the Code Climate Quality API by hand means building its Bearer header, targeting api.qlty.sh, and threading owner and project keys through every issues, metrics, and files read yourself. Through Jentic you install once, import the Code Climate Quality API from the API Directory, store the Bearer token once, and your agent calls it.
- **Permission scoping:** The Quality API puts the owner and project in the URL path (`/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/...`), so a rule can pin your agent to one project: it reads that project's issues, metrics, and files and nothing else. Since these are read-only operations, you choose which of those reads the agent may call.
- **Credential handling:** Your Code Climate Quality API token is stored once, encrypted, by your own Jentic One instance and injected at execution time as the Bearer token. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get code quality issues for a project' or 'read project quality metrics', and Jentic returns the matching operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **SonarCloud API** — Cloud SaaS code quality and security platform that competes directly with Code Climate
- **Snyk API** — Pair with Code Climate to add dependency vulnerability and license scanning alongside maintainability metrics
- **Coveralls API** — Adds line and branch coverage data that complements Code Climate's maintainability metrics

## FAQ

### Why is there no official OpenAPI spec for Code Climate Quality API?

Code Climate (Qlty) does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Code Climate Quality API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Code Climate Quality API use?

The Code Climate Quality API uses HTTP Bearer authentication. You generate a token in the Qlty account UI and send it as Authorization: Bearer {token}. Through Jentic the token is stored in the vault, and agents receive scoped execution access only.

### Can I list code quality issues for a repository with the Code Climate Quality API?

Yes. Call GET `/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/issues` with the GitHub owner key and project key. The endpoint returns the open issues detected by the Qlty engine, which agents can rank by severity or filter to a specific file path.

### What are the rate limits for the Code Climate Quality API?

Qlty does not publish a public rate limit in its API documentation. Treat the API as best-effort and back off on HTTP 429 responses. For portfolio-wide metric pulls, throttle to a few requests per second per token.

### How do I get project metrics through Jentic?

Search Jentic for 'get Code Climate project metrics', load the schema for GET `/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/metrics`, and execute it with the relevant owner and project keys. Jentic injects the Bearer token from the vault and returns the parsed metrics object.

### Does the Code Climate Quality API support write operations?

Not in this spec. The 8 documented endpoints are all GET requests covering workspaces, projects, issues, metrics, and the authenticated user. Configuration changes still happen in the Qlty UI.

### Can I limit what my agent is allowed to do with the Code Climate Quality API?

Yes. Because Jentic One is self-hosted, your own rules decide which of the Quality API's read operations the agent may call and which token it uses. The endpoints put the GitHub owner and project in the URL path (`/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/...`), so you can pin the agent to a single project and let it read only that project's issues, metrics, and files. Since every documented operation is read-only, you control exactly which of those reads, such as GET /workspaces or the project metrics call, the agent is permitted to make.
