TestCaseLab API

About

On this page, you can find detailed documentation about our API. Using the API you can set up the testing flow like a smooth and enhanced process. Initially, TestCaseLab was designed for the manual QAs, but now, using the API you can simply integrate your automated tests with TestCaseLab. It allows you to:

  • Get all test cases from your project;
  • Create and update test cases;
  • Create test plans;
  • Create and execute test runs;
  • Update results of test cases in test runs;

This means that you can easily integrate your autotests with TestCaseLab and see the results in one place (for example, if your team contains both manual and autotesters);

The document below will help you to set up an integration. There you can find all available API calls and methods.

Mail us in case you’re not sure about how to do that: support@testcaselab.com

Authentication & Token

Returns token

HTTP Request
POST https://testcaselab.com/api/v2/auth_user

Specs Database uses API username and password to allow access to the API.

You must use username and password with your personal API credentials.

PATH PARAMS
email* example@example.com
password* xxxxxxxx

The above command returns JSON structured like this:

{
  "auth_token": "string",
  "exp": "string"
}
{
  "errors": [
    "string"
  ]
}

Get Companies

Returns all companies

HTTP Request
GET https://testcaselab.com/api/v2/companies
PATH PARAMS
Authorization: Bearer* API Token

The above command returns JSON structured like this:

[
  {
    "id": "integer",
    "name": "string",
    "subdomain": "string"
  }
]
{
  "errors": [
    "string"
  ]
}

Get Users

Returns all users from company

HTTP Request
GET https://testcaselab.com/api/v2/users
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID

The above command returns JSON structured like this:

[
  {
    "name": "string",
    "email": "string",
    "role": "string",
    "status": "string",
    "created_at_in_company": "0000-00-00T00:00:00.0000",
    "updated_at_in_company": "0000-00-00T00:00:00.0000",
    "created_by": "string",
    "updated_by": "string",
    "last_sign_in_at": "0000-00-00T00:00:00.0000"
  }
]
{
  "message": "string"
}

Roles:

  • Company admin
  • Company employee

Get Projects

Returns all projects

HTTP Request
GET https://testcaselab.com/api/v2/projects
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID

The above command returns JSON structured like this:

[
  {
    "id": "integer",
    "company_id": "integer",
    "name": "string",
    "key": "string",
    "status": "string"
  }
]
[
  "message": [
    "string"
  ]
}

Create Project

Return new project from the system

HTTP Request
POST https://testcaselab.com/api/v2/projects
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
name* Project name
key* Project key

The above command returns JSON structured like this:

{
  "id": "integer",
  "company_id": "integer",
  "name": "string",
  "key": "string",
  "status": "string"
}
{
  "errors": [
    "string"
  ]
}

Get Project

Returns project from the company

HTTP Request
POST https://testcaselab.com/api/v2/projects/{id}
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID

The above command returns JSON structured like this:

{
  "id": "integer",
  "company_id": "integer",
  "name": "string",
  "key": "string",
  "status": "string"
}
{
  "errors": [
    "string"
  ]
}

Update Project

Returns updated project from the company

HTTP Request
PUT https://testcaselab.com/api/v2/projects/{id}
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
name Project name
key Project key

The above command returns JSON structured like this:

{
  "id": "integer",
  "company_id": "integer",
  "name": "string",
  "key": "string",
  "status": "string"
}
{
  "errors": [
    "string"
  ]
}

Archive Project

Returns archived project from the system

HTTP Request
PUT https://testcaselab.com/api/v2/projects/{id}/archive
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID

The above command returns JSON structured like this:

{
  "id": "integer",
  "company_id": "integer",
  "name": "string",
  "key": "string",
  "status": "string"
}
{
  "errors": [
    "string"
  ]
}

Un archive Project

Return unarchived project from the system

HTTP Request
PUT https://testcaselab.com/api/v2/projects/{id}/un_archive
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID

The above command returns JSON structured like this:

{
  "id": "integer",
  "company_id": "integer",
  "name": "string",
  "key": "string",
  "status": "string"
}
{
  "errors": [
    "string"
  ]
}

Delete Project

Return deleted project from the company

HTTP Request
DELETE https://testcaselab.com/api/v2/projects/{id}
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID

The above command returns JSON structured like this:

{
  "id": "integer",
  "company_id": "integer",
  "name": "string",
  "key": "string",
  "status": "string"
}
{
  "errors": [
    "string"
  ]
}

