{ "uuid": "c7121844-1f1e-4dc6-a232-fb6f096bf600", "lastMigration": 29, "name": "LGTM API specification", "endpointPrefix": "api/v1.0", "latency": 0, "port": 3000, "hostname": "", "routes": [ { "uuid": "77c01af1-5a79-4ba3-9e3b-1b7d7d4b4a71", "documentation": "Version information", "method": "get", "endpoint": "", "responses": [ { "uuid": "1784258f-1b67-4528-bb7f-7e6cc4ea8886", "body": "{\n \"apiVersion\": \"1.0\"\n}", "latency": 0, "statusCode": 200, "label": "Success. Requested data returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "add79815-9f95-4405-a2a9-6257dafc877f", "documentation": "Get analysis summary", "method": "get", "endpoint": "analyses/{analysis-id}", "responses": [ { "uuid": "007e8930-8a20-406e-b3cc-51a12918e1da", "body": "{\n \"commit-id\": \"04d7a2300feec9bbcc48185e370e3b5d3ae4da9d\",\n \"id\": \"2e65208b2f1872634132566a1a0ce6392407297c\",\n \"languages\": [\n {\n \"alerts\": 628,\n \"analysis-date\": \"2000-01-23T04:56:07.000+00:00\",\n \"commit-date\": \"2000-01-23T04:56:07.000+00:00\",\n \"commit-id\": \"04d7a2300feec9bbcc48185e370e3b5d3ae4da9d\",\n \"language\": \"javascript\",\n \"lines\": 133298,\n \"status\": \"success\"\n },\n {\n \"alerts\": 628,\n \"analysis-date\": \"2000-01-23T04:56:07.000+00:00\",\n \"commit-date\": \"2000-01-23T04:56:07.000+00:00\",\n \"commit-id\": \"04d7a2300feec9bbcc48185e370e3b5d3ae4da9d\",\n \"language\": \"javascript\",\n \"lines\": 133298,\n \"status\": \"success\"\n }\n ],\n \"log-url\": \"https://lgtm.example.com/projects/g/yarnpkg/yarn/logs/analysis/2e65208b2f1872634132566a1a0ce6392407297c\",\n \"project\": {\n \"id\": 1234567,\n \"name\": \"Apache Commons IO\",\n \"url\": \"https://lgtm.example.com/projects/g/apache/commons-io\",\n \"url-identifier\": \"g/apache/commons-io\"\n },\n \"results-url\": \"https://lgtm.example.com/projects/g/yarnpkg/yarn/analysis/2e65208b2f1872634132566a1a0ce6392407297c/files\"\n}", "latency": 0, "statusCode": 200, "label": "Success. Requested data returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "3d0525ac-16ea-4b21-a45e-909439bb8fb7", "documentation": "Get detailed alert information", "method": "get", "endpoint": "analyses/{analysis-id}/alerts", "responses": [ { "uuid": "00e1e853-b1dd-4b52-b71e-264b825470d4", "body": "{}", "latency": 0, "statusCode": 200, "label": "Success. Requested data returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "82b23706-d347-475d-b183-1313f62f318e", "documentation": "Run analysis of a specific commit", "method": "post", "endpoint": "analyses/{project-id}", "responses": [ { "uuid": "a71b2b8f-c023-447b-91df-b87cc1c3fc8e", "body": "{\n \"id\": 7654321,\n \"status\": \"pending\",\n \"task-result\": \"\",\n \"task-result-url\": \"https://lgtm.example.com/api/v1.0/codereviews/b45e291e7033460949ec986153c5416d22157d3e\",\n \"task-type\": \"analysis\",\n \"uploads\": {\n \"key\": {\n \"id\": \"0bc9f13977e364395e8527515da9cbfa0e741cb035fe571197e82e0dd549416d\",\n \"url\": \"https://lgtm.example.com/api/v1.0/snapshots/uploads/0bc9f13977e364395e8527515da9cbfa0e741cb035fe571197e82e0dd549416d\"\n }\n }\n}", "latency": 0, "statusCode": 202, "label": "Accepted. Analysis triggered. Tracking data returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "36518c30-3b9d-4972-b175-57c59b820ecc", "documentation": "Get analysis summary for a specific commit", "method": "get", "endpoint": "analyses/{project-id}/commits/{commit-id}", "responses": [ { "uuid": "40f84355-8670-432c-a642-2184718d1dc5", "body": "{\n \"commit-id\": \"04d7a2300feec9bbcc48185e370e3b5d3ae4da9d\",\n \"id\": \"2e65208b2f1872634132566a1a0ce6392407297c\",\n \"languages\": [\n {\n \"alerts\": 628,\n \"analysis-date\": \"2000-01-23T04:56:07.000+00:00\",\n \"commit-date\": \"2000-01-23T04:56:07.000+00:00\",\n \"commit-id\": \"04d7a2300feec9bbcc48185e370e3b5d3ae4da9d\",\n \"language\": \"javascript\",\n \"lines\": 133298,\n \"status\": \"success\"\n },\n {\n \"alerts\": 628,\n \"analysis-date\": \"2000-01-23T04:56:07.000+00:00\",\n \"commit-date\": \"2000-01-23T04:56:07.000+00:00\",\n \"commit-id\": \"04d7a2300feec9bbcc48185e370e3b5d3ae4da9d\",\n \"language\": \"javascript\",\n \"lines\": 133298,\n \"status\": \"success\"\n }\n ],\n \"log-url\": \"https://lgtm.example.com/projects/g/yarnpkg/yarn/logs/analysis/2e65208b2f1872634132566a1a0ce6392407297c\",\n \"project\": {\n \"id\": 1234567,\n \"name\": \"Apache Commons IO\",\n \"url\": \"https://lgtm.example.com/projects/g/apache/commons-io\",\n \"url-identifier\": \"g/apache/commons-io\"\n },\n \"results-url\": \"https://lgtm.example.com/projects/g/yarnpkg/yarn/analysis/2e65208b2f1872634132566a1a0ce6392407297c/files\"\n}", "latency": 0, "statusCode": 200, "label": "Success. Data returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "6c90a591-cd57-4032-ac18-24757e8adba2", "documentation": "Run code review for a patch", "method": "post", "endpoint": "codereviews/{project-id}", "responses": [ { "uuid": "3742f77b-4eef-4f58-84d4-177ab2b00fa9", "body": "{\n \"id\": 7654321,\n \"status\": \"pending\",\n \"task-result\": \"\",\n \"task-result-url\": \"https://lgtm.example.com/api/v1.0/codereviews/b45e291e7033460949ec986153c5416d22157d3e\",\n \"task-type\": \"analysis\",\n \"uploads\": {\n \"key\": {\n \"id\": \"0bc9f13977e364395e8527515da9cbfa0e741cb035fe571197e82e0dd549416d\",\n \"url\": \"https://lgtm.example.com/api/v1.0/snapshots/uploads/0bc9f13977e364395e8527515da9cbfa0e741cb035fe571197e82e0dd549416d\"\n }\n }\n}", "latency": 0, "statusCode": 202, "label": "Accepted. Code review triggered. Tracking data returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "ae609e50-cdf5-404e-94e0-c4b7f4988636", "documentation": "Get results of code review", "method": "get", "endpoint": "codereviews/{review-id}", "responses": [ { "uuid": "68efb776-21c6-4e23-8419-b9988b55383b", "body": "[\n {\n \"id\": \"b45e291e7033460949ec986153c5416d22157d3e\",\n \"languages\": [\n {\n \"alerts\": [\n {\n \"fixed\": 1,\n \"new\": 0,\n \"query\": {\n \"name\": \"Incomplete string escaping or encoding\"\n }\n }\n ],\n \"fixed\": 1,\n \"language\": \"javascript\",\n \"new\": 0,\n \"status\": \"success\",\n \"status-message\": \"1 fixed alert\"\n }\n ],\n \"results-url\": \"https://lgtm.example.com/projects/g/yarnpkg/yarn/rev/pr-b45e291e7033460949ec986153c5416d22157d3e\",\n \"status\": \"success\",\n \"status-message\": \"Analysis succeeded\"\n }\n]", "latency": 0, "statusCode": 200, "label": "Success. Requested data returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "b8bb463e-4bc6-440a-b06d-8462b92c923e", "documentation": "Get detailed alert information for an issue", "method": "get", "endpoint": "issues/{project-id}/{alert-key}", "responses": [ { "uuid": "1c67ef55-a29c-4636-90e2-f9dc4079f53f", "body": "", "latency": 0, "statusCode": 200, "label": "Success. Requested data returned.", "headers": [ { "key": "Content-Type", "value": "application/sarif+json" } ], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "f3e429dc-f86d-4da9-a824-199928f81ea4", "documentation": "API specification", "method": "get", "endpoint": "openapi", "responses": [ { "uuid": "21e7e9eb-b9d4-4f49-8338-5d866bb02cfb", "body": "{}", "latency": 0, "statusCode": 200, "label": "Success. Requested data returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "5ae2a8a2-18ff-4864-9aac-8ed363db0843", "documentation": "Get operation status", "method": "get", "endpoint": "operations/{operation-id}", "responses": [ { "uuid": "345c6260-ea64-49b6-aa7c-18d1dbb33961", "body": "{\n \"id\": 7654321,\n \"status\": \"pending\",\n \"task-result\": \"\",\n \"task-result-url\": \"https://lgtm.example.com/api/v1.0/codereviews/b45e291e7033460949ec986153c5416d22157d3e\",\n \"task-type\": \"analysis\",\n \"uploads\": {\n \"key\": {\n \"id\": \"0bc9f13977e364395e8527515da9cbfa0e741cb035fe571197e82e0dd549416d\",\n \"url\": \"https://lgtm.example.com/api/v1.0/snapshots/uploads/0bc9f13977e364395e8527515da9cbfa0e741cb035fe571197e82e0dd549416d\"\n }\n }\n}", "latency": 0, "statusCode": 200, "label": "Success. Requested data returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "d268895c-96d1-438f-9511-a28227ded158", "documentation": "List projects", "method": "get", "endpoint": "projects", "responses": [ { "uuid": "35868eb8-2c3b-48eb-9c38-9675a107080a", "body": "{\n \"data\": [\n {\n \"id\": 1234567,\n \"name\": \"Apache Commons IO\",\n \"url\": \"https://lgtm.example.com/projects/g/apache/commons-io\",\n \"url-identifier\": \"g/apache/commons-io\"\n },\n {\n \"id\": 1234567,\n \"name\": \"Apache Commons IO\",\n \"url\": \"https://lgtm.example.com/projects/g/apache/commons-io\",\n \"url-identifier\": \"g/apache/commons-io\"\n }\n ],\n \"nextPageUrl\": \"https://lgtm.example.com/api/v1.0/projects?start=AVAIySnWtmGBpZjIb27kbrqB2uK2HIU0Zk9Sfh19ya8nxzA4GE5bv9LxVPSjQCwHKThqAADNvp17WuWBuBe8901G-ryeA2tLD6JZh8lue2IM0EuqsqB9Wk5BAM6T0lEnXA\"\n}", "latency": 0, "statusCode": 200, "label": "Success. Requested data returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "60c29a01-ab19-432d-86c7-da84c957fccb", "documentation": "Add a project to LGTM", "method": "post", "endpoint": "projects", "responses": [ { "uuid": "d46bd789-65bc-4cb4-b259-8e54e710dc57", "body": "{\n \"id\": 7654321,\n \"status\": \"pending\",\n \"task-result\": \"\",\n \"task-result-url\": \"https://lgtm.example.com/api/v1.0/codereviews/b45e291e7033460949ec986153c5416d22157d3e\",\n \"task-type\": \"analysis\",\n \"uploads\": {\n \"key\": {\n \"id\": \"0bc9f13977e364395e8527515da9cbfa0e741cb035fe571197e82e0dd549416d\",\n \"url\": \"https://lgtm.example.com/api/v1.0/snapshots/uploads/0bc9f13977e364395e8527515da9cbfa0e741cb035fe571197e82e0dd549416d\"\n }\n }\n}", "latency": 0, "statusCode": 202, "label": "Accepted. Analysis attempts triggered or upload URLs returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "ce7b07e8-c49d-4f4c-b4e9-49d3e480bb3b", "documentation": "Delete project by numeric identifier", "method": "delete", "endpoint": "projects/{project-id}", "responses": [ { "uuid": "2747781f-827e-46c7-bf61-c9f76de2c3e1", "body": "{\n \"id\": 1234567,\n \"name\": \"Apache Commons IO\",\n \"url\": \"https://lgtm.example.com/projects/g/apache/commons-io\",\n \"url-identifier\": \"g/apache/commons-io\"\n}", "latency": 0, "statusCode": 200, "label": "Success. Details of the deleted project returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "0d2694ea-cc02-4ca1-b065-f48738b3529d", "documentation": "Get project by numeric identifier", "method": "get", "endpoint": "projects/{project-id}", "responses": [ { "uuid": "bd21357d-f1de-4239-b5fc-5d9f7dea8895", "body": "{\n \"id\": 1234567,\n \"name\": \"Apache Commons IO\",\n \"url\": \"https://lgtm.example.com/projects/g/apache/commons-io\",\n \"url-identifier\": \"g/apache/commons-io\"\n}", "latency": 0, "statusCode": 200, "label": "Success. Requested data returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "66b71839-a1bb-4f6b-a3a6-0fac5cffb4e2", "documentation": "Get configuration for a project identified by numeric identifier", "method": "get", "endpoint": "projects/{project-id}/settings/analysis-configuration", "responses": [ { "uuid": "d71ab6ce-de83-44fe-b4ce-0446e67103e8", "body": "", "latency": 0, "statusCode": 200, "label": "Success. Requested data returned.", "headers": [{ "key": "Content-Type", "value": "application/x-yaml" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" }, { "uuid": "c7fb7c45-df5e-4ff5-90b3-0cf02ff156cf", "body": "{}", "latency": 0, "statusCode": 400, "label": "Only YAML is supported.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": false, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "1bceb608-2ea3-47af-88dd-d519fdbede0b", "documentation": "Set the administrator configuration for a project identified by numeric identifier", "method": "put", "endpoint": "projects/{project-id}/settings/analysis-configuration", "responses": [ { "uuid": "0877eae4-e865-4138-83a2-84b1377618cf", "body": "", "latency": 0, "statusCode": 200, "label": "Success. The new effective project configuration is returned.", "headers": [{ "key": "Content-Type", "value": "application/x-yaml" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "2f96b667-86b4-4719-9dc5-f4bfde4bd518", "documentation": "Get project by URL identifier", "method": "get", "endpoint": "projects/:provider/:org/:name", "responses": [ { "uuid": "ebd1b710-6146-498f-9681-ef9d0012b6e0", "body": "{\n \"id\": 1234567,\n \"name\": \"Apache Commons IO\",\n \"url\": \"https://lgtm.example.com/projects/g/apache/commons-io\",\n \"url-identifier\": \"g/apache/commons-io\"\n}", "latency": 0, "statusCode": 200, "label": "Success. Requested data returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" }, { "uuid": "d0bfc4f3-3651-43df-b12d-2938144349c4", "body": "", "latency": 0, "statusCode": 307, "label": "Redirect. The project has been renamed. Request redirected to numeric identifier for the project.\n", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": false, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "e44003de-2865-48b8-9a5a-cd4c772f76b6", "documentation": "Run a CodeQL query on one or more projects", "method": "post", "endpoint": "queryjobs", "responses": [ { "uuid": "c181a23c-039d-4f89-8d23-6290a3b8a9d2", "body": "{\n \"id\": 7654321,\n \"status\": \"pending\",\n \"task-result\": \"\",\n \"task-result-url\": \"https://lgtm.example.com/api/v1.0/codereviews/b45e291e7033460949ec986153c5416d22157d3e\",\n \"task-type\": \"analysis\",\n \"uploads\": {\n \"key\": {\n \"id\": \"0bc9f13977e364395e8527515da9cbfa0e741cb035fe571197e82e0dd549416d\",\n \"url\": \"https://lgtm.example.com/api/v1.0/snapshots/uploads/0bc9f13977e364395e8527515da9cbfa0e741cb035fe571197e82e0dd549416d\"\n }\n }\n}", "latency": 0, "statusCode": 202, "label": "Accepted. Query submitted. Tracking data returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "f70877cc-ef66-4b2c-87bd-3c5fae659bcc", "documentation": "Get the status of a query job", "method": "get", "endpoint": "queryjobs/{queryjob-id}", "responses": [ { "uuid": "f048af69-2f7c-4967-acbc-78148fc5f945", "body": "{\n \"id\": \"b45e291e7033460949ec986153c5416d22157d3e\",\n \"result-url\": \"https://lgtm.com/api/v1.0/query/b45e291e7033460949ec986153c5416d22157d3e\",\n \"stats\": {\n \"failed\": 1,\n \"pending\": 1,\n \"success-with-result\": 3,\n \"success-without-result\": 5,\n \"successful\": 8\n }\n}", "latency": 0, "statusCode": 200, "label": "Success. Requested data returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "34bbe42a-8dcb-455d-942f-06d7dd342bd5", "documentation": "Provide a summary of results for the projects in the query job", "method": "get", "endpoint": "queryjobs/{queryjob-id}/results", "responses": [ { "uuid": "622e2809-29e4-4d22-b758-69b18279da8f", "body": "{\n \"data\": [\n {\n \"project\": {\n \"id\": 1234567,\n \"name\": \"Apache Commons IO\",\n \"url\": \"https://lgtm.example.com/projects/g/apache/commons-io\",\n \"url-identifier\": \"g/apache/commons-io\"\n },\n \"results\": 10,\n \"status\": \"success\"\n },\n {\n \"error\": \"Generic Error\",\n \"project\": {\n \"id\": 42530,\n \"name\": \"Apache Maven\",\n \"url\": \"https://lgtm.example.com/projects/g/apache/maven\",\n \"url-identifier\": \"g/apache/maven\"\n },\n \"status\": \"error\"\n }\n ],\n \"next\": \"https://lgtm.example.com/api/v1.0/queryjobs/2123/results?start=AXBe\"\n}", "latency": 0, "statusCode": 200, "label": "Success. Requested data returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "e62af055-50f9-43f9-8ca1-5c045ea19912", "documentation": "Fetch the results of a query job for a specific project", "method": "get", "endpoint": "queryjobs/{queryjob-id}/results/{project-id}", "responses": [ { "uuid": "da7ab43e-1e54-412d-b1b8-c67bf689ac45", "body": "{\n \"columns\": [\n \"Column A\",\n \"Column B\"\n ],\n \"data\": [\n [\n {\n \"file\": \"/path/to/file.txt\",\n \"line\": 100,\n \"url\": \"https://lgtm.example.com/projects/g/apache/commons-io/snapshot/271554d09bb63cb546aa5151916588c320533395/files/path/to/file.txt#L100\",\n \"value\": \"Alert 1\"\n },\n {\n \"value\": \"Value B\"\n }\n ]\n ],\n \"next\": \"https://lgtm.example.com/api/v1.0/queryjobs/results/1234567?start=AXBe&limit=100\",\n \"project\": {\n \"id\": 1234567,\n \"name\": \"Apache Commons IO\",\n \"url\": \"https://lgtm.example.com/projects/g/apache/commons-io\",\n \"url-identifier\": \"g/apache/commons-io\"\n }\n}", "latency": 0, "statusCode": 200, "label": "Success. The result contains three items: column headers, data, and pagination information.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "ef8f4e36-9e5b-4f6d-8344-270a90cbada9", "documentation": "Abort database upload process", "method": "delete", "endpoint": "snapshots/uploads/{session-id}", "responses": [ { "uuid": "702ccb9d-8903-40b2-a339-51da88c62e56", "body": "{\n \"id\": 7654321,\n \"status\": \"pending\",\n \"task-result\": \"\",\n \"task-result-url\": \"https://lgtm.example.com/api/v1.0/codereviews/b45e291e7033460949ec986153c5416d22157d3e\",\n \"task-type\": \"analysis\",\n \"uploads\": {\n \"key\": {\n \"id\": \"0bc9f13977e364395e8527515da9cbfa0e741cb035fe571197e82e0dd549416d\",\n \"url\": \"https://lgtm.example.com/api/v1.0/snapshots/uploads/0bc9f13977e364395e8527515da9cbfa0e741cb035fe571197e82e0dd549416d\"\n }\n }\n}", "latency": 0, "statusCode": 202, "label": "Aborted.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "fad3ac5f-2246-4eae-a7f5-4758de28b68a", "documentation": "Complete snapshot upload session", "method": "post", "endpoint": "snapshots/uploads/{session-id}", "responses": [ { "uuid": "d8532fa8-c315-4ee8-a872-c9b9bccb65cf", "body": "{\n \"id\": 7654321,\n \"status\": \"pending\",\n \"task-result\": \"\",\n \"task-result-url\": \"https://lgtm.example.com/api/v1.0/codereviews/b45e291e7033460949ec986153c5416d22157d3e\",\n \"task-type\": \"analysis\",\n \"uploads\": {\n \"key\": {\n \"id\": \"0bc9f13977e364395e8527515da9cbfa0e741cb035fe571197e82e0dd549416d\",\n \"url\": \"https://lgtm.example.com/api/v1.0/snapshots/uploads/0bc9f13977e364395e8527515da9cbfa0e741cb035fe571197e82e0dd549416d\"\n }\n }\n}", "latency": 0, "statusCode": 202, "label": "Accepted. Analysis triggered. Tracking data returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "e1f68dd0-d989-46bb-8e7e-5b8021685de1", "documentation": "Upload snapshot", "method": "put", "endpoint": "snapshots/uploads/{session-id}", "responses": [ { "uuid": "7b72c38a-1bf8-4099-80d8-d052bdf2b455", "body": "", "latency": 0, "statusCode": 204, "label": "Success.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "3526ddef-84ce-4d9c-b0e6-fcf51d96d8d6", "documentation": "Download a snapshot", "method": "get", "endpoint": "snapshots/{project-id}/:language", "responses": [ { "uuid": "ff05b17c-44d1-4530-987e-fc58c6fc2d9d", "body": "", "latency": 0, "statusCode": 303, "label": "Redirects to a URL for downloading the CodeQL database as indicated by the `Location:` header.", "headers": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Location", "value": "" } ], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "4d6da7d3-d115-4d47-9f1b-fff7bf0dcdbc", "documentation": "Start snapshot upload session", "method": "post", "endpoint": "snapshots/{project-id}/:language", "responses": [ { "uuid": "a237eafc-3828-4c7a-9050-52f369b66d34", "body": "{\n \"id\": \"0bc9f13977e364395e8527515da9cbfa0e741cb035fe571197e82e0dd549416d\",\n \"url\": \"https://lgtm.example.com/api/v1.0/snapshots/uploads/0bc9f13977e364395e8527515da9cbfa0e741cb035fe571197e82e0dd549416d\"\n}", "latency": 0, "statusCode": 200, "label": "Success.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "a86dc0fb-89d6-433e-b2b7-8aba112bf5b7", "documentation": "Get a summary of the application's health", "method": "get", "endpoint": "system/health", "responses": [ { "uuid": "ffd40c61-39ee-474e-ab9b-27b67c3be585", "body": "\"\"", "latency": 0, "statusCode": 200, "label": "The application is up.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" }, { "uuid": "b3df670d-58c6-4924-8e38-bcda6881e545", "body": "\"\"", "latency": 0, "statusCode": 503, "label": "The application is down.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": false, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "201be8fd-7e1d-4111-b2ed-38bcfe1ba797", "documentation": "Get the identifiers and descriptions of the usage metrics", "method": "get", "endpoint": "system/metrics", "responses": [ { "uuid": "29b1d9d0-ef98-46a6-b403-62eec5feb6e5", "body": "{\n \"data\": [\n {\n \"description\": \"description\",\n \"metric-id\": \"metric-id\"\n },\n {\n \"description\": \"description\",\n \"metric-id\": \"metric-id\"\n }\n ]\n}", "latency": 0, "statusCode": 200, "label": "The metric identifiers and descriptions are returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "5ea62769-5124-4458-8848-13609810458a", "documentation": "Get the computed values of the specified metric", "method": "get", "endpoint": "system/metrics/{metric-id}", "responses": [ { "uuid": "61b3c684-15a9-4644-8828-de779844a0c9", "body": "{\n \"measurements\": [\n {\n \"timestamp\": \"2000-01-23T04:56:07.000+00:00\",\n \"value\": 0.8008281904610115\n },\n {\n \"timestamp\": \"2000-01-23T04:56:07.000+00:00\",\n \"value\": 0.8008281904610115\n }\n ],\n \"metric-id\": \"metric-id\"\n}", "latency": 0, "statusCode": 200, "label": "Success. Requested data returned.", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" } ], "proxyMode": false, "proxyHost": "", "proxyRemovePrefix": false, "tlsOptions": { "enabled": false, "type": "CERT", "pfxPath": "", "certPath": "", "keyPath": "", "caPath": "", "passphrase": "" }, "cors": true, "headers": [], "proxyReqHeaders": [{ "key": "", "value": "" }], "proxyResHeaders": [{ "key": "", "value": "" }], "data": [], "folders": [], "rootChildren": [ { "type": "route", "uuid": "77c01af1-5a79-4ba3-9e3b-1b7d7d4b4a71" }, { "type": "route", "uuid": "add79815-9f95-4405-a2a9-6257dafc877f" }, { "type": "route", "uuid": "3d0525ac-16ea-4b21-a45e-909439bb8fb7" }, { "type": "route", "uuid": "82b23706-d347-475d-b183-1313f62f318e" }, { "type": "route", "uuid": "36518c30-3b9d-4972-b175-57c59b820ecc" }, { "type": "route", "uuid": "6c90a591-cd57-4032-ac18-24757e8adba2" }, { "type": "route", "uuid": "ae609e50-cdf5-404e-94e0-c4b7f4988636" }, { "type": "route", "uuid": "b8bb463e-4bc6-440a-b06d-8462b92c923e" }, { "type": "route", "uuid": "f3e429dc-f86d-4da9-a824-199928f81ea4" }, { "type": "route", "uuid": "5ae2a8a2-18ff-4864-9aac-8ed363db0843" }, { "type": "route", "uuid": "d268895c-96d1-438f-9511-a28227ded158" }, { "type": "route", "uuid": "60c29a01-ab19-432d-86c7-da84c957fccb" }, { "type": "route", "uuid": "ce7b07e8-c49d-4f4c-b4e9-49d3e480bb3b" }, { "type": "route", "uuid": "0d2694ea-cc02-4ca1-b065-f48738b3529d" }, { "type": "route", "uuid": "66b71839-a1bb-4f6b-a3a6-0fac5cffb4e2" }, { "type": "route", "uuid": "1bceb608-2ea3-47af-88dd-d519fdbede0b" }, { "type": "route", "uuid": "2f96b667-86b4-4719-9dc5-f4bfde4bd518" }, { "type": "route", "uuid": "e44003de-2865-48b8-9a5a-cd4c772f76b6" }, { "type": "route", "uuid": "f70877cc-ef66-4b2c-87bd-3c5fae659bcc" }, { "type": "route", "uuid": "34bbe42a-8dcb-455d-942f-06d7dd342bd5" }, { "type": "route", "uuid": "e62af055-50f9-43f9-8ca1-5c045ea19912" }, { "type": "route", "uuid": "ef8f4e36-9e5b-4f6d-8344-270a90cbada9" }, { "type": "route", "uuid": "fad3ac5f-2246-4eae-a7f5-4758de28b68a" }, { "type": "route", "uuid": "e1f68dd0-d989-46bb-8e7e-5b8021685de1" }, { "type": "route", "uuid": "3526ddef-84ce-4d9c-b0e6-fcf51d96d8d6" }, { "type": "route", "uuid": "4d6da7d3-d115-4d47-9f1b-fff7bf0dcdbc" }, { "type": "route", "uuid": "a86dc0fb-89d6-433e-b2b7-8aba112bf5b7" }, { "type": "route", "uuid": "201be8fd-7e1d-4111-b2ed-38bcfe1ba797" }, { "type": "route", "uuid": "5ea62769-5124-4458-8848-13609810458a" } ] }