This chapter focuses on requirement link type mappings.

A GET to /projects/{projectId}/requirement-link-type-mappings/{id} returns the requirement link type mapping for the requirement link type with the given id.

Table 1. /api/rest/latest/projects/{projectId}/requirement-link-type-mappings/{id}
Parameter Description

projectId

the id of the project

id

the id of the requirement link type

GET /api/rest/latest/projects/31/requirement-link-type-mappings/4 HTTP/1.1
Accept: application/json
Host: localhost:8080
HTTP/1.1 200 OK
Content-Length: 273
Content-Type: application/json;charset=UTF-8

{
  "_type" : "requirement-link-type-mapping",
  "id" : 4,
  "squash_field" : "Blocked by",
  "jira_field" : "Issue is blocked by",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/31/requirement-link-type-mappings/4"
    }
  }
}
Path Type Description

_type

String

the type of the entity

id

Number

id of the requirement link type

squash_field

String

the name of the requirement link type in squash

jira_field

String

the name of the requirement link type in jira

_links

Object

related links

Relation Description

self

link to this requirement link type mapping

A GET to /projects/{id}/requirement-link-type-mappings returns all the requirement link type mappings for the given project.

GET /api/rest/latest/projects/7/requirement-link-type-mappings HTTP/1.1
Accept: application/json
Host: localhost:8080
HTTP/1.1 200 OK
Content-Length: 1225
Content-Type: application/json;charset=UTF-8

{
  "_embedded" : {
    "requirement-link-type-mappings" : [ {
      "_type" : "requirement-link-type-mapping",
      "id" : 1,
      "squash_field" : "Related",
      "jira_field" : "Issue related to",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/7/requirement-link-type-mappings/1"
        }
      }
    }, {
      "_type" : "requirement-link-type-mapping",
      "id" : 2,
      "squash_field" : "Parent",
      "jira_field" : "Issue parent of",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/7/requirement-link-type-mappings/2"
        }
      }
    }, {
      "_type" : "requirement-link-type-mapping",
      "id" : 3,
      "squash_field" : "Blocked",
      "jira_field" : "Issue blocked by",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/7/requirement-link-type-mappings/3"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/7/requirement-link-type-mappings"
    }
  },
  "page" : {
    "size" : 3,
    "totalElements" : 3,
    "totalPages" : 1,
    "number" : 0
  }
}
Path Type Description

_embedded.requirement-link-type-mappings

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 client 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)

A PATCH to /projects/{projectId}/requirement-link-type-mappings/{id} modifies the requirement link type mapping for the requirement link type with the given id.

Table 1. /api/rest/latest/projects/{projectId}/requirement-link-type-mappings/{id}
Parameter Description

projectId

the id of the project

id

the id of the requirement link type in squash

PATCH /api/rest/latest/projects/5/requirement-link-type-mappings/2 HTTP/1.1
Accept: application/json
Content-Length: 83
Content-Type: application/json
Host: localhost:8080

{
  "_type" : "requirement-link-type-mapping",
  "jira_field" : "Issue parent of"
}
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 267

{
  "_type" : "requirement-link-type-mapping",
  "id" : 2,
  "squash_field" : "Parent of",
  "jira_field" : "Issue parent of",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/5/requirement-link-type-mappings/2"
    }
  }
}
Path Type Description

_type

String

the type of the entity

id

Number

the id of the requirement link type in squash

squash_field

String

the name of the requirement link type in squash

jira_field

String

the name of the requirement link type in jira

_links

Object

related links

Relation Description

self

link to this requirement link type mapping