Skip to main content

Jira Integration API

Pidima provides deep bi-directional integration with Jira for syncing requirements and test cases.

Configuration

Create Jira Configuration

curl -X POST https://staging.example.com/api/v1.0/jira/configurations \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"accountId": "<account-uuid>",
"jiraUrl": "https://your-org.atlassian.net",
"projectKey": "PROJ"
}'

List Configurations

curl https://staging.example.com/api/v1.0/jira/configurations/account/{accountId} \
-H "Authorization: Bearer $TOKEN"

Check Authorization Status

curl https://staging.example.com/api/v1.0/jira/configurations/{configId}/auth-status \
-H "Authorization: Bearer $TOKEN"

OAuth Authorization

Pidima uses OAuth 2.0 for Jira Cloud authorization.

Get Authorization URL

# For a specific project
curl https://staging.example.com/api/v1.0/jira/projects/{projectId}/authorize \
-H "Authorization: Bearer $TOKEN"

# For an account
curl https://staging.example.com/api/v1.0/jira/accounts/{accountId}/authorize \
-H "Authorization: Bearer $TOKEN"

Returns a URL to redirect users to for Jira OAuth consent.

Revoke Authorization

curl -X DELETE https://staging.example.com/api/v1.0/jira/oauth/revoke/{configId} \
-H "Authorization: Bearer $TOKEN"

Import from Jira

Preview JQL Import (Requirements)

curl -X POST https://staging.example.com/api/v1.0/jira/jql/preview \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"projectId": "<pidima-project-uuid>",
"jql": "project = PROJ AND type = Story AND status = Done",
"maxResults": 50
}'

Preview JQL Import (Test Cases)

curl -X POST https://staging.example.com/api/v1.0/jira/jql/preview/testcases \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"projectId": "<pidima-project-uuid>",
"jql": "project = PROJ AND type = \"Test Case\"",
"maxResults": 50
}'

Validate JQL

curl -X POST https://staging.example.com/api/v1.0/jira/jql/validate \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"projectId": "<pidima-project-uuid>",
"jql": "project = PROJ AND updated > -7d"
}'

Execute Bulk Import

# Import requirements
curl -X POST https://staging.example.com/api/v1.0/jira/import/jql \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"projectId": "<pidima-project-uuid>",
"jql": "project = PROJ AND type = Story",
"maxResults": 100
}'

# Import test cases
curl -X POST https://staging.example.com/api/v1.0/jira/import/testcases/jql \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"projectId": "<pidima-project-uuid>",
"jql": "project = PROJ AND type = \"Test Case\"",
"maxResults": 100
}'

Export to Jira

Export Requirements

curl -X POST https://staging.example.com/api/v1.0/jira/export/requirements \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"projectId": "<pidima-project-uuid>",
"requirementIds": ["uuid-1", "uuid-2"],
"jiraProjectKey": "PROJ",
"issueType": "Story"
}'

Export Test Cases

curl -X POST https://staging.example.com/api/v1.0/jira/export/testcases \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"projectId": "<pidima-project-uuid>",
"testcaseIds": ["uuid-1", "uuid-2"],
"jiraProjectKey": "PROJ",
"issueType": "Task"
}'

Create Jira Issues

curl -X POST https://staging.example.com/api/v1.0/jira/issues/create \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"projectId": "<pidima-project-uuid>",
"summary": "Implement SSO authentication",
"description": "As per REQ-001...",
"issueType": "Story",
"priority": "High"
}'

Get Issue Types & Priorities

# Available issue types
curl https://staging.example.com/api/v1.0/jira/issues/types/{projectId} \
-H "Authorization: Bearer $TOKEN"

# Available priorities
curl https://staging.example.com/api/v1.0/jira/issues/priorities/{projectId} \
-H "Authorization: Bearer $TOKEN"

Field Mappings

Configure how Pidima fields map to Jira fields. Available at both organization and project level.

Organization-Level Mappings

# List mappings
curl https://staging.example.com/api/v1.0/organizations/{orgId}/jira-field-mappings \
-H "Authorization: Bearer $TOKEN"

# Create mapping
curl -X POST https://staging.example.com/api/v1.0/organizations/{orgId}/jira-field-mappings \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"pidimaField": "title",
"jiraField": "summary",
"direction": "BIDIRECTIONAL"
}'

Project-Level Mappings

# List mappings
curl https://staging.example.com/api/v1.0/projects/{projectId}/jira-field-mappings \
-H "Authorization: Bearer $TOKEN"

# Create mapping
curl -X POST https://staging.example.com/api/v1.0/projects/{projectId}/jira-field-mappings \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"pidimaField": "priority",
"jiraField": "priority",
"direction": "PIDIMA_TO_JIRA"
}'

Default Jira Project

# Get default project
curl https://staging.example.com/api/v1.0/jira/default-project \
-H "Authorization: Bearer $TOKEN"

# Set default project
curl -X PUT https://staging.example.com/api/v1.0/jira/default-project \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"projectId": "<pidima-project-uuid>",
"jiraProjectKey": "PROJ"
}'

Webhooks

Pidima can receive Jira webhooks for real-time sync:

POST /api/v1.0/jira/webhook

Configure this URL in your Jira webhook settings to receive issue updates.