Sprint Requirement Versions

This chapter focuses on services for the sprint requirement versions.

get Get sprint requirement version

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

If the sprint requirement version is native (see its mode), the fields name, reference, description, status, criticality and category are pulled from the related requirement version.

If the sprint requirement version is synchronized, those fields have a value corresponding to the remote element last synchronization.

Get a sprint requirement version

Path parameters
Table 1. /api/rest/latest/sprint-req-versions/{id}
Parameter Description

id

the id of the sprint requirement version

HTTP request
GET /api/rest/latest/sprint-req-versions/456 HTTP/1.1
Accept: application/json
Host: localhost:8080

Get a native sprint requirement version

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

{
  "_type" : "sprint-req-version",
  "id" : 456,
  "name" : "native requirement version",
  "reference" : "native reference",
  "description" : "native description",
  "status" : "UNDER_REVIEW",
  "criticality" : "MINOR",
  "category" : "CAT_USER_STORY",
  "validation_status" : "TO_BE_TESTED",
  "created_by" : "admin",
  "created_on" : "2024-10-01T10:00:00.000+00:00",
  "last_modified_by" : "sample user",
  "last_modified_on" : "2017-05-12T10:00:00.000+00:00",
  "requirement_version" : {
    "_type" : "requirement-version",
    "id" : 789,
    "name" : "native requirement version",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/requirement-versions/789"
      }
    }
  },
  "sprint" : {
    "_type" : "sprint",
    "id" : 123,
    "name" : "native sprint",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/sprints/123"
      }
    }
  },
  "mode" : "NATIVE",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/sprint-req-versions/456"
    },
    "sprint" : {
      "href" : "http://localhost:8080/api/rest/latest/sprints/123"
    }
  }
}

Get a synchronized sprint requirement version

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

{
  "_type" : "sprint-req-version",
  "id" : 456,
  "name" : "synchronized requirement version",
  "reference" : "synchronized reference",
  "description" : "synchronized description",
  "status" : "",
  "criticality" : "",
  "category" : "",
  "validation_status" : "TO_BE_TESTED",
  "created_by" : "admin",
  "created_on" : "2024-10-01T10:00:00.000+00:00",
  "last_modified_by" : "sample user",
  "last_modified_on" : "2017-05-12T10:00:00.000+00:00",
  "requirement_version" : {
    "_type" : "requirement-version",
    "id" : 789,
    "name" : "synchronized requirement version",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/requirement-versions/789"
      }
    }
  },
  "sprint" : {
    "_type" : "sprint",
    "id" : 123,
    "name" : "synchronized sprint",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/sprints/123"
      }
    }
  },
  "mode" : "SYNCHRONIZED",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/sprint-req-versions/456"
    },
    "sprint" : {
      "href" : "http://localhost:8080/api/rest/latest/sprints/123"
    }
  }
}
Response fields
Path Type Description

_type

String

the type of this entity

id

Number

the id of this sprint requirement version

name

String

the name of this sprint requirement version.

reference

String

the reference of this sprint requirement version.

description

String

the description of this sprint requirement version.

status

String

the status of this sprint requirement version.

criticality

String

the criticality of this sprint requirement version.

category

String

the category of this sprint requirement version.

validation_status

String

the validation status of this sprint requirement version

created_by

String

the user who created this sprint requirement version

created_on

String

the date the sprint requirement version was created

last_modified_by

String

the user who last modified the sprint requirement version

last_modified_on

String

the date the sprint requirement version was last modified

requirement_version

Object

the related requirement version (if there is one)

sprint

Object

the sprint which this sprint requirement version belongs to

mode

String

native or synchronized

_links

Object

related links

Relation Description

self

link to this sprint requirement version

sprint

link to the related sprint

get Get test plan of a sprint requirement version

A GET to /sprint-req-versions/{id}/test-plan returns the test plan of the sprint requirement version with the given id.

Path parameters

Table 1. /api/rest/latest/sprint-req-versions/{id}/test-plan
Parameter Description

