The Xsquash4Jira Configuration Rest API is built on top of the Squash TM Administration Rest API. It provides you with additional services that allows a remote user to perform configuration tasks for Xsquash4Jira plugin on the platform.

Synchronisations

This chapter focuses on synchronisations.

Get all synchronisations by project

A GET to /projects/{id}/synchronisations returns all the synchronisations that the client is allowed to read.

HTTP request

GET /api/rest/latest/projects/14/synchronisations?page=1&size=2 HTTP/1.1
Accept: application/json
Host: localhost:8080

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

Example response

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

{
  "_embedded" : {
    "synchronisations" : [ {
      "_type" : "synchronisation",
      "id" : 1,
      "name" : "tata",
      "server_name" : "BugtrackerDemo",
      "server_id" : 3,
      "select_type" : "BOARD",
      "select_value" : "Tableau XS",
      "additional_JQL" : "",
      "synchronisation_path" : "/Test Project-1/demo2",
      "restrain_to_active_sprint" : false,
      "last_sync_date" : "2020/03/27 10:20",
      "last_successful_sync_date" : "2020/03/27 10:20",
      "last_status" : "Passed",
      "status" : "Passed",
      "activated" : false,
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/synchronisations/1"
        }
      }
    }, {
      "_type" : "synchronisation",
      "id" : 2,
      "name" : "toto",
      "server_name" : "BugtrackerDemo2",
      "server_id" : 3,
      "select_type" : "BOARD",
      "select_value" : "Tableau XS",
      "additional_JQL" : "",
      "synchronisation_path" : "/Test Project-1/demo2",
      "restrain_to_active_sprint" : false,
      "last_sync_date" : "2020/03/27 10:20",
      "last_successful_sync_date" : "2020/03/27 10:20",
      "last_status" : "Passed",
      "status" : "Passed",
      "activated" : false,
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/synchronisations/2"
        }
      }
    } ]
  },
  "_links" : {
    "first" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/synchronisations?page=0&size=2"
    },
    "prev" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/synchronisations?page=0&size=2"
    },
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/synchronisations?page=1&size=2"
    },
    "last" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/synchronisations?page=1&size=2"
    }
  },
  "page" : {
    "size" : 2,
    "totalElements" : 4,
    "totalPages" : 2,
    "number" : 1
  }
}

Response fields

Path Type Description

_embedded.synchronisations

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)

Get synchronisation

A GET to /synchronisations/{id} returns the synchronisation with the given id.

Path parameters

Table 1. /api/rest/latest/synchronisations/{id}
Parameter Description

id

the id of the synchronisation

HTTP request

GET /api/rest/latest/synchronisations/3 HTTP/1.1
Accept: application/json
Host: localhost:8080

Example response

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

