Get test object via search

A successful request to this endpoint retrieves the resources of a specific object by multiple conditions. This method supports pagination and sorting.

Request

All requests using the search endpoint uses the POST method, which is used to look for a specific Katalon test object and information. The method supports pagination like specifying page_size or page_num in your request.

For basic authorization, replace this with your actual username and password (or API key) in the header request in the username:password or username:api_key format. Your user creds are combined to form a Base64 encoded string.

Here is a sample request body:

{
    "type": "TestCase", // TestSuite; TestResult; TestSuiteCollection; RunConfiguration
    "conditions": [
        // Get test object by created date
        {
            "key": "createdAt",
            "operator": ">=",
            "value": "2023-01-01T00:00:00.000Z"
        },
        // Get test object by updated date
        {
            "key": "updatedAt",
            "operator": ">=",
            "value": "2023-01-01T00:00:00.000Z"
        },
        // Get test object by ID
        {
            "key": "id",
            "operator": "=",
            "value": "60538"
        },
        // Get test object by name
        {
            "key": "name",
            "operator": "=",
            "value": "xxx"
        },
        // Get test object by project ID (required)
        {
            "key": "Project.id",
            "operator": "=",
            "value": "5580"
        }
    ],
    "pagination": {
        "page": 0,
        "size": 300,
        // Short list of test object by a field
        "sorts": [
            "id, asc"
        ]
    }
}

When making a POST request to the search endpoint, you may provide the parameters and values in the body to further refine the response:

  1. type: This parameter specifies the type of the object you are searching for. You should replace TestCase with the actual type of object you want to search for, such as TestSuite, TestResult, TestSuiteCollection, or RunConfiguration.
  2. conditions: This is an array of conditions that define the search criteria. Each condition has three parts:
    1. key: This is the attribute by which you want to filter the search results. For example, createdAt for created date or id for object ID.
    2. operator: This specifies the comparison operator. For example, = for exact equality or >= for greater than or equal to.
    3. value: This is the value you want to compare with. For instance, a specific date like 2023-01-01T00:00:00.000Z or an object ID like 60538. Replace these with the actual values you want to use for filtering.
  3. pagination: This section is used for controlling the pagination of search results.
    1. page: Specify the page number you want to retrieve. In this case, it's set to 0 for the first page.
    2. size: Determine the number of items per page. It's set to 300 in the request body example.
    3. sorts: You can specify sorting criteria. In this example, it's sorted by the "id" field in ascending order (asc). You can adjust the sorting criteria based on your needs.

Response

The response will be a list of test-related objects that match the search criteria, for example:

{
    "content": [
        {
            "id": 60538,
            "name": "New test case (1)",
            "path": "test-cases/test",
            "alias": "new-test-case-1",
            "webUrl": "https://testops.qa.katalon.com/team/267/project/5580/test-design/test-cases/60538-new-test-case-1",
            "description": "",
            "project": {
                "id": 5580,
                "name": "Katalon Project",
                "teamId": 267,
                "status": "ACTIVE",
                "canAutoIntegrate": false,
                "sampleProject": false
            },
            "externalIssues": [],
            "type": "TEST_CASE",
            "testResultAssertion": {},
            "updatedAt": "2023-04-25T14:08:01.082+0000",
            "createdAt": "2023-04-25T14:08:01.082+0000",
            "testProject": {
                "id": 5076,
                "name": "shopping-cart-tests.git",
                "description": "",
                "projectId": 5580,
                "teamId": 267,
                "createdAt": "2023-04-25T14:07:58.909+0000",
                "type": "GIT",
                "dirty": false,
                "autonomous": false
            },
            "testType": "G5_TEST_CASE",
            "urlId": "60538-new-test-case-1"
        }
    ],
    "pageable": {
        "sort": {
            "sorted": false,
            "unsorted": true,
            "empty": true
        },
        "pageNumber": 0,
        "pageSize": 300,
        "offset": 0,
        "unpaged": false,
        "paged": true
    },
    "totalElements": 1,
    "totalPages": 1,
    "last": true,
    "first": true,
    "sort": {
        "sorted": false,
        "unsorted": true,
        "empty": true
    },
    "numberOfElements": 1,
    "size": 300,
    "number": 0,
    "empty": false
}

Some of the test-related objects you can retrieve include:

PropertyTypeDescriptionArray
projectobjectIncludes information related to a requested Katalon project.
testProjectobjectIncludes information related to a requested Git project repository.
gitRepositoryobjectIncludes information about the requested Git repository project.
releaseBasicReleaseResource objectIncludes information related to a requested release.
buildBasicBuildResource objectIncludes information related to a requested build.builds
userBasicUserResource objectIncludes information related to a requested organization user.
agentobjectIncludes information about the local agent used in a specified execution.agents
testCloudAgentobjectThe TestCloud agent used in a specified execution.testCloudAgents
k8sAgentobjectThe Kubernetes (K8s) agent used in a specified execution.k8sAgents
circleCIAgentobjectThe CircleCI agent used in a specified execution.circleCIAgents
testCloudTestSuiteCollectionAgentobjectThe agent used for overriding individual test environments of test suites in a test suite collection.testCloudTestSuiteCollectionAgents
executionobjectIncludes information related to the execution of a specified test, including its status, start time, end time, and various counts related to tests.
jobBasicJobResource objectIncludes information related to a specified execution job.jobs
platformobjectIncludes information about the platform on which the test was executed, including the operating system, browser, device, and application name.
latestJobJob objectIncludes information related to the latest execution, including its status, start time, end time, and various counts related to tests.
lastExecutionTestCaseobjectIncludes details of the latest execution of a requested test case, including execution status, total tests executed, duration, execution ID, and start and end times.
testCaseobjectIncludes information about the requested test case, including its name, path, description, and more.
nextRunSchedulerscheduler objectIncludes information about the specified next test run or execution.
schedulerscheduler objectIncludes information that represents the execution configuration.
testSuiteCollectionGetTestSuiteCollection
object
Includes information about the requested test suite collection.testSuiteCollections
runConfigurationrunConfiguration objectIncludes information that describes how the specified execution should be triggered.
externalReleaseobjectIncludes information about the linked Jira release
externalIssuesobjectsexternalIssues
testResultAssertiontestResultAssertion
object
Includes information about the agent used for overriding individual test environments of test suites in a specified test suite collection.testResultAssertions
releaseStatisticsobjectIncludes statistics of a specified release: passed test cases, failed test cases, defects, etc.
buildStatisticscontentThis object contains statistics of the build: number of executions, passed test cases, failed test cases.

Try it!

  1. Enter the values in the required fields below.
  2. Select the language in Language.
  3. Enter your user name or API credentials.
  4. Review your API call and click Try it!
Language
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!