id

the id of the iteration

HTTP request

GET /api/rest/latest/sprint-req-versions/1/test-plan?size=2&page=1 HTTP/1.1
Accept: application/json
Host: localhost:8080

Query parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

HTTP response

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

{
  "_embedded" : {
    "test-plan" : [ {
      "_type" : "test-plan-item",
      "id" : 4,
      "execution_status" : "READY",
      "referenced_test_case" : {
        "_type" : "test-case",
        "id" : 8,
        "name" : "sample test case 8",
        "reference" : "TC-8",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/test-cases/8"
          }
        }
      },
      "referenced_dataset" : {
        "_type" : "dataset",
        "id" : 90,
        "name" : "sample dataset 90",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/datasets/90"
          }
        }
      },
      "last_executed_by" : "User-1",
      "last_executed_on" : "2017-06-25T10:00:00.000+00:00",
      "assigned_to" : "User-1",
      "executions" : [ {
        "_type" : "execution",
        "id" : 2,
        "execution_status" : "BLOCKED",
        "last_executed_by" : "User-1",
        "last_executed_on" : "2017-06-24T10:00:00.000+00:00",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/executions/2"
          }
        }
      }, {
        "_type" : "execution",
        "id" : 3,
        "execution_status" : "SUCCESS",
        "last_executed_by" : "User-1",
        "last_executed_on" : "2017-06-25T10:00:00.000+00:00",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/executions/3"
          }
        }
      } ],
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-plan-items/4"
        }
      }
    }, {
      "_type" : "test-plan-item",
      "id" : 12,
      "execution_status" : "READY",
      "referenced_test_case" : {
        "_type" : "scripted-test-case",
        "id" : 16,
        "name" : "scripted test case 16",
        "reference" : "TC-16",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/test-cases/16"
          }
        }
      },
      "referenced_dataset" : {
        "_type" : "dataset",
        "id" : 12,
        "name" : "sample dataset 12",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/datasets/12"
          }
        }
      },
      "last_executed_by" : "User-1",
      "last_executed_on" : "2017-06-28T10:00:00.000+00:00",
      "assigned_to" : "User-1",
      "executions" : [ {
        "_type" : "scripted-execution",
        "id" : 9,
        "execution_status" : "FAILURE",
        "last_executed_by" : "User-1",
        "last_executed_on" : "2017-06-26T10:00:00.000+00:00",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/executions/9"
          }
        }
      }, {
        "_type" : "scripted-execution",
        "id" : 35,
        "execution_status" : "SUCCESS",
        "last_executed_by" : "User-1",
        "last_executed_on" : "2017-06-28T10:00:00.000+00:00",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/executions/35"
          }
        }
      } ],
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-plan-items/12"
        }
      }
    }, {
      "_type" : "test-plan-item",
      "id" : 13,
      "execution_status" : "READY",
      "referenced_test_case" : {
        "_type" : "keyword-test-case",
        "id" : 17,
        "name" : "keyword test case 17",
        "reference" : "TC-17",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/test-cases/17"
          }
        }
      },
      "referenced_dataset" : {
        "_type" : "dataset",
        "id" : 13,
        "name" : "sample dataset 13",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/datasets/13"
          }
        }
      },
      "last_executed_by" : "User-1",
      "last_executed_on" : "2017-06-28T10:00:00.000+00:00",
      "assigned_to" : "User-1",
      "executions" : [ {
        "_type" : "keyword-execution",
        "id" : 9,
        "execution_status" : "FAILURE",
        "last_executed_by" : "User-1",
        "last_executed_on" : "2017-06-26T10:00:00.000+00:00",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/executions/9"
          }
        }
      }, {
        "_type" : "keyword-execution",
        "id" : 35,
        "execution_status" : "SUCCESS",
        "last_executed_by" : "User-1",
        "last_executed_on" : "2017-06-28T10:00:00.000+00:00",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/executions/35"
          }
        }
      } ],
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-plan-items/13"
        }
      }
    } ]
  },
  "_links" : {
    "first" : {
      "href" : "http://localhost:8080/api/rest/latest/sprint-req-versions/1/test-plan?page=0&size=2"
    },
    "prev" : {
      "href" : "http://localhost:8080/api/rest/latest/sprint-req-versions/1/test-plan?page=0&size=2"
    },
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/sprint-req-versions/1/test-plan?page=1&size=2"
    },
    "next" : {
      "href" : "http://localhost:8080/api/rest/latest/sprint-req-versions/1/test-plan?page=2&size=2"
    },
    "last" : {
      "href" : "http://localhost:8080/api/rest/latest/sprint-req-versions/1/test-plan?page=2&size=2"
    }
  },
  "page" : {
    "size" : 2,
    "totalElements" : 6,
    "totalPages" : 3,
    "number" : 1
  }
}

