API Reference

Complete REST API documentation for AI Pipeline integration.

Base URL: https://api.ai-pipeline.com/v1

Quick Start

Get started with the AI Pipeline API in minutes. All API requests must include authentication.

# Example API call using curl
curl -X POST https://api.ai-pipeline.com/v1/api/pipeline/trigger \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jiraTicketKey": "PROJ-123",
    "repository": "org/my-project",
    "baseBranch": "main"
  }'

Authentication Methods

API Key Authentication

Use Bearer token in Authorization header

Authorization: Bearer YOUR_API_KEY

Generate API keys from your dashboard settings

Webhook Secret Validation

Validate webhook requests using shared secrets

X-Jira-Webhook-Secret: YOUR_SECRET

Configure webhook secrets in integration settings

GitHub Signature

HMAC signature verification for GitHub webhooks

X-Hub-Signature-256: sha256=...

Automatically generated by GitHub

API Endpoints

POST/api/webhooks/jira

Jira Webhook Handler

Receives webhook events from Jira when tickets are created or updated

Authentication

Bearer Token + Secret Validation

Headers

{
  "Content-Type": "application/json",
  "Authorization": "Bearer YOUR_API_TOKEN",
  "X-Jira-Webhook-Secret": "YOUR_WEBHOOK_SECRET"
}

Request Body

{
  "webhookEvent": "jira:issue_created",
  "issue": {
    "id": "10001",
    "key": "PROJ-123",
    "fields": {
      "summary": "Implement user authentication",
      "description": "Add JWT-based authentication to the API",
      "issuetype": {
        "name": "Story"
      },
      "priority": {
        "name": "High"
      },
      "assignee": {
        "displayName": "John Doe"
      }
    }
  }
}

Response (200 OK)

{
  "success": true,
  "taskId": "task_abc123",
  "message": "Webhook received and processing started",
  "estimatedTime": "5-10 minutes"
}
POST/api/webhooks/github

GitHub Webhook Handler

Receives webhook events from GitHub for pull request updates and code reviews

Authentication

GitHub Secret Validation

Headers

{
  "Content-Type": "application/json",
  "X-Hub-Signature-256": "sha256=...",
  "X-GitHub-Event": "pull_request"
}

Request Body

{
  "action": "opened",
  "pull_request": {
    "id": 1,
    "number": 42,
    "title": "Add authentication feature",
    "state": "open",
    "user": {
      "login": "developer"
    },
    "head": {
      "ref": "feature/auth"
    },
    "base": {
      "ref": "main"
    }
  },
  "repository": {
    "name": "my-project",
    "full_name": "org/my-project"
  }
}

Response (200 OK)

{
  "success": true,
  "message": "Pull request event processed",
  "actions": [
    "ai_review_scheduled",
    "tests_triggered"
  ]
}
GET/api/status/:taskId

Check Task Status

Retrieves the current status of a pipeline task

Authentication

API Key

Headers

{
  "Authorization": "Bearer YOUR_API_KEY"
}

URL Parameters

{
  "taskId": "task_abc123"
}

Response (200 OK)

{
  "taskId": "task_abc123",
  "status": "completed",
  "progress": 100,
  "steps": [
    {
      "name": "analyze_ticket",
      "status": "completed",
      "duration": "30s"
    },
    {
      "name": "generate_code",
      "status": "completed",
      "duration": "120s"
    },
    {
      "name": "create_tests",
      "status": "completed",
      "duration": "45s"
    },
    {
      "name": "create_pr",
      "status": "completed",
      "duration": "15s"
    }
  ],
  "result": {
    "pullRequestUrl": "https://github.com/org/repo/pull/42",
    "branch": "feature/PROJ-123",
    "filesChanged": 5,
    "linesAdded": 234,
    "linesDeleted": 12
  }
}
POST/api/pipeline/trigger

Trigger Pipeline Manually

Manually triggers the AI Pipeline for a specific Jira ticket

Authentication

API Key

Headers

{
  "Content-Type": "application/json",
  "Authorization": "Bearer YOUR_API_KEY"
}

Request Body

{
  "jiraTicketKey": "PROJ-123",
  "repository": "org/my-project",
  "baseBranch": "main",
  "options": {
    "generateTests": true,
    "generateDocs": true,
    "autoMerge": false
  }
}

Response (200 OK)

{
  "success": true,
  "taskId": "task_xyz789",
  "message": "Pipeline triggered successfully",
  "statusUrl": "/api/status/task_xyz789"
}
GET/api/config

Get Configuration

Retrieves current AI Pipeline configuration for your organization

Authentication

API Key

Headers

{
  "Authorization": "Bearer YOUR_API_KEY"
}

Response (200 OK)

{
  "organization": "my-org",
  "jira": {
    "baseUrl": "https://my-org.atlassian.net",
    "connectedProjects": [
      "PROJ",
      "DEV",
      "QA"
    ]
  },
  "github": {
    "organization": "my-org",
    "connectedRepos": 5,
    "defaultBranch": "main"
  },
  "ai": {
    "model": "claude-sonnet-4.5",
    "codeStyle": "conventional",
    "testCoverage": 80
  }
}
PUT/api/config

Update Configuration

Updates AI Pipeline configuration settings

Authentication

API Key (Admin)

Headers

{
  "Content-Type": "application/json",
  "Authorization": "Bearer YOUR_ADMIN_API_KEY"
}

Request Body

{
  "ai": {
    "testCoverage": 90,
    "codeStyle": "airbnb"
  },
  "github": {
    "defaultBranch": "develop"
  }
}

Response (200 OK)

{
  "success": true,
  "message": "Configuration updated successfully",
  "updatedFields": [
    "ai.testCoverage",
    "ai.codeStyle",
    "github.defaultBranch"
  ]
}

Rate Limits

Free Tier

100

requests per hour

Pro Tier

1,000

requests per hour

Enterprise

Custom

unlimited requests

Rate limit headers are included in all responses: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

Common Error Codes

400Bad Request - Invalid request parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Insufficient permissions
404Not Found - Resource does not exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Something went wrong on our end

Error Response Format

{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Missing required field: jiraTicketKey",
    "details": {
      "field": "jiraTicketKey",
      "reason": "Field is required"
    }
  }
}

SDKs & Libraries

Official SDKs coming soon for popular programming languages. For now, you can use any HTTP client.

JavaScript/TypeScript

Coming Soon

Python

Coming Soon

Java

Coming Soon

Need Help?

Have questions about the API? Our team is here to help.