Create

  • POST
  • /workspaces
  • /:workspace_domain
  • /projects
  • /:project_name
  • /unit-tests
  • /suites
  • /:suite_id
  • /sessions

Add a new test session to a suite

Request

REQUIRED SCOPES
UNIT_TEST_MANAGE
URL PARAMETERS
workspace_domainrequiredstring
The human-readable ID of the workspace

Example: "my-company"

project_namerequiredstring
The human-readable ID of the project

Example: "my-project"

suite_idrequiredstring
The ID of the unit test suite

Example: "MNbyVedg"

POST PARAMETERS
ci_providerstring enum
CI provider that initiated the test session
Allowed enum:
NONE,
BUDDY,
GITHUB_ACTION,
CIRCLE_CI
ci_run_urlstring
URL to the external CI/CD run
revisionstring
Ending revision/commit hash for the test range
ref_typestring enum
Type of Git reference
Allowed enum:
BRANCH,
TAG,
PULL_REQUEST
ref_namestring
Name of the Git reference (branch name, tag name, etc.). May be null if ref_type is not provided.
run_idstring
External CI/CD run identifier (e.g., GitHub Actions run ID)
created_byMemberIdRequest
User/member reference
execution_idstring
Execution hash ID. Set when session is a result of BUDDY action execution
action_execution_idstring
Action execution hash ID. Set when session is a result of BUDDY action execution

Response

RESPONSE BODY
urlread-onlystring
API endpoint to GET this object
html_urlread-onlystring
Web URL to view this object in Buddy.works
idinteger
Unique identifier of the test session
relative_idinteger
Sequential ID within the suite
create_datestring
Timestamp when the session was created
start_datestring
Timestamp when the session started
finish_datestring
Timestamp when the session finished
created_byMemberView
User/member reference
ci_providerstring enum
CI provider that initiated the test session
Allowed enum:
NONE,
BUDDY,
GITHUB_ACTION,
CIRCLE_CI
ci_run_urlstring
URL to the external CI/CD run
revisionstring
Ending revision/commit hash for the test range
ref_typestring enum
Type of Git reference
Allowed enum:
BRANCH,
TAG,
PULL_REQUEST
ref_namestring
Name of the Git reference (branch name, tag name, etc.). May be null if ref_type is not provided.
execution_idstring
Execution hash ID. Set when session is a result of BUDDY action execution
action_execution_idstring
Action execution hash ID. Set when session is a result of BUDDY action execution
statusstring enum
Current status of the session
Allowed enum:
IN_PROGRESS,
SUCCESSFUL,
ERROR,
SKIPPED
error_messagestring
Error message if the session failed. Set when status is ERROR.
durationinteger
Total duration in seconds
tests_countinteger
Total number of tests
failed_countinteger
Number of failed tests
skipped_countinteger
Number of skipped tests
error_countinteger
Number of tests with errors

Last modified on Jan 26, 2026

Request example

curl -X POST "https://api.buddy.works/workspaces/:workspace_domain/projects/:project_name/unit-tests/suites/:suite_id/sessions" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "ci_provider": "GITHUB_ACTION", "revision": "b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1", "ref_type": "BRANCH", "ref_name": "main", "run_id": "12345678", "created_by": { "id": 123 } }'
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 Created