Response fields

Path Type Description

_embedded.test-plan

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

patch Modify a sprint requirement version

A PATCH to /sprint-req-versions/{id} modifies the sprint requirement version with the given id.

HTTP request

PATCH /api/rest/latest/sprint-req-versions/456 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 45
Host: localhost:8080

{
  "validation_status" : "TO_BE_CORRECTED"
}

HTTP response

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

{
  "_type" : "sprint-req-version",
  "id" : 456,
  "name" : "native requirement version",
  "reference" : "native reference",
  "description" : "native description",
  "status" : "UNDER_REVIEW",
  "criticality" : "MINOR",
  "category" : "CAT_USER_STORY",
  "validation_status" : "TO_BE_CORRECTED",
  "created_by" : "admin",
  "created_on" : "2024-10-01T10:00:00.000+00:00",
  "last_modified_by" : "sample user",
  "last_modified_on" : "2017-05-12T10:00:00.000+00:00",
  "requirement_version" : {
    "_type" : "requirement-version",
    "id" : 789,
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/requirement-versions/789"
      }
    }
  },
  "sprint" : {
    "_type" : "sprint",
    "id" : 123,
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/sprints/123"
      }
    }
  },
  "mode" : "NATIVE",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/sprint-req-versions/456"
    }
  }
}

delete Delete sprint requirement versions

A DELETE to /sprint-req-versions/{ids} deletes one or several sprint requirement versions with the given id(s).

Path parameters

Table 1. /api/rest/latest/sprint-req-versions/{ids}
Parameter Description

ids

the sprint-req-versions ids to delete

HTTP request

DELETE /api/rest/latest/sprint-req-versions/123,456 HTTP/1.1
Accept: application/json
Host: localhost:8080

get Get issues of a sprint requirement version

A GET to /sprint-req-versions/{id}/issues returns all the issues of the sprint requirement version with the given id.

Path parameters

Table 1. /api/rest/latest/sprint-req-versions/{id}/issues
Parameter Description

id

the id of the sprint requirement version

HTTP request

GET /api/rest/latest/sprint-req-versions/456/issues HTTP/1.1
Accept: application/json
Host: localhost:8080

Query parameters

Parameter Description

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

fields

which fields of the elements should be returned (optional)

HTTP response

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

{
  "_embedded" : {
    "issues" : [ {
      "remoteIssueId" : "981351896",
      "url" : "https://gitlab.com/sample-group/sample-project/issues/15",
      "executions" : [ {
        "_type" : "execution",
        "id" : 2,
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/executions/2"
          }
        }
      }, {
        "_type" : "execution",
        "id" : 8,
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/executions/8"
          }
        }
      } ]
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/sprint-req-versions/456/issues?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

Response fields

Path Type Description

_embedded.issues

Array

the issues of this sprint requirement version

_embedded.issues[].remoteIssueId

String

the remote issue id of the issue linked to the entity.

_embedded.issues[].url

String

the URL of the issue linked to the entity.

_embedded.issues[].executions

Array

the executions linked to the entity.

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)