Automate your development workflow
Use the Code Review APIs when you automate parts of your software development lifecycle and need more control over that process. This kind of system is sometimes called a software factory: a workflow that coordinates code generation, reviews, continuous integration (CI), and risk assessment across multiple vendors, tools, and services. In a software factory, you may need to:- Control when reviews run and at which points in your workflow.
- Combine Unblocked findings with reviews from other tools or human reviewers.
- Assess risk separately to decide whether to continue automatically or request human approval.
Where to integrate in your workflow
Your workflow chooses when to call each service and what to do with its results. In this example, it requests a review after code generation, sends findings back for fixes, and assesses risk after CI and other reviews pass.Making requests
Runs are asynchronous: you create a run with a POST request, then fetch its results with a GET request. Code reviews return findings with file paths and line ranges; risk assessments return a risk score and rationale.
Submit the pull request URL as
prUrl, then use the returned run ID to poll the corresponding GET endpoint until the status is complete and the results are available. Request a new run when you need results for updated code.