Get Test Cases

Returns all test cases

HTTP Request
GET https://testcaselab.com/api/v2/test_cases
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID

The above command returns JSON structured like this:

{
  "test_cases_company": [
    {
      "tag_list": [
        "string"
      ],
      "key": "string",
      "priority": "string",
      "test_plans": [
        {
          "id": "integer",
          "tree_position": "integer",
          "project_id": "integer",
          "created_at": "0000-00-00T00:00:00.0000",
          "updated_at": "0000-00-00T00:00:00.0000"
        }
      ],
      "test_plan_ids": [
        "integer"
      ],
      "test_run_ids": [
        "integer"
      ],
      "id": "string",
      "title": "string",
      "category_id": "integer",
      "execution": "string"
    }
  ]
}
{
  "errors": [
    "string"
  ]
}

Create Test Case

Returns new test case

HTTP Request
POST https://testcaselab.com/api/v2/test_cases
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID
title* Title
category_id Category ID
priority*
test_type*
execution*
steps Test case steps
expected_result Expected result
description Description

The above command returns JSON structured like this:

{
  "tag_list": [
    "string"
  ],
  "key": "string",
  "test_plans": [
    {
      "id": "integer",
      "tree_position": "integer",
      "project_id": "integer",
      "created_at": "0000-00-00T00:00:00.0000",
      "updated_at": "0000-00-00T00:00:00.0000"
    }
  ],
  "case_created_by": "string",
  "case_updated_by": "string",
  "id": "string",
  "title": "string",
  "category_id": "integer",
  "test_type": "string",
  "priority": "string",
  "execution": "string",
  "description": "string",
  "steps": "string",
  "expected_result": "string",
  "created_at": "0000-00-00T00:00:00.0000",
  "updated_at": "0000-00-00T00:00:00.0000",
  "project_id": "integer"
}
{
  "errors": [
    "string"
  ]
}

Get Execution

Returns execution list

HTTP Request
GET https://testcaselab.com/api/v2/test_cases/execution
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID

The above command returns JSON structured like this:

[
  "string"
]
{
  "errors": [
    "string"
  ]
}

Get Priorities

Return priorities list

HTTP Request
GET https://testcaselab.com/api/v2/test_cases/priorities
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID

The above command returns JSON structured like this:

[
  "string"
]
{
  "errors": [
    "string"
  ]
}

Get Test Types

Returns test types list

HTTP Request
GET https://testcaselab.com/api/v2/test_cases/test_types
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID

The above command returns JSON structured like this:

[
  "string"
]
{
  "errors": [
    "string"
  ]
}

Update Test Case

Returns updated test case

HTTP Request
POST https://testcaselab.com/api/v2/test_cases/{id}
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID
title Title
category_id Category ID
priority
test_type
execution
steps Test case steps
expected_result Expected result
description Description

The above command returns JSON structured like this:

{
  "tag_list": [
    "string"
  ],
  "key": "string",
  "priority": "string",
  "test_plans": [
    {
      "id": "integer",
      "tree_position": "integer",
      "project_id": "integer",
      "created_at": "0000-00-00T00:00:00.0000",
      "updated_at": "0000-00-00T00:00:00.0000",
    }
  ],
  "case_created_by": "string",
  "case_updated_by": "string",
  "id": "string",
  "title": "string",
  "category_id": "integer",
  "test_type": "string",
  "execution": "string",
  "description": "string",
  "steps": "string",
  "expected_result": "string",
  "created_at": "0000-00-00T00:00:00.0000",
  "updated_at": "0000-00-00T00:00:00.0000",
  "project_id": "integer"
}
{
  "errors": [
    "string"
  ]
}

Delete Test Case

Return deleted test case

HTTP Request
DELETE https://testcaselab.com/api/v2/test_cases/{id}
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID

The above command returns JSON structured like this:

{
  "tag_list": [
    "string"
  ],
  "key": "string",
  "priority": "string",
  "test_plans": [
    {
      "id": "integer",
      "tree_position": "integer",
      "project_id": "integer",
      "created_at": "0000-00-00T00:00:00.0000",
      "updated_at": "0000-00-00T00:00:00.0000"
    }
  ],
  "case_created_by": "string",
  "case_updated_by": "string",
  "id": "string",
  "title": "string",
  "category_id": "integer",
  "test_type": "string",
  "execution": "string",
  "description": "string",
  "steps": "string",
  "expected_result": "string",
  "created_at": "0000-00-00T00:00:00.0000",
  "updated_at": "0000-00-00T00:00:00.0000",
  "project_id": "integer"
}
{
  "errors": [
    "string"
  ]
}

