Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This topic describes the API operation you can use to perform advanced search in Zephyr Enterprise. To get started with You can use Zephyr Enterprise REST API, see Zephyr Enterprise REST API Documentation.

Use the following operation to search for items in Zephyr Enterprise by using a filter:

GET /flex/services/rest/latest/advancesearch?word=&entitytype=&releaseid=&zql=&isascorder=&order=&firstresult=&maxresults=&is_cfield=&isOld=

Request format

To search for items, send a GET request to the following URL:

search for test cases, requirements, and executions (??????) programmatically.

Request URL

Code Block
languagetext
GET http(s)://{ZEPHYR-SERVER}/flex/services/rest/latest/advancesearch?
      word=<text>
      &entitytype=<entitytype>
      &releaseid=<id>
      &zql=false
      &isascorder=true
      &order=<fieldname>
      &firstresult=0
      &maxresults=100
      &is_cfield=false
      &isOld=false

Parameters

ValueValue type

Required?

Type

Description

word

string

A string to search for.

entitytype

string

The type of the entity to search for.

releaseid

long

The ID of the release the entity belongs to.

zql

Booleanboolean

Specifies whether ZQL is used.

isascorder

Booleanboolean

Switches the ascending order.

order

string

The column order. For example, the parameter value can be orderId: .../flex/services/rest/v3/advancesearch/?word=test&firstresult=0&maxresults=50&order=orderId&releaseid=1

firstresult

intinteger

The starting point of the record.

maxresults

intinteger

The number of records to be fetched.

is_cfield

Booleanboolean

Custom field order.

isOld

Booleanboolean

Specifies whether the test case is old.

Sample request

Code Block
{
  "entityType": "testcase",
  "isZql": true,
  "releaseId": 1
}

Sample response

Code Block
languagejson
[
   {
      "firstResult":0,
      "resultSize":1,
      "results":[
         {
            "id":147,     ----------------------------------- The RTS ID (the execution ID)
            "assignmentDate":"2020-09-15",
            "actualTime":600,
            "versionId":"1",
            "comment":"rrrere",
            "testerId":5,
            "executedBy":5,
            "tcrTreeTestcase":{
               "id":308,  ----------------------------------- The TCR Catalog Tree TestCase ID (tctid)
               "tcrCatalogTreeId":30,
               "revision":9,
               "stateFlag":0,
               "lastModifiedOn":1600168120466,
               "versionNumber":1,
               "createDatetime":1600168114777,
               "createdById":5,
               "modifiedById":5,
               "testcase":{
                  "customProperties":{
                  },
                  "customProcessedProperties":{
                  },
                  "id":165, ----------------------------------- The test case version ID
                  "name":"edited 159 testcase edit",
                  "description":"",
                  "lastModifiedOn":1600169396082,
                  "creationDate":1600128000000,
                  "createDatetime":1600168102437,
                  "tcCreationDate":"09/15/2020",
                  "comments":"",
                  "isComplex":false,
                  "estimatedTime":600,
                  "writerId":0,
                  "creatorId":5,
                  "lastUpdaterId":5,
                  "oldId":0,
                  "automated":false,
                  "customFieldProcessed":false,
                  "customFieldValues":[
                     
                  ],
                  "testcaseSequence":{
                     "seqNumber":159
                  },
                  "testcaseId":159, ----------------------------------- The test case ID
                  "versionNumber":1,
                  "projectId":3,
                  "testcaseType":"ORIGINAL",
                  "requirementIds":[
                     
                  ],
                  "projectName":"P1",
                  "requirementIdsNew":[
                     
                  ],
                  "creatorName":"divya divya",
                  "lastModifierName":"divya divya",
                  "automatedDefault":false,
                  "testcaseShared":false
               },
               "projectId":3,
               "releaseId":5,
               "isDerivedFromBDD":false,
               "orderId":453,
               "maxVersionNumber":1,
               "projectIdParam":3,
               "original":false
            },
            "cyclePhaseId":7,
            "lastTestResult":{
               "id":58,
               "executionDate":1600169404251,
               "execDate":"09/15/2020",
               "executionStatus":"4",
               "testerId":5,
               "releaseTestScheduleId":147,
               "createDatetime":1600169404253,
               "modifiedDatetime":1600169404250,
               "createdById":5,
               "modifiedById":5
            },
            "defects":[
               
            ],
            "attachmentCount":0,
            "lastModifiedBy":5,
            "createdById":5,
            "lastModifiedOn":1600169404255,
            "createDatetime":1600168120467
         }
      ],
      "type":"testSchedule"
   }
]

Response codes

HTTP Status Code

Description

200

The request completed successfully.

400

Bad request. At least one releaseid or departmentid parameter is required.

401

The authentication token is missing.

403

The user has no permissions to perform this operation.

500

Unknown internal error.

...