Versions Compared

Key

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

Resource: Search ( /api/search )

Search resource, used for retrieving the results of a TQL query.

...

This resource supports the following methods: GET, POST

Methods

GET

...

Retrieves all (or a subset) of entities that are visible to the user. The search resource supports both standard and aggregate TQL query expressions. For long queries you can use the POST method instead.

This method supports the TQL query parameters tql, $top, $take and $inlinecount. See TQL Topic for more details.

Required Permissions

  • TestManagement/View

Status Codes

These are the expected status codes returned by the service - in addition, some other status codes may be returned if either an internal error occurs or there is an authentication issue (such as an expired OAuth token).

...

Example - Execute an aggregated expression (returning results formatted for an ExtJS style tree)

Return the results of an aggregated expression returning results formatted for an ExtJS style tree - this will convert entity results into edit links within ET.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
tqlGROUP BY Status { Count } as "Statuses" WHERE EntityType = RequirementReturn results of an aggregated expression.
fomatextjstreeOutput results suitable for rendering by a Sencha ExtJS tree component.

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Response Body

Code Block
languagenone
{
  "Results": {
    "text": "Results",
    "expanded": true,
    "iconCls": "summary-results-root",
    "children": [
      {
        "text": "Statuses",
        "expanded": true,
        "iconCls": "summary-results-dictionary",
        "children": [
          {
            "text": "Approved",
            "expanded": true,
            "iconCls": "summary-results-dictionary",
            "children": [
              {
                "text": "Count: 48",
                "iconCls": "summary-results-value-number",
                "leaf": true
              }
            ]
          },
          {
            "text": "Review Pending",
            "expanded": true,
            "iconCls": "summary-results-dictionary",
            "children": [
              {
                "text": "Count: 4",
                "iconCls": "summary-results-value-number",
                "leaf": true
              }
            ]
          },
          {
            "text": "In Progress",
            "expanded": true,
            "iconCls": "summary-results-dictionary",
            "children": [
              {
                "text": "Count: 10",
                "iconCls": "summary-results-value-number",
                "leaf": true
              }
            ]
          },
          {
            "text": "N/A",
            "expanded": true,
            "iconCls": "summary-results-dictionary",
            "children": [
              {
                "text": "Count: 49",
                "iconCls": "summary-results-value-number",
                "leaf": true
              }
            ]
          },
          {
            "text": "No Run",
            "expanded": true,
            "iconCls": "summary-results-dictionary",
            "children": [
              {
                "text": "Count: 34",
                "iconCls": "summary-results-value-number",
                "leaf": true
              }
            ]
          },
          {
            "text": "Not Covered",
            "expanded": true,
            "iconCls": "summary-results-dictionary",
            "children": [
              {
                "text": "Count: 3",
                "iconCls": "summary-results-value-number",
                "leaf": true
              }
            ]
          },
          {
            "text": "Passed",
            "expanded": true,
            "iconCls": "summary-results-dictionary",
            "children": [
              {
                "text": "Count: 15",
                "iconCls": "summary-results-value-number",
                "leaf": true
              }
            ]
          },
          {
            "text": "Requires Rework",
            "expanded": true,
            "iconCls": "summary-results-dictionary",
            "children": [
              {
                "text": "Count: 1",
                "iconCls": "summary-results-value-number",
                "leaf": true
              }
            ]
          }
        ]
      }
    ]
  }
}

Status Code

200 - OK

POST

...

Retrieves all (or a subset) of entities that are visible to the user. The search resource supports both standard and aggregate TQL query expressions. The parameters must be passed in using the x-www-form-urlencoded content type.

This method supports the TQL query parameters tql, $top, $take and $inlinecount. See TQL Topic for more details.

Required Permissions

  • TestManagement/View

Status Codes

These are the expected status codes returned by the service - in addition, some other status codes may be returned if either an internal error occurs or there is an authentication issue (such as an expired OAuth token).

...