Import
- POST
- /unit-tests
- /import
Import test session from JUnit XML file(s) using suite token authentication
Request example
curl -X POST "https://api.buddy.works/unit-tests/import" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"files": [
"TEST-com.example.UserServiceTest.xml",
"TEST-com.example.OrderServiceTest.xml"
],
"ci_provider": "GITHUB_ACTION",
"ci_run_url": "https://github.com/example-org/example-repo/actions/runs/1234567890",
"revision": "b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1",
"ref_type": "BRANCH",
"ref_name": "main"
}'EXAMPLE RESPONSE
{
"url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/unit-tests/suites/MNbyVedg/sessions/r4nBYXVq",
"html_url": "https://app.buddy.works/my-workspace/my-project/unit-tests/MNbyVedg/r4nBYXVq",
"id": "r4nBYXVq",
"relative_id": 1,
"create_date": "2025-10-21T06:42:08Z",
"start_date": "2025-10-21T06:42:08Z",
"created_by": {
"url": "https://api.buddy.works/workspaces/my-workspace/members/1",
"html_url": "https://app.buddy.works/my-workspace/-/profile/1",
"id": 1,
"name": "John Doe",
"avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png?ts=1760014081477",
"email": "john.doe@company.com",
"admin": true,
"workspace_owner": true
},
"ci_provider": "BUDDY",
"revision": "755b691cfff32e08aba35f2c9b1451ed76cfd583",
"ref_type": "BRANCH",
"ref_name": "master",
"execution_id": "68f72b3d66907cbc77887986",
"action_execution_id": "68f72b3d66907cbc77887988",
"status": "SUCCESSFUL",
"duration": 1,
"tests_count": 109,
"failed_count": 0,
"skipped_count": 0,
"error_count": 0
}STATUS
201 Test session created successfully