Get Categories

Returns all categories

HTTP Request
GET https://testcaselab.com/api/v2/categories
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID

The above command returns JSON structured like this:

{
  "id": "integer",
  "name": "string",
  "tree_position": "integer",
  "level": "integer",
  "parent_id": "integer",
  "test_cases_count": "integer"
}
{
  "errors": [
    "string"
  ]
}

Create Category

Returns new category

HTTP Request
POST https://testcaselab.com/api/v2/categories
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID
name* Name

The above command returns JSON structured like this:

{
  "id": "integer",
  "name": "string",
  "project_id": "integer"
}
{
  "errors": [
    "string"
  ]
}

Get Category

Returns category

HTTP Request
GET https://testcaselab.com/api/v2/categories/{id}
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID

The above command returns JSON structured like this:

{
  "test_cases_count": "integer",
  "id": "integer",
  "name": "string",
  "project_id": "integer"
}
{
  "errors": [
    "string"
  ]
}

Delete category

Returns deleted Category from the system

HTTP Request
DELETE https://testcaselab.com/api/v2/categories/{id}
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID

The above command returns JSON structured like this:

{
  "id": "integer",
  "name": "string",
  "project_id": "integer"
}
{
  "errors": [
    "string"
  ]
}

Get Test Plans

Returns all test plans

HTTP Request
GET https://testcaselab.com/api/v2/test_plans
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID

The above command returns JSON structured like this:

[
  {
    "test_cases_count": "integer",
    "test_cases_ids": [
      "integer"
    ],
    "id": "integer",
    "name": "string",
    "created_at": "0000-00-00T00:00:00.0000",
    "updated_at": "0000-00-00T00:00:00.0000"
  }
]
{
  "errors": [
    "string"
  ]
}

Create Test Plan

Returns new test plan

HTTP Request
POST https://testcaselab.com/api/v2/test_plans
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID
name Name

The above command returns JSON structured like this:

{
  "id": "integer",
  "name": "string",
  "project_id": "integer",
  "created_at": "0000-00-00T00:00:00.0000",
  "updated_at": "0000-00-00T00:00:00.0000"
}
{
  "errors": [
    "string"
  ]
}

Get Test Plan

Returns test plan

HTTP Request
GET https://testcaselab.com/api/v2/test_plans/{id}
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID

The above command returns JSON structured like this:

{
  "test_cases_count": "integer",
  "test_cases_ids": [
    "integer"
  ],
  "id": "integer",
  "name": "string",
  "created_at": "0000-00-00T00:00:00.0000",
  "updated_at": "0000-00-00T00:00:00.0000"
}
{
  "errors": [
    "string"
  ]
}

Update Test Plan

Return updated test plan

HTTP Request
PUT https://testcaselab.com/api/v2/test_plans/{id}
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID
name Name

The above command returns JSON structured like this:

{
  "id": "integer",
  "name": "string",
  "created_at": "0000-00-00T00:00:00.0000",
  "updated_at": "0000-00-00T00:00:00.0000"
}
{
  "errors": [
    "string"
  ]
}

Delete Test Plan

Returns deleted test plan

HTTP Request
DELETE https://testcaselab.com/api/v2/test_plans/{id}
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID

The above command returns JSON structured like this:

{
  "id": "integer",
  "name": "string",
  "created_at": "0000-00-00T00:00:00.0000",
  "updated_at": "0000-00-00T00:00:00.0000"
}
{
  "errors": [
    "string"
  ]
}

Get Test Runs

Returns all test runs

HTTP Request
GET https://testcaselab.com/api/v2/test_runs
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID

The above command returns JSON structured like this:

{
  "test_plan_name": "string",
  "test_results": {},
  "test_case_runs_count": "integer",
  "run_created_by": "string",
  "test_case_ids": [
    "integer"
  ],
  "id": "integer",
  "name": "string",
  "test_plan_id": "integer",
  "project_id": "integer",
  "created_at": "0000-00-00T00:00:00.0000"
}
{
  "errors": [
    "string"
  ]
}

Create Test Run

Returns new test run

