This document provides a comprehensive reference for all Pidima REST API endpoints available to developers in the development environment.
Base URL
https://staging.example.com/api/v1.0
The domain above is a placeholder. Pidima is self-hosted and can be deployed on any domain or IP. Replace staging.example.com with your actual instance host.
Authentication
All API endpoints (except login, health, and OAuth callbacks) require JWT authentication. Include the token in the Authorization header:
Authorization: Bearer <your-jwt-token>
Obtaining a Token
curl -X POST https://staging.example.com/api/v1.0/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "your-email@example.com",
"password": "your-password"
}'
Response:
{
"token": "eyJhbGciOiJIUzI1NiJ9...",
"user": {
"id": "uuid",
"email": "your-email@example.com",
"firstName": "John",
"lastName": "Doe",
"role": "ADMIN"
}
}
The token is valid for 24 hours (86400000 ms).
Authentication & Users
Auth Endpoints
| Method | Endpoint | Description |
|---|
| POST | /auth/login | Login and get JWT token |
| POST | /auth/register | Register new user |
| POST | /auth/forgot-password | Request password reset |
| POST | /auth/reset-password | Reset password with token |
| GET | /auth/verify-email | Verify email address |
User Management
| Method | Endpoint | Description |
|---|
| GET | /users | List all users |
| GET | /users/{id} | Get user by ID |
| PUT | /users/{id} | Update user |
| DELETE | /users/{id} | Delete user |
| GET | /users/paginated | List users (paginated) |
| GET | /users/me | Get current user profile |
| PUT | /users/me/password | Change own password |
| GET | /users/account/{accountId} | List users by account |
Projects
| Method | Endpoint | Description |
|---|
| POST | /projects | Create project |
| GET | /projects/{id} | Get project by ID |
| PUT | /projects/{id} | Update project |
| DELETE | /projects/{id} | Delete project |
| GET | /projects/account/{accountId} | List projects by account |
| GET | /projects/{projectId}/statistics | Get project statistics |
Project Domains
| Method | Endpoint | Description |
|---|
| POST | /projects/{projectId}/domains | Create domain |
| GET | /projects/{projectId}/domains | List domains |
| PUT | /projects/{projectId}/domains/{domainId} | Update domain |
| DELETE | /projects/{projectId}/domains/{domainId} | Delete domain |
Project Documents
| Method | Endpoint | Description |
|---|
| POST | /projects/documents | Upload document (multipart) |
| GET | /projects/{projectId}/documents | List documents |
| GET | /projects/{projectId}/documents/{documentId} | Get document |
| DELETE | /projects/{projectId}/documents/{documentId} | Delete document |
| GET | /projects/{projectId}/documents/{documentId}/download | Download document |
| GET | /projects/{projectId}/documents/{documentId}/versions | List versions |
Requirements
CRUD Operations
| Method | Endpoint | Description |
|---|
| POST | /requirements | Create requirement |
| GET | /requirements/{id} | Get requirement |
| PUT | /requirements/{id} | Update requirement |
| DELETE | /requirements/{id} | Delete requirement |
| GET | /requirements/projects/{projectId} | List all for project |
| GET | /requirements/projects/{projectId}/paginated | List paginated |
| POST | /requirements/batch | Batch create |
| DELETE | /requirements/batch | Batch delete |
AI-Powered Operations
| Method | Endpoint | Description |
|---|
| POST | /requirements/autofill | AI auto-complete fields |
| POST | /requirements/rewrite | AI-enhanced rewriting |
| POST | /requirements/atomize | Break down complex requirements |
| POST | /requirements/translate | Multi-language translation |
| POST | /requirements/generate | Generate requirements from context |
| POST | /requirements/analyze | Analyze requirement quality |
| POST | /requirements/gap-analysis | Perform gap analysis |
Export & Import
| Method | Endpoint | Description |
|---|
| GET | /requirements/download/{projectId} | Export (Excel/PDF) |
| POST | /requirements/import | Import from file |
| POST | /requirements/import/excel | Import from Excel |
Sync Operations (Jira)
| Method | Endpoint | Description |
|---|
| POST | /requirements/{id}/sync | Sync with Jira |
| POST | /requirements/{id}/unsync | Unsync from Jira |
| GET | /requirements/{id}/sync-status | Get sync status |
Test Cases
CRUD Operations
| Method | Endpoint | Description |
|---|
| POST | /testcases | Create testcase |
| GET | /testcases/{id} | Get testcase |
| PUT | /testcases/{id} | Update testcase |
| DELETE | /testcases/{id} | Delete testcase |
| GET | /testcases/projects/{projectId} | List all for project |
| GET | /testcases/projects/{projectId}/paginated | List paginated |
| POST | /testcases/batch | Batch create |
| DELETE | /testcases/batch | Batch delete |
AI Generation
| Method | Endpoint | Description |
|---|
| POST | /testcases/generate | Generate from requirements |
| POST | /testcases/generate/batch | Batch generate |
| POST | /testcases/rewrite | AI-enhanced rewriting |
Export
| Method | Endpoint | Description |
|---|
| GET | /testcases/download/{projectId} | Export (Excel/PDF) |
| POST | /testcases/import/excel | Import from Excel |
Architecture
CRUD Operations
| Method | Endpoint | Description |
|---|
| POST | /architectures | Create architecture component |
| GET | /architectures/{id} | Get architecture |
| PUT | /architectures/{id} | Update architecture |
| DELETE | /architectures/{id} | Delete architecture |
| GET | /architectures/projects/{projectId} | List by project |
| POST | /architectures/batch | Batch create |
AI Generation
| Method | Endpoint | Description |
|---|
| POST | /architectures/generate | AI-generate architecture |
| POST | /architectures/generate/ieee1016 | Generate IEEE 1016 doc |
Import/Export
| Method | Endpoint | Description |
|---|
| POST | /architectures/import | Import architecture |
| GET | /architectures/download/{projectId} | Export architecture |
Traceability & Requirement Links
| Method | Endpoint | Description |
|---|
| POST | /requirement-links | Create link |
| GET | /requirement-links/{id} | Get link |
| DELETE | /requirement-links/{id} | Delete link |
| GET | /requirement-links/projects/{projectId} | List by project |
| GET | /requirement-links/projects/{projectId}/paginated | List paginated |
| GET | /requirement-links/requirements/{requirementId} | Links for requirement |
| POST | /requirement-links/batch | Batch create links |
| GET | /requirement-links/matrix/{projectId} | Traceability matrix |
Traceability Export
| Method | Endpoint | Description |
|---|
| GET | /traceability/download/{projectId} | Export traceability matrix |
AI Chat & Conversations
| Method | Endpoint | Description |
|---|
| POST | /chat | Send chat message (streaming) |
| GET | /chat/conversations/{projectId} | List conversations |
| GET | /chat/conversations/{conversationId}/messages | Get messages |
| DELETE | /chat/conversations/{conversationId} | Delete conversation |
Impact Analysis
| Method | Endpoint | Description |
|---|
| POST | /impact-analysis/trigger | Trigger impact analysis |
| GET | /impact-analysis/reports/project/{projectId} | Reports by project |
| GET | /impact-analysis/reports/{reportId} | Get report |
| GET | /impact-analysis/reports/{reportId}/artifacts | Report artifacts |
| GET | /impact-analysis/impacted-requirement/{requirementId} | Impacts for requirement |
| GET | /impact-analysis/impacted-testcase/{testcaseId} | Impacts for testcase |
| GET | /impact-analysis/impacted-architecture/{architectureId} | Impacts for architecture |
| POST | /impact-analysis/sync-requirement/{requirementId} | Sync from impact |
| POST | /impact-analysis/sync-testcase/{testcaseId} | Sync testcase from impact |
| POST | /impact-analysis/sync-architecture/{architectureId} | Sync architecture from impact |
Compliance Intelligence
| Method | Endpoint | Description |
|---|
| POST | /compliance-intelligence/analyze | Analyze compliance |
| POST | /compliance-intelligence/resolve | Resolve issue |
| POST | /compliance-intelligence/apply | Apply suggestion |
| GET | /compliance-intelligence/results/{requirementId} | Latest results |
Search
| Method | Endpoint | Description |
|---|
| POST | /search | Unified semantic search |
Request Body:
{
"query": "search text",
"projectId": "uuid",
"types": ["REQUIREMENT", "TESTCASE", "ARCHITECTURE"],
"limit": 20
}
Async Jobs
Many operations (AI generation, bulk imports) run asynchronously. Use these endpoints to track progress:
| Method | Endpoint | Description |
|---|
| GET | /async-jobs/{jobId} | Get job status |
| POST | /async-jobs/filter | Filter/list jobs |
| GET | /async-jobs/{jobId}/retry | Retry failed job |
| GET | /async-jobs/{jobId}/cancel | Cancel running job |
Job Status Values: PENDING, RUNNING, COMPLETED, FAILED, CANCELLED
Accounts & Organizations
Accounts
| Method | Endpoint | Description |
|---|
| POST | /accounts | Create account |
| GET | /accounts/{id} | Get account |
| PUT | /accounts/{id} | Update account |
| DELETE | /accounts/{id} | Delete account |
| GET | /accounts/user/{userId} | Accounts for user |
Organizations
| Method | Endpoint | Description |
|---|
| POST | /organizations | Create organization |
| GET | /organizations/{id} | Get organization |
| PUT | /organizations/{id} | Update organization |
| GET | /organizations/account/{accountId} | Get by account |
LLM Credentials
| Method | Endpoint | Description |
|---|
| GET | /organizations/{orgId}/llm-credentials | List credentials |
| POST | /organizations/{orgId}/llm-credentials | Create credential |
| DELETE | /organizations/{orgId}/llm-credentials/{id} | Delete credential |
| PUT | /organizations/{orgId}/llm-credentials/{id}/activate | Activate |
Reports & Exports
Test Reports
| Method | Endpoint | Description |
|---|
| POST | /reports/upload | Upload test report |
| GET | /reports/project/{projectId} | Reports by project |
| GET | /reports/{reportId} | Get report |
| DELETE | /reports/{reportId} | Delete report |
| GET | /reports/download/{reportId} | Download report |
Custom Attributes
| Method | Endpoint | Description |
|---|
| POST | /custom-attributes/projects/{projectId} | Create attribute |
| GET | /custom-attributes/projects/{projectId} | List by project |
| GET | /custom-attributes/{id} | Get by ID |
| PUT | /custom-attributes/{id} | Update |
| DELETE | /custom-attributes/{id} | Delete |
Design Standards
| Method | Endpoint | Description |
|---|
| GET | /design-standards/accounts/{accountId} | List for account |
| GET | /design-standards/{id} | Get by ID |
| POST | /design-standards/accounts/{accountId} | Upload (multipart) |
| DELETE | /design-standards/{id} | Delete |
Health Checks (No Auth Required)
| Method | Endpoint | Description |
|---|
| GET | /health | Server health |
| GET | /health/chat | LLM service health |
| GET | /health/email | Email service health |
| GET | /health/embeddings | Embedding service health |
All paginated endpoints support these query parameters:
| Parameter | Type | Default | Description |
|---|
page | int | 0 | Page number (zero-indexed) |
size | int | 10 | Items per page |
sort | string | varies | Sort field and direction (e.g., name,asc) |
Paginated Response Format:
{
"content": [],
"page": 0,
"size": 10,
"totalElements": 150,
"totalPages": 15,
"first": true,
"last": false,
"empty": false
}
Error Responses
All errors follow this format:
{
"timestamp": "2025-07-20T18:00:00.000Z",
"status": 400,
"error": "Bad Request",
"message": "Validation failed for field 'name'",
"path": "/api/v1.0/requirements"
}
Common HTTP Status Codes
| Code | Meaning |
|---|
| 200 | Success |
| 201 | Created |
| 204 | No Content (successful delete) |
| 400 | Bad Request (validation error) |
| 401 | Unauthorized (missing/invalid token) |
| 403 | Forbidden (insufficient permissions) |
| 404 | Not Found |
| 409 | Conflict (duplicate) |
| 500 | Internal Server Error |
Rate Limiting
The development environment has no rate limiting. Production environments may enforce limits per organization.
File Upload
For endpoints accepting file uploads, use multipart/form-data:
curl -X POST https://staging.example.com/api/v1.0/projects/documents \
-H "Authorization: Bearer <token>" \
-F "file=@/path/to/document.pdf" \
-F "projectId=<project-uuid>" \
-F "name=My Document"
Max file size: 50MB