{
  "_type" : "synchronisation",
  "id" : 3,
  "name" : "tata",
  "server_name" : "BugtrackerDemo3",
  "server_id" : 123,
  "select_type" : "BOARD",
  "select_value" : "Tableau XS",
  "additional_JQL" : "",
  "synchronisation_path" : "/Test Project-1/demo2",
  "restrain_to_active_sprint" : false,
  "last_sync_date" : "2020/03/27 10:20",
  "last_successful_sync_date" : "2020/03/27 10:20",
  "last_status" : "Passed",
  "status" : "Passed",
  "activated" : false,
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/synchronisations/3"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the entity

_type

String

the type of the entity

server_name

String

name of the bug-tracker use for the current synchronisation

server_id

Number

id of the bug-tracker use for the current synchronisation

name

String

name of the synchronisation

select_type

String

select type

select_value

String

select value

additional_JQL

String

JQL script

synchronisation_path

String

directory where the requirement synchronize is save in Squash TM

restrain_to_active_sprint

Boolean

restrain to active sprint

last_sync_date

String

last synchronisation date

last_successful_sync_date

String

last successful synchronisation date

last_status

String

last status

status

String

status

activated

Boolean

enable/desable synchronisation

_links

Object

related links

Relation Description

self

link to this synchronisation

Create synchronisation

A POST to /projects/{id}/synchronisations creates a new synchronisation.

HTTP request

POST /api/rest/latest/projects/14/synchronisations HTTP/1.1
Accept: application/json
Content-Length: 183
Content-Type: application/json
Host: localhost:8080

{
  "name" : "demoSynchro",
  "synchronisation_path" : "/Test Project-1/demo2",
  "select_type" : "BOARD",
  "select_value" : "Tableau XS",
  "server_id" : 14,
  "activated" : false
}

Request fields

Path Type Description

name

String

name of the synchronisation (mandatory)

synchronisation_path

String

directory where the synchronized requirements are saved in Squash TM (mandatory)

select_type

String

select type (mandatory)

select_value

String

select value (mandatory)

server_id

Number

id of the bug tracker use for the current synchronisation (mandatory)

activated

Boolean

whether the synchronisation is activated

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

Example response

HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 586

{
  "_type" : "synchronisation",
  "id" : 4,
  "name" : "demoSynchro",
  "server_name" : "BugtrackerDemo3",
  "server_id" : 14,
  "select_type" : "BOARD",
  "select_value" : "Tableau XS",
  "additional_JQL" : "",
  "synchronisation_path" : "/Test Project-1/demo2",
  "restrain_to_active_sprint" : false,
  "last_sync_date" : "2020/03/27 10:20",
  "last_successful_sync_date" : "2020/03/27 10:20",
  "last_status" : "Passed",
  "status" : "Passed",
  "activated" : false,
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/synchronisations/4"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the entity

_type

String

the type of the entity

server_name

String

name of the bug tracker used for the current synchronisation

server_id

Number

id of the bug tracker used for the current synchronisation

name

String

name of the synchronisation

select_type

String

select type

select_value

String

select value

additional_JQL

String

JQL script

synchronisation_path

String

directory where the synchronized requirements are saved in Squash TM

restrain_to_active_sprint

Boolean

restrain to active sprint

last_sync_date

String

last synchronisation date

last_successful_sync_date

String

last successful synchronisation date

last_status

String

last status

status

String

status

activated

Boolean

enable/disable synchronisation

_links

Object

related links

Relation Description

self

link to this synchronisation

Modify synchronisation

A PATCH to /synchronisations/{id} modifies synchronisation with the given id. Only name, select value and additional JQL which can be modified

HTTP request

PATCH /api/rest/latest/synchronisations/4 HTTP/1.1
Accept: application/json
Content-Length: 92
Content-Type: application/json
Host: localhost:8080

{
  "name" : "UpdateDemoSynchro",
  "select_value" : "tab Update",
  "additional_JQL" : ""
}

Path parameters

Table 1. /api/rest/latest/synchronisations/{id}
Parameter Description

id

the id of the synchronisation

Example response

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

{
  "_type" : "synchronisation",
  "id" : 4,
  "name" : "UpdateDemoSynchro",
  "server_name" : "BugtrackerDemo3",
  "server_id" : 14,
  "select_type" : "BOARD",
  "select_value" : "tab Update",
  "additional_JQL" : "",
  "synchronisation_path" : "/Test Project-1/demo2",
  "restrain_to_active_sprint" : false,
  "last_sync_date" : "2020/03/27 10:20",
  "last_successful_sync_date" : "2020/03/27 10:20",
  "last_status" : "Passed",
  "status" : "Passed",
  "activated" : false,
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/synchronisations/4"
    }
  }
}

Activate/deactivate synchronisation

A PATCH to /synchronisations/{id} modifies the name of the synchronisation with the given id.

HTTP request

PATCH /api/rest/latest/synchronisations/4/activate?enabled=true HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080

Path parameters

Table 1. /api/rest/latest/synchronisations/{id}/activate
Parameter Description

id

the id of the synchronisation

Example response

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

{
  "_type" : "synchronisation",
  "id" : 4,
  "name" : "DemoSynchro",
  "server_name" : "BugtrackerDemo3",
  "server_id" : 14,
  "select_type" : "BOARD",
  "select_value" : "Tableau",
  "additional_JQL" : "",
  "synchronisation_path" : "/Test Project-1/demo2",
  "restrain_to_active_sprint" : false,
  "last_sync_date" : "2020/05/25 10:20",
  "last_successful_sync_date" : "2020/05/25 10:20",
  "last_status" : "Passed",
  "status" : "Passed",
  "activated" : true,
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/synchronisations/4"
    }
  }
}

Launch Synchronisation

A GET to /synchronisations/{id}/synchronize launch synchronisation project

HTTP request

GET /api/rest/latest/synchronisations/4/synchronize HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080

Path parameters

Table 1. /api/rest/latest/synchronisations/{id}/synchronize
Parameter Description

id

the id of the synchronisation

Example response

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

{
  "_type" : "synchronisation",
  "id" : 4,
  "name" : "demoSynchro",
  "server_name" : "BugtrackerDemo3",
  "server_id" : 14,
  "select_type" : "BOARD",
  "select_value" : "Tableau XS",
  "additional_JQL" : "",
  "synchronisation_path" : "/Test Project-1/demo2",
  "restrain_to_active_sprint" : false,
  "last_sync_date" : "2020/03/27 10:20",
  "last_successful_sync_date" : "2020/03/27 10:20",
  "last_status" : "Passed",
  "status" : "Passed",
  "activated" : false,
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/synchronisations/4"
    }
  }
}