HTTP Request
POST https://testcaselab.com/api/v2/test_runs
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID
name* Name

The above command returns JSON structured like this:

{
  "test_plan_name": "string",
  "test_results": {},
  "test_case_runs_count": "integer",
  "run_created_by": "string",
  "test_case_ids": [],
  "id": "integer",
  "name": "string",
  "test_plan_id": "integer",
  "project_id": "integer",
  "created_at": "0000-00-00T00:00:00.0000"
}
{
  "errors": [
    "string"
  ]
}

Get Test Run

Returns test run

HTTP Request
GET https://testcaselab.com/api/v2/test_runs/{id}
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID

The above command returns JSON structured like this:

{
  "test_plan_name": "string",
  "test_results": {},
  "test_case_runs_count": "integer",
  "run_created_by": "string",
  "test_case_ids": [
    "integer"
  ],
  "id": "integer",
  "name": "string",
  "test_plan_id": "integer",
  "project_id": "integer",
  "created_by": "integer"
  "created_at": "0000-00-00T00:00:00.0000"
  "updated_at": "0000-00-00T00:00:00.0000"
}
{
  "errors": [
    "string"
  ]
}

Update test run

Returns updated test run

HTTP Request
PUT https://testcaselab.com/api/v2/test_runs/{id}
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID
name Name

The above command returns JSON structured like this:

{
  "id": "integer",
  "name": "string",
  "test_plan_id": "integer",
  "project_id": "integer",
  "created_at": "0000-00-00T00:00:00.0000"
}
{
  "errors": [
    "string"
  ]
}

Add test cases to test run

Returns test cases

HTTP Request
POST https://testcaselab.com/api/v2/test_runs/{id}/add_test_case
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID
test_case_ids[]* Test Case IDS

The above command returns JSON structured like this:

[
  "integer"
]
{
  "errors": [
    "string"
  ]
}

Remove test cases from test run

Returns test cases

HTTP Request
PUT https://testcaselab.com/api/v2/test_runs/{id}/remove_test_case
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID
test_case_ids[]* Test Case IDS

The above command returns JSON structured like this:

[
  "integer"
]
{
  "errors": [
    "string"
  ]
}

Delete Test Run

Returns deleted test run

HTTP Request
DELETE https://testcaselab.com/api/v2/test_run/{id}
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID

The above command returns JSON structured like this:

{
  "id": "integer",
  "name": "string",
  "test_plan_id": "integer",
  "project_id": "integer",
  "created_at": "0000-00-00T00:00:00.0000"
}
{
  "errors": [
    "string"
  ]
}

Get Test Results

Returns all test results from test run

HTTP Request
GET https://testcaselab.com/api/v2/test_results
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID
test_run_id* Test Run ID

The above command returns JSON structured like this:

[{
  "id": "integer",
  "status": "string",
  "comment": "string",
  "link_to_issue": "string",
  "test_case_id": "integer",
  "test_run_id": "integer",
  "project_id": "integer",
  "created_at": "0000-00-00T00:00:00.0000"
}]
{
  "errors": [
    "string"
  ]
}

Get Statuses

Returns all statuses

HTTP Request
GET https://testcaselab.com/api/v2/test_results/statuses
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID

The above command returns JSON structured like this:

["string"]
{
  "errors": [
    "string"
  ]
}

Get Test Result

Returns test result

HTTP Request
GET https://testcaselab.com/api/v2/test_results/{id}
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID

The above command returns JSON structured like this:

{
  "id": "integer",
  "status": "string",
  "comment": "string",
  "link_to_issue": "string",
  "test_case_id": "integer",
  "test_run_id": "integer",
  "project_id": "integer",
  "created_at": "0000-00-00T00:00:00.0000"
}
{
  "errors": [
    "string"
  ]
}

Update Test Result

Returns test result

HTTP Request
PUT https://testcaselab.com/api/v2/test_results/{id}
PATH PARAMS
Authorization: Bearer* API Token
company_id* Company ID
project_id* Project ID
status
comment Comment
link_to_issue Link to issue

The above command returns JSON structured like this:

{
  "id": "integer",
  "status": "string",
  "comment": "string",
  "link_to_issue": "string",
  "test_case_id": "integer",
  "test_run_id": "integer",
  "project_id": "integer",
  "created_at": "0000-00-00T00:00:00.0000"
}
{
  "errors": [
    "string"
  ]
}