The REST API for LGTM provides data so that you can customize how you integrate LGTM analysis into your workflow. It includes the following resources:
/
(API root)—get version information or download the specification in OpenAPI format./projects
(Projects)—list projects, get a summary of the current status for a project, or add new projects./analyses
(Analyses)—get a summary of results, download all the alerts, or trigger analysis for a specific commit./codereviews
(Code reviews)—trigger code review for a patch, and view the results./operations
(Operations)—get information about long-running tasks, for example, analyses or code reviews that you’ve requested./snapshots
(Snapshots)—download and upload databases representing a snapshot of a codebase./queryjobs
(Query jobs)—submit queries to evaluate against existing projects, and download their results./system
(System)—get information on the health or usage of the system.For an overview and getting started topics, see API for LGTM.
Use this page to mock LGTM API specification in your testing and development.
Run our mock API sample using the open source WireMock library, or in the free edition of WireMock Cloud. You'll have a working API server simulating the behavior of LGTM API specification, which will allow you to keep building and testing even if the actual API you isn't currently available.