Version 8.0 API migration guide

This guide will walk you through the necessary steps to update your codebase to ensure compatibility with the latest changes in our API.

Each section outlines the specific changes, provides a brief explanation, and includes a before/after example to make upgrading easier.

Version 8.0 introduces consistent snake_case naming conventions, simplifies sorting syntax, and transitions from deprecated test suite identifiers and endpoints to a new folder-based system. Additionally, some attributes and endpoints have been removed in favor of more streamlined alternatives.

1. Use Folder Endpoints Instead of Test Suite Endpoints

Impact: High

The test suite endpoints for getting and listing have been deprecated in favor of the folder endpoints.

Before:
GET /api/v1/test-suites
GET /api/v1/test-suites/{id}
POST /api/v1/test-suites
PUT /api/v1/test-suites/{id}
DESTROY /api/v1/test-suites/{id}

After:
GET /api/v1/test-case/folders
GET /api/v1/test-case/folders/{id}
POST /api/v1/test-case/folders
PUT /api/v1/test-case/folders/{id}
DESTROY /api/v1/test-case/folders/{id}

Update your API calls accordingly.

2. Transition from test_suite_id to test_case_folder_id

Impact: Medium

The test suite endpoints for getting and listing have been deprecated in favor of the folder endpoints.

Before:
POST /api/v1/test-cases
{
    'name': 'My Test Case',
    'test_suite_id': 1
    'project_id': 2,
}

After:
POST /api/v1/test-cases
{
    'name': 'My Test Case',
    'test_case_folder_id': 1
    'project_id': 2,
}

Search your codebase for any instances of test_suite_id and replace them with test_case_folder_id.

3. Update Filters and Relations to Use snake_case

Impact: Low

All filter and relation attributes now consistently use snake_case naming. Also, some filters have been renamed to match
the naming conventions throughout TestMonitor. Both ensure uniformity across the API.

Before:
GET /api/v1/test-runs?project_id=1&milestone=1&filter[withTestCases]=true
GET /api/v1/test-cases?project_id=1&with[]=customFields

After:
GET /api/v1/test-runs?project_id=1&milestone=1&filter[has_test_cases]=true
GET /api/v1/test-cases?project_id=1&with[]=custom_fields

Make sure to audit all your filter and relation attributes and update them accordingly.

4. Simplify Sorting with String-Based Specification

Impact: Low

Sorting has been streamlined. Replace the object-based sorting specification with a simpler, string-based approach.
Use a minus sign (-) to denote descending order.

Before:
GET /api/v1/requirements?project_id=1&order[name]=asc
GET /api/v1/projects?order[name]=desc

After:
GET /api/v1/requirements?project_id=1&order=name
GET /api/v1/projects?order=-name

Update all sorting configurations in your requests to the new format.

5. Replace test_result_category_id with test_result_status_id

Impact: Medium

The deprecated test_result_category_id attribute has been removed. Use test_result_status_id in its place.

Before:
POST /api/v1/test-results
{
    'test_result_category_id': 3,
    'description': 'My description',
    'test_run_id': 1,
    'test_case_id': 2,
    'project_id': 3,
}

After:
POST /api/v1/test-results
{
    'test_result_status_id': 3,
    'description': 'My description',
    'test_run_id': 1,
    'test_case_id': 2,
    'project_id': 3,
}

Review all instances where test_result_category_id is used and update them to test_result_status_id.

Summary

This upgrade brings consistency and simplicity to the API. Here’s a quick checklist of what to update:

  • Switch from test suite to folder endpoints for getting, listing, creating, updating, deleting, and restoring.
  • Replace test_suite_id with test_case_folder_id.
  • Convert all attributes to snake_case for filters and relations.
  • Update sorting to use string-based specifications.
  • Replace test_result_category_id with test_result_status_id.

By following these steps, your codebase will be fully compatible with the latest API version.

If you encounter any issues, feel free to reach out to our support team.