Requirement Versions

This chapter focuses on services for the requirement versions.

Get requirement version

A GET to /requirement-versions/{id} returns the requirement version with the given id.

Path parameters

Table 1. /api/rest/latest/requirement-versions/{id}
Parameter Description

id

the id of the requirement version

HTTP request

GET /api/rest/latest/requirement-versions/3 HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2014

{
  "_type" : "requirement-version",
  "id" : 3,
  "name" : "sample requirement",
  "reference" : "SAMP_REQ_VER",
  "version_number" : 2,
  "requirement" : {
    "_type" : "requirement",
    "id" : 64,
    "name" : "sample requirement",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/requirements/64"
      }
    }
  },
  "created_by" : "User-1",
  "created_on" : "2017-07-19T10:00:00.000+0000",
  "last_modified_by" : "User-2",
  "last_modified_on" : "2017-07-20T10:00:00.000+0000",
  "criticality" : "CRITICAL",
  "category" : {
    "code" : "CAT_PERFORMANCE"
  },
  "status" : "APPROVED",
  "description" : "<p>Approved performance requirement-version</p>",
  "custom_fields" : [ {
    "code" : "CUF1",
    "label" : "Cuf One",
    "value" : "value_1"
  }, {
    "code" : "CUF2",
    "label" : "Cuf Two",
    "value" : "value_2"
  } ],
  "verifying_test_cases" : [ {
    "_type" : "test-case",
    "id" : 4,
    "name" : "verifying test case 1",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-cases/4"
      }
    }
  }, {
    "_type" : "scripted-test-case",
    "id" : 9,
    "name" : "verifying scripted test case 2",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-cases/9"
      }
    }
  }, {
    "_type" : "keyword-test-case",
    "id" : 14,
    "name" : "verifying keyword test case 3",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-cases/14"
      }
    }
  } ],
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/requirement-versions/3"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/85"
    },
    "requirement" : {
      "href" : "http://localhost:8080/api/rest/latest/requirements/64"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/requirement-versions/3/attachments"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the requirement version

_type

String

the type of the entity

name

String

the name of the requirement version

reference

String

the reference of the requirement version

version_number

Number

the version number

requirement

Object

the requirement of this requirement version

created_by

String

user that created the entity

created_on

String

timestamp of the creation (ISO 8601)

last_modified_by

String

user that modified the entity the most recently

last_modified_on

String

timestamp of last modification (ISO 8601)

criticality

String

the criticality of this requirement version

category

Object

the category of this requirement version

status

String

the status of this requirement version

description

String

the description of this requirement version

verifying_test_cases

Array

the test cases which cover this requirement version

custom_fields

Array

the custom fields of this requirement version

attachments

Array

the attachments of this requirement version

_links

Object

related links

Relation Description

self

link to this requirement version

project

link to the project this requirement version belongs to

requirement

link to the requirement this requirement version belongs to

attachments

link to the attachments this requirement version owns