Join Wintertainment 2021 to share your stories, have fun, earn community badges, and more!

POST/projects/{ProjectId}/{EntityCode}/{EntityId}/linkeditems/search

Applies to QAComplete 12.94 SaaS, last modified on December 06, 2021

Returns a filtered list of linked items for a specific entity in the QAComplete project.

Use the operation to get a filtered list of all items linked to a specific item in a QAComplete project. This operation is equivalent to the /projects/{ProjectId}/{EntityCode}/{EntityId}/linkeditems (GET) operation, but this one allows you to send a large filter string.

To get information on a specific linked item by its ID, use the …/{EntityCode}/{EntityId}/linkeditems/{Id} (GET) operation.

Authentication

Basic authentication using a user’s login and password. See Authentication for details.

Security Rights

The authenticating user must belong to a security group that has the Read privilege for the entity (Defects, Tests, and so on) that contains the linked item.

Request Format

To get a filtered list of links, send a POST request to the following URL:

http://{server}/rest-api/service/api/v1/projects/{ProjectId}/{EntityCode}/{EntityId}/linkeditems/search?offset={offset}&limit={limit}
URL parameters

ProjectId  :  integer, required

The ID of the project, to which the item belongs.

EntityCode  :  string, required

The type of an item being linked. Possible values:

  • Releases
  • Bugs (defects)
  • FunctionalSpecs (requirements)
  • Tests
  • TestSets
  • TestSteps

EntityId  :  integer, required

The ID of an item being linked.

offset  :  integer, default: 0

The number of links to skip before counting the returned links. The default value is 0, which is the offset of the first item. For details, see Paging Through Results Using Offset and Limit.

limit  :  integer, default: 25

The maximum number of links to return in the response.

Body parameters

In the request body, pass the RequestLinkedItemPostSearch object that describes the links to search for.


{
"Filter": "string"
}

Filter  :  string

The filter expression to apply to the returned list. See Search Filters.

A sample request:

POST http://yourserver.com/rest-api/service/api/v1/projects/11873/FunctionalSpecs/1512521/linkeditems/search HTTP/1.1
Host: yourserver.com
Connection: keep-alive
Content-Type: application/json
Accept: application/json
Authorization: Basic am9obkBleGFtcGxlLmNvbTpwQHNzd29yZA==
Content-Length: 95


{
"Filter": "(link_id in {1,2}) AND (linked_entity_code != 'Bugs')"
}

A sample request made by using cURL:

curl -u john@example.com:p@ssword -d @requirements.txt -H "Content-Type: application/json" -H "Accept: application/json" http://yourserver.com/rest-api/service/api/v1/projects/11873/FunctionalSpecs/1512521/linkeditems/search

Response Format

If successful, the operation responds with HTTP status code 200 and returns a JSON object with links information.

A sample response:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 582



{
  "metadata": {
"result_set": {
  "count": 1,
  "offset": 0,
  "limit": 25,
  "total": 1
},
"permissions": {
  "acl": 7
}
  },
  "results": [
{
  "link_id": 2,
  "entity_code": "FunctionalSpecs",
  "entity_id": 1512521,
  "linked_entity_code": "Releases",
  "linked_entity_id": 145908,
  "title": "Test",
  "is_active": true,
  "status": "In Progress",
  "date_updated": "2017-04-06T07:33:01.5600000",
  "update_user_id": 135027,
  "updated_user_name": "Smith, John"
}
  ]
}

Error responses

If the operation fails, it returns the appropriate status code and (optionally) the error description in the response body.

If the project with the specified ProjectId does not exist or the authenticating user does not have rights to access the project, the operation returns the Access is denied error.

See Also

Linked Items Resources

Highlight search results