Skip to content

API Specs

Juha edited this page Mar 10, 2017 · 5 revisions

This page is DEPRECATED. Needs to be updated to latest API spec.

GET /api/pipelines

Returns:

{
  pipelines: [
    {
        id: (string),
        name: (string)
        description: (string)
    }
  ]
}

POST /api/pipelines/1/run

Body: { params: {..} } (no need for params at first)

Returns:

{
  task_id: (string)
}

GET /api/pipelines/1/status/{task-id} (returns status)

UI can poll this endpoint. We can improve this into websocket later

Returns:

status: (string) ("success", "error", "pending")

GET /api/pipelines/1/log/{task-id} (returns logs and status)

UI can poll this endpoint. We can improve this into websocket later

Returns:

log: (string) (this can be very multiline long)

GET /api/pipelines/1/triggers

Get webhook information

Returns:

{
  "triggers": [
    {
      "webhook_id": "ed6c37be-c434-49d6-ac7e-5845034337ca",
      "type": "github",
      "name": "gh-webhook"
    },
    {
      "webhook_id": "793d3a96-9a5c-4c39-9118-b29b450f2d31",
      "type": "slack",
      "name": "slack-webhook"
    }
  ]
}

POST /api/webhook/:webhook_id

Run corrsponding pipeline

Returns:

{
  task_id: (string)
}