API reference

Three services.
Six endpoints.

The complete HTTP surface GENCODEAGENT exposes. Everything here is served by the platform itself — the Jira, Bitbucket, Groq and HuggingFace APIs are outbound calls the services make, not endpoints you can reach.

  • http://localhost:8080webhook-service
  • http://localhost:8081rag-service
  • http://localhost:8082codegen-service
POST /webhook/jira webhook-service · 8080

The pipeline's entry point. Jira Cloud calls this on every issue create and update. The controller validates the token, discards anything that is not jira:issue_created or jira:issue_updated, trims the payload to the fields that matter, and publishes a KafkaJiraEvent to jira.issue.events keyed on the issue key.

Authentication

ParameterInNotes
tokenqueryoptionalCompared against app.webhook.secret. When that property is blank, all requests are accepted.
X-Webhook-TokenheaderoptionalAlternative to the query parameter. Either one matching is enough.

Request body

The raw Jira webhook payload. Only these fields are read:

application/json
{
  "webhookEvent": "jira:issue_updated",
  "issue": {
    "key": "SCRUM-3",
    "fields": { "summary", "status", "priority", "assignee" }
  },
  "changelog": { "items": [ … ] }
}

Responses

200 accepted · published to Kafka 200 ignored · unsupported event type 400 missing issue key 401 invalid webhook token
200 · accepted
{ "status": "accepted", "issueKey": "SCRUM-3", "event": "jira:issue_updated" }
connectivity check
curl -X POST "http://localhost:8080/webhook/jira" \
  -H "Content-Type: application/json" \
  -d '{"webhookEvent":"jira:connectivity_test","issue":{"key":"TEST-0"}}'
POST /api/query rag-service · 8081

Ask a question in plain language over every indexed ticket. The question is embedded with the same model used at index time, any issue key in the text is resolved exactly, the nearest neighbours fill out the context, and the assembled prompt goes to the LLM. The answer always comes back with the tickets it was drawn from.

Body

FieldTypeNotes
querystringrequiredThe question. Any ABC-123 in it — including inside a pasted Jira URL — is looked up exactly and pinned to the front of the context.
topKintegeroptionalNearest neighbours to retrieve. Defaults to 5. Exact key matches are additional to this.

Response

200
{
  "answer": "The tickets that involve C++ are: …",
  "sources": [
    {
      "issueKey":   "SCRUM-2",
      "summary":    "write a c++ code for a+b",
      "status":     "Done",
      "similarity": 0.682          // cosine, 1.0 for an exact key match
    }
  ]
}
200 answer + sources 400 query is required
example
curl -X POST "http://localhost:8081/api/query" \
  -H "Content-Type: application/json" \
  -d '{"query":"Which tickets are about C++?","topK":5}'
GET /api/tickets rag-service · 8081

Everything currently in the vector store, newest first. This is what the console's index panel polls. Embeddings themselves are not returned.

200 · array
[
  {
    "issue_key":  "SCRUM-3",
    "summary":    "New Requirement Add gift card balance validation",
    "status":     "Done",
    "indexed_at": "2026-09-25T14:21:56.403+00:00"
  }
]

Note the snake_case here — these are column names straight from ticket_embeddings, unlike the camelCase issueKey that /api/query returns.

example
curl "http://localhost:8081/api/tickets"
POST /api/generate codegen-service · 8082

Runs the whole back half of the pipeline for one ticket: fetch it from Jira, pull the top-3 similar tickets from rag-service as context, prompt the LLM, commit the result to a new feature branch, open the Pull Request, and transition the ticket. Normally called by rag-service when a ticket enters CODEGEN — calling it directly is the way to re-run without touching Jira.

Query parameters

ParameterTypeNotes
issueKeystringrequirede.g. SCRUM-3. Its project prefix selects the Bitbucket repository via bitbucket.project-repo-map; an unmapped prefix generates code and then skips the PR.
summarystringoptionalOverrides what is fetched from Jira.
descriptionstringoptionalOverrides what is fetched from Jira.
prioritystringoptionalOverrides what is fetched from Jira.

Responses

200 code generated and PR created 500 pipeline failed · message carries the cause
200
{
  "status":   "success",
  "issueKey": "SCRUM-2",
  "message":  "Code generated and PR created successfully"
}

Synchronous, and it waits on the LLM and two Bitbucket calls — expect roughly 10–15 seconds. The Jira transition is best-effort: if it fails the PR still stands and the service logs a warning.

example
curl -X POST "http://localhost:8082/api/generate?issueKey=SCRUM-2"
GET /api/health rag-service · 8081

Liveness check. Answers as soon as the context is up; it does not probe Postgres, Kafka or the model providers.

200
{ "status": "ok", "service": "rag-service" }
GET /api/health codegen-service · 8082

The same liveness check on the generation service.

200
{ "status": "ok", "service": "codegen-service" }

webhook-service has no health endpoint — a GET to /webhook/jira returning 405 confirms it is listening.