Draft: Create a new GLQL REST API for Duo integration
What does this MR do and why?
This MR adds a new REST API which allows us to send GLQL query blocks to the backend, and be given data back.
This is very useful for two reasons:
- It can handle more complex GLQL situations, and in the future, it could cache the results
- It allows Duo Workflow Service to be able to query this API, allowing Duo to use and understand GLQL queries and the results.
References
Related to #573055
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- Call the API with an appropriate GLQL YAML configuration:
curl -X POST --location "http://gdk.test:8080/api/v4/glql" --http1.1 \ -H "Host: gdk.test:8080" \ -H "PRIVATE-TOKEN: {{privateToken}}" \ -H "Content-Type: application/json" \ -d '{ "glql_yaml": "display: table\nfields: title, state, author, created\nsort: created desc\nlimit: 100\nquery: type = Issue and project = \"gitlab-duo/test\"" }' - Verify that it outputs a valid response on success
- Verify that it outputs a valid error state on failure
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Robert Hunt