Skip to main content
POST
/
sandbox
/
jira
/
{sandbox_id}
/
initialize
Initialize jira sandbox with data
curl --request POST \
  --url https://api.klavis.ai/sandbox/jira/{sandbox_id}/initialize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "projects": [
    {
      "key": "SAND",
      "name": "Sandbox Project Alpha",
      "description": "Main sandbox project for testing and development",
      "project_type": "software",
      "issues": [
        {
          "summary": "Set up project infrastructure",
          "description": "Initialize project repository, CI/CD pipeline, and development environment",
          "issue_type": "Task",
          "priority": "High",
          "sprint_name": "Sprint 1 - Foundation",
          "comments": [
            {
              "body": "Repository created and initial structure set up"
            },
            {
              "body": "CI/CD pipeline configured with GitHub Actions"
            }
          ]
        },
        {
          "summary": "Implement user authentication",
          "description": "Create authentication system with JWT tokens",
          "issue_type": "Story",
          "priority": "Highest",
          "sprint_name": "Sprint 1 - Foundation",
          "comments": [
            {
              "body": "Should we use OAuth2 or custom JWT implementation?"
            },
            {
              "body": "Let's go with OAuth2 for better security and flexibility"
            },
            {
              "body": "OAuth2 implementation completed and tested"
            }
          ]
        },
        {
          "summary": "Design database schema",
          "description": "Create entity-relationship diagrams and database migrations",
          "issue_type": "Task",
          "priority": "High",
          "sprint_name": "Sprint 1 - Foundation",
          "comments": [
            {
              "body": "ER diagram draft completed, ready for review"
            }
          ]
        },
        {
          "summary": "Build REST API endpoints",
          "description": "Implement CRUD operations for core entities",
          "issue_type": "Story",
          "priority": "High",
          "sprint_name": "Sprint 2 - Core Features",
          "comments": [
            {
              "body": "API specification documented using OpenAPI 3.0"
            },
            {
              "body": "Endpoints for user management completed"
            }
          ]
        },
        {
          "summary": "Implement data validation",
          "description": "Add input validation and error handling",
          "issue_type": "Task",
          "priority": "Medium",
          "sprint_name": "Sprint 2 - Core Features",
          "comments": []
        },
        {
          "summary": "Create frontend components",
          "description": "Build reusable React components for the UI",
          "issue_type": "Story",
          "priority": "Medium",
          "sprint_name": "Sprint 2 - Core Features",
          "comments": [
            {
              "body": "Using shadcn/ui for component library"
            }
          ]
        },
        {
          "summary": "Write unit tests",
          "description": "Achieve 80% code coverage with unit tests",
          "issue_type": "Task",
          "priority": "High",
          "sprint_name": "Sprint 3 - Testing & Polish",
          "comments": [
            {
              "body": "Using pytest for backend tests"
            },
            {
              "body": "Jest configured for frontend testing"
            }
          ]
        },
        {
          "summary": "Fix login bug on mobile",
          "description": "Users cannot log in on iOS devices",
          "issue_type": "Bug",
          "priority": "Highest",
          "sprint_name": "Sprint 3 - Testing & Polish",
          "comments": [
            {
              "body": "Bug confirmed on iPhone 14 and 15"
            },
            {
              "body": "Issue was related to viewport height calculation"
            },
            {
              "body": "Fix deployed and verified"
            }
          ]
        },
        {
          "summary": "Research new technology stack",
          "description": "Evaluate alternatives for current tech stack",
          "issue_type": "Task",
          "priority": "Low",
          "comments": [
            {
              "body": "Considering FastAPI vs Flask for backend"
            }
          ]
        },
        {
          "summary": "Update documentation",
          "description": "Keep API documentation up to date",
          "issue_type": "Task",
          "priority": "Medium",
          "comments": []
        },
        {
          "summary": "Performance optimization backlog",
          "description": "List of performance improvements to consider",
          "issue_type": "Epic",
          "priority": "Low",
          "comments": [
            {
              "body": "Database query optimization should be prioritized"
            },
            {
              "body": "Consider implementing Redis caching"
            }
          ]
        }
      ]
    },
    {
      "key": "TEST",
      "name": "Testing Project Beta",
      "description": "Secondary project for QA and integration testing",
      "project_type": "software",
      "issues": [
        {
          "summary": "Conduct integration testing",
          "description": "Test integration between frontend and backend",
          "issue_type": "Task",
          "priority": "High",
          "sprint_name": "QA Sprint 1",
          "comments": [
            {
              "body": "All critical paths tested successfully"
            }
          ]
        },
        {
          "summary": "Perform security audit",
          "description": "Run security scans and penetration testing",
          "issue_type": "Task",
          "priority": "Highest",
          "sprint_name": "QA Sprint 1",
          "comments": [
            {
              "body": "Using OWASP ZAP for security testing"
            },
            {
              "body": "Two medium severity issues found"
            }
          ]
        },
        {
          "summary": "Set up test data generators",
          "description": "Create utilities to generate test data",
          "issue_type": "Task",
          "priority": "Medium",
          "comments": [
            {
              "body": "Using Faker library for test data generation"
            }
          ]
        },
        {
          "summary": "Document test scenarios",
          "description": "Create comprehensive test case documentation",
          "issue_type": "Task",
          "priority": "Medium",
          "comments": []
        }
      ]
    },
    {
      "key": "DOCS",
      "name": "Documentation Project",
      "description": "Project for managing documentation and knowledge base",
      "project_type": "business",
      "issues": [
        {
          "summary": "Write getting started guide",
          "description": "Create beginner-friendly onboarding documentation",
          "issue_type": "Task",
          "priority": "High",
          "comments": [
            {
              "body": "Draft completed and ready for review"
            }
          ]
        },
        {
          "summary": "Create API reference documentation",
          "description": "Auto-generate API docs from OpenAPI spec",
          "issue_type": "Task",
          "priority": "High",
          "comments": []
        },
        {
          "summary": "Record tutorial videos",
          "description": "Create video tutorials for common workflows",
          "issue_type": "Task",
          "priority": "Low",
          "comments": [
            {
              "body": "Script written for first video"
            },
            {
              "body": "Need to set up recording equipment"
            }
          ]
        }
      ]
    }
  ],
  "boards": [
    {
      "name": "Alpha Development Board",
      "type": "scrum",
      "project_key": "SAND"
    },
    {
      "name": "Alpha Kanban Board",
      "type": "kanban",
      "project_key": "SAND"
    },
    {
      "name": "Beta Testing Board",
      "type": "scrum",
      "project_key": "TEST"
    }
  ],
  "sprints": [
    {
      "name": "Sprint 1 - Foundation",
      "start_date": "2024-01-01T00:00:00.000Z",
      "end_date": "2024-01-14T23:59:59.999Z",
      "origin_board_name": "Alpha Development Board"
    },
    {
      "name": "Sprint 2 - Core Features",
      "start_date": "2024-01-15T00:00:00.000Z",
      "end_date": "2024-01-28T23:59:59.999Z",
      "origin_board_name": "Alpha Development Board"
    },
    {
      "name": "Sprint 3 - Testing & Polish",
      "start_date": "2024-01-29T00:00:00.000Z",
      "end_date": "2024-02-11T23:59:59.999Z",
      "origin_board_name": "Alpha Development Board"
    },
    {
      "name": "QA Sprint 1",
      "start_date": "2024-02-01T00:00:00.000Z",
      "end_date": "2024-02-14T23:59:59.999Z",
      "origin_board_name": "Beta Testing Board"
    }
  ]
}
EOF
{
  "sandbox_id": "<string>",
  "status": "idle",
  "message": "<string>",
  "records_created": {}
}

Authorizations

Authorization
string
header
required

Your Klavis AI API key.

Path Parameters

sandbox_id
string
required

The unique sandbox identifier

Query Parameters

init_default_data
boolean
default:false

If true, use default test data for initialization

Body

application/json

Complete Jira sandbox data structure.

Relational structure for initialization:

  • Projects contain Issues
  • Boards refer to Projects (via key)
  • Sprints refer to Boards (via name)
  • Issues can refer to Sprints (via name)
projects
JiraProject · object[]

List of projects with their issues

boards
JiraBoard · object[]

List of boards

sprints
JiraSprint · object[]

List of sprints

Response

Successful Response

Response model for sandbox initialization

sandbox_id
string
required

Sandbox identifier

status
enum<string>
required

Current status

Available options:
idle,
occupied,
error
message
string
required

Initialization result message

records_created
Records Created · object

Count of records created per object type