Versions Compared

Key

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

You can use Zephyr Enterprise REST API to search for test cases, requirements, and executions programmatically.

...

Value

Type

Description

word (required)

string

A string to search for. You can specify some text or a ZQL query (in the latter case, you will have to specify zql=true in the request URL). For example:

  • Text: panel any text

  • ZQL query: sample query will go here creator="test.manager" and priority="P1"

entitytype (required)

string

The type of the entity to search for. Possible values:

  • requirement

  • testcase

  • execution

releaseid (required)

long

The ID of the release the entity belongs to. To see the release ID in Zephyr, click Manage Release in the top-right corner and take a look at the value of the ID column in the subsequent window:

Image RemovedImage Added

zql (required)

boolean

Specifies whether ZQL is used. false by default. Set to true if the word parameter contains a ZQL query.

isascorder (optional)

boolean

Switches the ascending order. Specify true to sort the results in the ascending order or false to sort them in the descending order. By default, it is true.

order (optional)

string

The field to sort data by. For example: testcaseId, automated, priority, creatorId, orderId and so on. The default parameter value is orderId.

firstresult (required)

integer

The first element of the retrieved results. The parameter is zero-based, which means you need to specify 0 as the start position to begin with the first element.

maxresults (required)

integer

The number of records to be fetched. The maximum number is 50000.

is_cfield (optional)

boolean

Set to true to check whether sorting is done by a custom field. By default, it is false.

isOld (optional)

boolean

Set to true to get the new test case name if the name has changed. The default value is false.

Это то, как я это понимаю. Разработчики сами не знают толком что это. Вот что мне ответила Divyashree:

for isOld parameter, got input from dev saying that "we are fetching newTestcase id , by passing the given old testcase id".
But even they're not sure like why this parameter is actually used.
The default value is false for this.

Authentication

You can authenticate your requests by using one of the methods described in the Zephyr REST API topic.

...

GET /flex/services/rest/latest/advancesearch?word=sample zql query will go here=creator="test.manager" and priority="P1"&entitytype=testcase&releaseid=1&zql=true&firstresult=0&maxresults=50

...