Delete synchronisation

A DELETE to /synchronisations/{id} deletes the synchronisation with the given id.

HTTP request

DELETE /api/rest/latest/synchronisations/12 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080

Path parameters

Table 1. /api/rest/latest/synchronisations/{id}
Parameter Description

id

the id of the synchronisation

Example response

HTTP/1.1 204 No Content

Reporting fields

This chapter focuses on reporting fields. There are 7 reporting fields which can be bound to Jira fields, they are identified by their name in SquashTm: testingStatus, redactionProgress, verificationProgress, validationProgress, redactionRatio, verificationRatio, validationRatio.

Get reporting field

A GET to /projects/{id}/reporting-fields/{squashField} returns the reporting field with the given squash field.

Path parameters

Table 1. /api/rest/latest/projects/{id}/reporting-fields/{squashField}
Parameter Description

id

the id of the project

squashField

the name of the reporting field in squash

HTTP request

GET /api/rest/latest/projects/17/reporting-fields/validationProgress HTTP/1.1
Accept: application/json
Host: localhost:8080

Example response

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

{
  "_type" : "reporting-field",
  "squash_field" : "validationProgress",
  "jira_field" : "Validation Progress",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/17/reporting-fields/validationProgress"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

squash_field

String

the name of the reporting field in squash

jira_field

String

the name of the reporting field in jira

_links

Object

related links

Relation Description

self

link to this reporting field

Get all reporting fields

A GET to /projects/{id}/reporting-fields returns all the reporting fields of the given project.

HTTP request

GET /api/rest/latest/projects/13/reporting-fields HTTP/1.1
Accept: application/json
Host: localhost:8080

Example response

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

{
  "_embedded" : {
    "reporting-fields" : [ {
      "_type" : "reporting-field",
      "squash_field" : "testingStatus",
      "jira_field" : "Testing Status",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/13/reporting-fields/testingStatus"
        }
      }
    }, {
      "_type" : "reporting-field",
      "squash_field" : "redactionProgress",
      "jira_field" : "Redaction Progress",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/13/reporting-fields/redactionProgress"
        }
      }
    }, {
      "_type" : "reporting-field",
      "squash_field" : "verificationProgress",
      "jira_field" : "Verification Progress",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/13/reporting-fields/verificationProgress"
        }
      }
    }, {
      "_type" : "reporting-field",
      "squash_field" : "validationProgress",
      "jira_field" : "Validation Progress",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/13/reporting-fields/validationProgress"
        }
      }
    }, {
      "_type" : "reporting-field",
      "squash_field" : "redactionRatio",
      "jira_field" : "Redaction Ratio",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/13/reporting-fields/redactionRatio"
        }
      }
    }, {
      "_type" : "reporting-field",
      "squash_field" : "verificationRatio",
      "jira_field" : "Verification Ratio",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/13/reporting-fields/verificationRatio"
        }
      }
    }, {
      "_type" : "reporting-field",
      "squash_field" : "validationRatio",
      "jira_field" : "Validation Ratio",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/13/reporting-fields/validationRatio"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/13/reporting-fields"
    }
  },
  "page" : {
    "size" : 7,
    "totalElements" : 7,
    "totalPages" : 1,
    "number" : 0
  }
}

Response fields

Path Type Description

_embedded.reporting-fields

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)

Modify reporting field

A PATCH to /projects/{id}/reporting-fields/{squashField} modifies the reporting field with the given squash field.

HTTP request

PATCH /api/rest/latest/projects/12/reporting-fields/redactionRatio HTTP/1.1
Accept: application/json
Content-Type: application/json
Content-Length: 68
Host: localhost:8080

{
  "_type" : "reporting-field",
  "jira_field" : "RedactionRatio"
}

Path parameters

Table 1. /api/rest/latest/projects/{id}/reporting-fields/{squashField}
Parameter Description

id

the id of the project

squashField

the name of the reporting field in squash

Example response

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

{
  "_type" : "reporting-field",
  "squash_field" : "redactionRatio",
  "jira_field" : "Redaction Ratio",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/12/reporting-fields/redactionRatio"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

squash_field

String

the name of the reporting field in squash

jira_field

String

the name of the reporting field in jira

_links

Object

related links

Relation Description

self

link to this reporting field

Field mappings

This chapter focuses on field mappings.

Get all field mappings

A GET to /projects/{id}/field-mappings returns all the field mappings of a project.

HTTP request

GET /api/rest/latest/projects/14/field-mappings HTTP/1.1
Accept: application/json
Host: localhost:8080

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

Example response

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

{
  "_embedded" : {
    "field-mappings" : [ {
      "_type" : "field-mapping",
      "locked" : false,
      "squash_field" : "CREATED_BY",
      "jira_field" : "createdBy",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/14/field-mappings/CREATED_BY"
        }
      }
    }, {
      "_type" : "field-mapping",
      "locked" : false,
      "squash_field" : "CREATED_ON",
      "jira_field" : "createdOn",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/14/field-mappings/CREATED_ON"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/field-mappings"
    }
  },
  "page" : {
    "size" : 2,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}

Response fields

Path Type Description

_embedded.field-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)

