Newdi API Reference

Access Newdi’s intelligent test generation, synchronization, and reporting capabilities via secure RESTful APIs. Perfect for CI/CD integration, custom dev tools, or internal dashboards.

πŸ” Authentication

Authenticate using your API token in the request header:

Authorization: Bearer YOUR_API_TOKEN

πŸ“₯ Upload Code

Submit your Java code for test generation.

POST /api/v1/upload

Headers: Content-Type: multipart/form-data

Body:

  • file: Java source file (.java or .zip)
  • project_id: Unique project identifier

βš™οΈ Generate Tests

POST /api/v1/generate-tests

Payload:

{
  "project_id": "string",
  "strategy": "default | fast | thorough"
}

πŸ“€ Download Tests

GET /api/v1/tests/download?project_id=123

Returns a zip archive of generated test files.

πŸ“Š Test Coverage Report

GET /api/v1/coverage?project_id=123

Get insights like line coverage, edge case handling, and risk hotspots.

🚫 Delete Project

DELETE /api/v1/project/{project_id}

Permanently removes the project and all generated test data.

Need an SDK? JavaScript, Python, and Java SDKs are available on request. Contact support@newdi.ai.