Get field mapping

A GET to /projects/{projectId}/field-mappings/{id} returns the field mapping with the given id.

Path parameters

Table 1. /api/rest/latest/projects/{id}/field-mappings/{fieldId}
Parameter Description

id

the id of the project

fieldId

the id of the field mapping

HTTP request

GET /api/rest/latest/projects/14/field-mappings/CREATED_BY HTTP/1.1
Accept: application/json
Host: localhost:8080

Example response

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

{
  "_type" : "field-mapping",
  "locked" : false,
  "squash_field" : "CREATED_BY",
  "jira_field" : "create",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/field-mappings/CREATED_BY"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

squash_field

String

squash Field

jira_field

String

jira Field

locked

Boolean

locked

_links

Object

related links

Relation Description

self

link to this field-mapping

Create field mappings

A POST to /projects/{id}/field-mappings creates a new field mapping.

HTTP request

POST /api/rest/latest/projects/14/field-mappings HTTP/1.1
Accept: application/json
Content-Type: application/json
Content-Length: 91
Host: localhost:8080

{
  "_type" : "field-mapping",
  "squash_field" : "CREATED_BY",
  "jira_field" : "create"
}

Path parameters

Table 1. /api/rest/latest/projects/{id}/field-mappings
Parameter Description

id

the id of the project

Example response

HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 245

{
  "_type" : "field-mapping",
  "locked" : false,
  "squash_field" : "CREATED_BY",
  "jira_field" : "create",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/field-mappings/CREATED_BY"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

squash_field

String

field of the mapping on squash side

jira_field

String

field of the mapping on jira side

locked

Boolean

whether the field is locked

_links

Object

related links

Relation Description

self

link to this entity

Modify field mapping

A PATCH to /projects/{projectId}/field-mappings/{id} modifies the field mapping with the given id.

HTTP request

PATCH /api/rest/latest/projects/14/field-mappings/CREATED_BY HTTP/1.1
Accept: application/json
Content-Length: 95
Content-Type: application/json
Host: localhost:8080

{
  "_type" : "field-mapping",
  "squash_field" : "Created by",
  "jira_field" : "created by"
}

Path parameters

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

projectId

the id of the project

id

the id of the field mapping, the id of a field mapping is its squash field name

Example response

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

{
  "_type" : "field-mapping",
  "locked" : false,
  "squash_field" : "Created by",
  "jira_field" : "created by",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/14/field-mappings/Created%252520by"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

squash_field

String

field of the mapping on squash side

jira_field

String

field of the mapping on jira side

locked

Boolean

whether the field is locked

_links

Object

related links

Relation Description

self

link to this field-mapping

Delete field mappings

A DELETE to /info-lists/{id} deletes the field mapping with the given id.

HTTP request

DELETE /api/rest/latest/projects/14/field-mappings/CREATED_BY HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080

Path parameters

Table 1. /api/rest/latest/projects/{id}/field-mappings/{ids}
Parameter Description

id

the id of the project

ids

a list of id of field mapping

Example response

HTTP/1.1 204 No Content

Value Mapping

This chapter focuses on the value mapping .

Get value mapping

A GET to /projects/{id}/value-mappings-script returns the value mapping of the given project.

HTTP request

GET /api/rest/latest/projects/14/value-mappings-script HTTP/1.1
Accept: application/json
Host: localhost:8080

Example response

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

{
  "_type" : "value-mapping",
  "script" : "valeurjira4:valeursquash4"
}

Response fields

Path Type Description

_type

String

the type of the entity

script

String

the mapping script.The mapping is suitable for the YAML syntax. It currently works for the criticality, category and status fields

Edit value mapping

A POST to /projects/{id}/value-mappings-script set or edit the value mapping for the given project.

HTTP request

POST /api/rest/latest/projects/14/value-mappings-script HTTP/1.1
Accept: application/json
Content-Length: 73
Content-Type: application/json
Host: localhost:8080

{
  "_type" : "value-mapping",
  "script" : "valeurjira1:valeursquash1"
}

Path parameters

Table 1. /api/rest/latest/projects/{id}/value-mappings-script
Parameter Description

id

the id of the project

Example response

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

{
  "_type" : "value-mapping",
  "script" : "valeurjira1:valeursquash1"
}

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