The Xsquash4Jira REST API is built on top of the SquashTM 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
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2620
{
"_embedded" : {
"synchronisations" : [ {
"_type" : "synchronisation",
"id" : 1,
"server_name" : "BugtrackerDemo",
"server_id" : 3,
"name" : "tata",
"activated" : false,
"synchronisation_path" : "/Test Project-1/demo2",
"select_type" : "BOARD",
"select_value" : "Tableau XS",
"additional_JQL" : "",
"restricted_to_active_sprint" : false,
"sprint_synchronisation_activated" : false,
"last_sync_date" : "2020/03/27 10:20",
"last_successful_sync_date" : "2020/03/27 10:20",
"last_sync_on" : "2020-03-27T09:20:00.000+00:00",
"last_successful_sync_on" : "2020-03-27T09:20:00.000+00:00",
"last_status" : "SUCCESS",
"status" : "SUCCESS",
"project_id" : 14,
"project_name" : "Test Project-1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/synchronisations/1"
}
}
}, {
"_type" : "synchronisation",
"id" : 2,
"server_name" : "BugtrackerDemo2",
"server_id" : 3,
"name" : "toto",
"activated" : false,
"synchronisation_path" : "/Test Project-1/demo2",
"select_type" : "BOARD",
"select_value" : "Tableau XS",
"additional_JQL" : "",
"restricted_to_active_sprint" : false,
"sprint_synchronisation_activated" : true,
"sprint_synchronisation_path" : "/Test Project-1/sprint-sync",
"sprint_additional_JQL" : "",
"sprint_restricted_to_active_sprint" : false,
"last_sync_date" : "2020/03/27 10:20",
"last_successful_sync_date" : "2020/03/27 10:20",
"last_sync_on" : "2020-03-27T09:20:00.000+00:00",
"last_successful_sync_on" : "2020-03-27T09:20:00.000+00:00",
"last_status" : "SUCCESS",
"status" : "SUCCESS",
"project_id" : 14,
"project_name" : "Test Project-1",
"_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 |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements the client is allowed to read |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get synchronisation
A GET to /synchronisations/{id} returns the synchronisation with the given id.
Path parameters
| Parameter | Description |
|---|---|
|
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-Type: application/json
Content-Length: 947
{
"_type" : "synchronisation",
"id" : 3,
"server_name" : "BugtrackerDemo3",
"server_id" : 123,
"name" : "tata",
"activated" : false,
"synchronisation_path" : "/Test Project-1/demo2",
"select_type" : "BOARD",
"select_value" : "Tableau XS",
"additional_JQL" : "",
"restricted_to_active_sprint" : false,
"sprint_synchronisation_activated" : true,
"sprint_synchronisation_path" : "/Test Project-1/sprint-sync",
"sprint_additional_JQL" : "",
"sprint_restricted_to_active_sprint" : false,
"last_sync_date" : "2020/03/27 10:20",
"last_successful_sync_date" : "2020/03/27 10:20",
"last_sync_on" : "2020-03-27T09:20:00.000+00:00",
"last_successful_sync_on" : "2020-03-27T09:20:00.000+00:00",
"last_status" : "SUCCESS",
"status" : "SUCCESS",
"project_id" : 14,
"project_name" : "Test Project-1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/synchronisations/3"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the id of the entity |
|
|
the type of the entity |
|
|
name of the bug-tracker used for the current synchronisation |
|
|
id of the bug-tracker used for the current synchronisation |
|
|
name of the synchronisation |
|
|
synchronisation is enabled/disabled |
|
|
directory where the synchronized requirements are saved in SquashTM |
|
|
select type |
|
|
select value |
|
|
JQL script |
|
|
restrict requirement synchronisation to active sprint |
|
|
sprint synchronisation is enabled/disabled |
|
|
directory where the synchronized sprints are saved in SquashTM (only present if sprint_synchronisation_activated is true) |
|
|
JQL script for synchronized sprints (only present if sprint_synchronisation_activated is true) |
|
|
restrict sprint synchronisation to active sprint (only present if sprint_synchronisation_activated is true) |
|
|
last synchronisation date (server timezone) |
|
|
last successful synchronisation date (server timezone) |
|
|
last synchronisation date (full ISO-8601 format, UTC) |
|
|
last successful synchronisation date (full ISO-8601 format, UTC) |
|
|
last status |
|
|
status |
|
|
id of the project where the current synchronisation is configured |
|
|
name of the project where the current synchronisation is configured |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
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
Content-Type: application/json
Accept: application/json
Content-Length: 419
Host: localhost:8080
{
"server_id" : 14,
"name" : "demoSynchro",
"activated" : false,
"synchronisation_path" : "/Test Project-1/demo2",
"select_type" : "BOARD",
"select_value" : "Tableau XS",
"restricted_to_active_sprint" : false,
"sprint_synchronisation_activated" : true,
"sprint_synchronisation_path" : "My path/for sprints",
"sprint_additional_JQL" : "additional JQL",
"sprint_restricted_to_active_sprint" : true
}
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
id of the bug tracker used for the current synchronisation (mandatory) |
|
|
name of the synchronisation (mandatory) |
|
|
whether the synchronisation is enabled or not |
|
|
directory where the synchronized requirements are saved in SquashTM (mandatory) |
|
|
select type (mandatory) |
|
|
select value (mandatory) |
|
|
restrict requirement synchronisation to active sprint |
|
|
sprint synchronisation is enabled/disabled |
|
|
directory where the synchronized sprints are saved in SquashTM (mandatory if sprint_synchronisation_activated is true) |
|
|
JQL script for synchronized sprints |
|
|
restrict sprint synchronisation to active sprint (mandatory if sprint_synchronisation_activated is true) |
Query parameters
| Parameter | Description |
|---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 896
{
"_type" : "synchronisation",
"id" : 4,
"server_name" : "BugtrackerDemo3",
"server_id" : 14,
"name" : "demoSynchro",
"activated" : false,
"synchronisation_path" : "/Test Project-1/demo2",
"select_type" : "BOARD",
"select_value" : "Tableau XS",
"additional_JQL" : "",
"restricted_to_active_sprint" : false,
"sprint_synchronisation_activated" : true,
"sprint_synchronisation_path" : "My path/for sprints",
"sprint_additional_JQL" : "additional JQL",
"sprint_restricted_to_active_sprint" : true,
"last_sync_date" : "never",
"last_successful_sync_date" : "never",
"last_sync_on" : null,
"last_successful_sync_on" : null,
"last_status" : "NEVER_EXECUTED",
"status" : "NEVER_EXECUTED",
"project_id" : 14,
"project_name" : "Test Project-1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/synchronisations/4"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the entity |
|
|
name of the bug tracker used for the current synchronisation |
|
|
id of the bug tracker used for the current synchronisation |
|
|
name of the synchronisation |
|
|
enable/disable synchronisation |
|
|
select type |
|
|
select value |
|
|
JQL script |
|
|
directory where the synchronized requirements are saved in SquashTM |
|
|
restrict requirement synchronisation to active sprint |
|
|
sprint synchronisation is enabled/disabled |
|
|
directory where the synchronized requirements are saved in SquashTM (only present if sprint_synchronisation_activated is true) |
|
|
JQL script for synchronized sprints (only present if sprint_synchronisation_activated is true) |
|
|
restrict sprint synchronisation to active sprint (only present if sprint_synchronisation_activated is true) |
|
|
last synchronisation date (since it is just created, it will always be 'never') |
|
|
last successful synchronisation date (since it is just created, it will always be 'never') |
|
|
last synchronisation date (since it is just created, it has not been synchronized yet) |
|
|
last successful synchronisation date ((since it is just created, it has not been synchronized yet) |
|
|
last status (since it is just created, it will always be 'NEVER_EXECUTED') |
|
|
status (since it is just created, it will always be 'NEVER_EXECUTED') |
|
|
id of the project where the current synchronisation is configured |
|
|
name of the project where the current synchronisation is configured |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this synchronisation |
Modify requirement synchronisation
A PATCH to /synchronisations/{id} modifies synchronisation with the given id. Only name, select value and additional JQL (both related to requirement synchronisation) can be modified. To modify sprint synchronisation, use the next endpoint PATCH to /synchronisations/{id}/sprints. Warning, if a board name ('select value') is updated here, it will also be updated for the associated sprints synchronisation (if any). This may impact the synchronisation perimeter.
HTTP request
PATCH /api/rest/latest/synchronisations/4 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 92
Host: localhost:8080
{
"name" : "UpdateDemoSynchro",
"select_value" : "tab Update",
"additional_JQL" : ""
}
Path parameters
| Parameter | Description |
|---|---|
|
the id of the synchronisation |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 815
{
"_type" : "synchronisation",
"id" : 4,
"server_name" : "BugtrackerDemo3",
"server_id" : 14,
"name" : "UpdateDemoSynchro",
"activated" : false,
"synchronisation_path" : "/Test Project-1/demo2",
"select_type" : "BOARD",
"select_value" : "tab Update",
"additional_JQL" : "",
"restricted_to_active_sprint" : false,
"sprint_synchronisation_activated" : false,
"last_sync_date" : "2020/03/27 10:20",
"last_successful_sync_date" : "2020/03/27 10:20",
"last_sync_on" : "2020-03-27T09:20:00.000+00:00",
"last_successful_sync_on" : "2020-03-27T09:20:00.000+00:00",
"last_status" : "SUCCESS",
"status" : "SUCCESS",
"project_id" : 14,
"project_name" : "Test Project-1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/synchronisations/4"
}
}
}
Create a sprint synchronisation
A POST to /synchronisations/{id}/sprints add a new sprint synchronisation configuration to an existing synchronisation with the given id. This endpoint can be used only if there is not already a sprint synchronisation configuration for given synchronisation. To update an existing sprint synchronisation configuration, use the following endpoint: PATCH to /synchronisations/{id}/sprints.
HTTP request
POST /api/rest/latest/synchronisations/4/sprints HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 208
Host: localhost:8080
{
"sprint_synchronisation_activated" : true,
"sprint_synchronisation_path" : "The sprint/synchro/path",
"sprint_additional_JQL" : "sprint additional JQL",
"sprint_restricted_to_active_sprint" : true
}
Path parameters
| Parameter | Description |
|---|---|
|
the id of the synchronisation |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
sprint synchronisation is enabled/disabled (mandatory with value at true) |
|
|
directory where the synchronized sprints are saved in SquashTM (mandatory) |
|
|
JQL script for synchronized sprints (optional) |
|
|
restrict sprint synchronisation to active sprint (mandatory) |
Query parameters
| Parameter | Description |
|---|---|
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 990
{
"_type" : "synchronisation",
"id" : 4,
"server_name" : "BugtrackerDemo3",
"server_id" : 14,
"name" : "UpdateDemoSynchro",
"activated" : false,
"synchronisation_path" : "/Test Project-1/demo2",
"select_type" : "BOARD",
"select_value" : "The board",
"additional_JQL" : "",
"restricted_to_active_sprint" : false,
"sprint_synchronisation_activated" : true,
"sprint_synchronisation_path" : "/Test Project-1/The sprint/synchro/path",
"sprint_additional_JQL" : "sprint additional JQL",
"sprint_restricted_to_active_sprint" : true,
"last_sync_date" : "2024/03/30 10:20",
"last_successful_sync_date" : "2024/03/30 10:20",
"last_sync_on" : "2024-03-30T09:20:00.000+00:00",
"last_successful_sync_on" : "2024-03-30T09:20:00.000+00:00",
"last_status" : "SUCCESS",
"status" : "SUCCESS",
"project_id" : 14,
"project_name" : "Test Project-1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/synchronisations/4"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the entity |
|
|
name of the bug tracker used for the current synchronisation |
|
|
id of the bug tracker used for the current synchronisation |
|
|
name of the synchronisation |
|
|
enable/disable synchronisation |
|
|
select type |
|
|
select value |
|
|
JQL script |
|
|
directory where the synchronized requirements are saved in SquashTM |
|
|
restrict requirement synchronisation to active sprint |
|
|
sprint synchronisation is enabled/disabled |
|
|
directory where the synchronized requirements are saved in SquashTM |
|
|
JQL script for synchronized sprints |
|
|
restrict sprint synchronisation to active sprint |
|
|
last synchronisation date |
|
|
last successful synchronisation date |
|
|
last synchronisation date (since it is just created, it has not been synchronized yet) |
|
|
last successful synchronisation date |
|
|
last status |
|
|
status |
|
|
id of the project where the current synchronisation is configured |
|
|
name of the project where the current synchronisation is configured |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this synchronisation |
Modify sprint synchronisation
A PATCH to /synchronisations/{id}/sprints modifies synchronisation with the given id. Only the sprint additional JQL can be modified. To modify the rest of the synchronisation’s configuration, use the previous endpoint: PATCH to /synchronisations/{id}, and to create a new sprint synchronisation configuration, use the endpoint POST to /synchronisations/{id}/sprints.
HTTP request
PATCH /api/rest/latest/synchronisations/4/sprints HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 62
Host: localhost:8080
{
"sprint_additional_JQL" : "the new additional JQL query"
}
Path parameters
| Parameter | Description |
|---|---|
|
the id of the synchronisation |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 986
{
"_type" : "synchronisation",
"id" : 4,
"server_name" : "BugtrackerDemo3",
"server_id" : 14,
"name" : "UpdateDemoSynchro",
"activated" : false,
"synchronisation_path" : "/Test Project-1/demo2",
"select_type" : "BOARD",
"select_value" : "The board",
"additional_JQL" : "",
"restricted_to_active_sprint" : false,
"sprint_synchronisation_activated" : true,
"sprint_synchronisation_path" : "/Test Project-1/sprint-sync",
"sprint_additional_JQL" : "the new additional JQL query",
"sprint_restricted_to_active_sprint" : false,
"last_sync_date" : "2024/03/30 10:20",
"last_successful_sync_date" : "2024/03/30 10:20",
"last_sync_on" : "2024-03-30T09:20:00.000+00:00",
"last_successful_sync_on" : "2024-03-30T09:20:00.000+00:00",
"last_status" : "SUCCESS",
"status" : "SUCCESS",
"project_id" : 14,
"project_name" : "Test Project-1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/synchronisations/4"
}
}
}
Activate/deactivate synchronisation
A PATCH to /synchronisations/{id}/activate with a request parameter enable=true or enable=false activates or deactivates the synchronisation with the given id.
HTTP request
PATCH /api/rest/latest/synchronisations/4/activate?enabled=true HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the synchronisation |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 805
{
"_type" : "synchronisation",
"id" : 4,
"server_name" : "BugtrackerDemo3",
"server_id" : 14,
"name" : "DemoSynchro",
"activated" : true,
"synchronisation_path" : "/Test Project-1/demo2",
"select_type" : "BOARD",
"select_value" : "Tableau",
"additional_JQL" : "",
"restricted_to_active_sprint" : false,
"sprint_synchronisation_activated" : false,
"last_sync_date" : "2020/03/27 10:20",
"last_successful_sync_date" : "2020/03/27 10:20",
"last_sync_on" : "2020-03-27T09:20:00.000+00:00",
"last_successful_sync_on" : "2020-03-27T09:20:00.000+00:00",
"last_status" : "SUCCESS",
"status" : "SUCCESS",
"project_id" : 14,
"project_name" : "Test Project-1",
"_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
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the synchronisation |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 808
{
"_type" : "synchronisation",
"id" : 4,
"server_name" : "BugtrackerDemo3",
"server_id" : 14,
"name" : "demoSynchro",
"activated" : true,
"synchronisation_path" : "/Test Project-1/demo2",
"select_type" : "BOARD",
"select_value" : "Tableau XS",
"additional_JQL" : "",
"restricted_to_active_sprint" : false,
"sprint_synchronisation_activated" : false,
"last_sync_date" : "2020/03/27 10:20",
"last_successful_sync_date" : "2020/03/27 10:20",
"last_sync_on" : "2020-03-27T09:20:00.000+00:00",
"last_successful_sync_on" : "2020-03-27T09:20:00.000+00:00",
"last_status" : "SUCCESS",
"status" : "SUCCESS",
"project_id" : 14,
"project_name" : "Test Project-1",
"_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
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the synchronisation |
Example response
HTTP/1.1 204 No Content
Delete sprint synchronisation
A DELETE to /synchronisations/{id}/sprints deletes the sprint synchronisation from the synchronisation with the given id.
HTTP request
DELETE /api/rest/latest/synchronisations/12/sprints HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
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 SquashTM field.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
|
the name of the reporting field in SquashTM |
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-Type: application/json
Content-Length: 258
{
"_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 |
|---|---|---|
|
|
the type of the entity |
|
|
the name of the reporting field in SquashTM |
|
|
the name of the reporting field in jira |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
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-Type: application/json
Content-Length: 2312
{
"_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 |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements the client is allowed to read |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Modify reporting field
A PATCH to /projects/{id}/reporting-fields/{squashField} modifies the reporting field with the given SquashTM field.
HTTP request
PATCH /api/rest/latest/projects/12/reporting-fields/redactionRatio HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 68
Host: localhost:8080
{
"_type" : "reporting-field",
"jira_field" : "RedactionRatio"
}
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
|
the name of the reporting field in SquashTM |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
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 |
|---|---|---|
|
|
the type of the entity |
|
|
the name of the reporting field in SquashTM |
|
|
the name of the reporting field in jira |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
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
Query parameters
| Parameter | Description |
|---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 804
{
"_embedded" : {
"field-mappings" : [ {
"_type" : "field-mapping",
"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",
"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 |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements the client is allowed to read |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
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
| Parameter | Description |
|---|---|
|
the id of the project |
|
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
Content-Length: 225
{
"_type" : "field-mapping",
"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 |
|---|---|---|
|
|
the type of the entity |
|
|
SquashTM Field |
|
|
jira Field |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
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
Content-Type: application/json
Accept: application/json
Content-Length: 91
Host: localhost:8080
{
"_type" : "field-mapping",
"squash_field" : "CREATED_BY",
"jira_field" : "create"
}
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
Example response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 225
{
"_type" : "field-mapping",
"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 |
|---|---|---|
|
|
the type of the entity |
|
|
field of the mapping on SquashTM side |
|
|
field of the mapping on jira side |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
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
Content-Type: application/json
Accept: application/json
Content-Length: 95
Host: localhost:8080
{
"_type" : "field-mapping",
"squash_field" : "Created by",
"jira_field" : "created by"
}
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
|
the id of the field mapping, the id of a field mapping is its SquashTM field name |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 233
{
"_type" : "field-mapping",
"squash_field" : "Created by",
"jira_field" : "created by",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/field-mappings/Created%2520by"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
field of the mapping on SquashTM side |
|
|
field of the mapping on jira side |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
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,CREATED_ON HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
|
a list of ids of the field mappings |
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-Type: application/json
Content-Length: 73
{
"_type" : "value-mapping",
"script" : "valeurjira4:valeursquash4"
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
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
Content-Type: application/json
Accept: application/json
Content-Length: 73
Host: localhost:8080
{
"_type" : "value-mapping",
"script" : "valeurjira1:valeursquash1"
}
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 73
{
"_type" : "value-mapping",
"script" : "valeurjira1:valeursquash1"
}
Requirement link type mappings
This chapter focuses on requirement link type mappings.
Get requirement link type mapping
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.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
|
the id of the requirement link type |
HTTP request
GET /api/rest/latest/projects/31/requirement-link-type-mappings/4 HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 273
{
"_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"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
id of the requirement link type |
|
|
the name of the requirement link type in SquashTM |
|
|
the name of the requirement link type in jira |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this requirement link type mapping |
Get all requirement link type mappings
A GET to /projects/{id}/requirement-link-type-mappings returns all the requirement link type mappings for the given project.
HTTP request
GET /api/rest/latest/projects/7/requirement-link-type-mappings HTTP/1.1
Accept: application/json
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1225
{
"_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
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements the client is allowed to read |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Modify requirement link type mapping
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.
Path parameters
| Parameter | Description |
|---|---|
|
the id of the project |
|
the id of the requirement link type in SquashTM |
HTTP request
PATCH /api/rest/latest/projects/5/requirement-link-type-mappings/2 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 83
Host: localhost:8080
{
"_type" : "requirement-link-type-mapping",
"jira_field" : "Issue parent of"
}
Example response
HTTP/1.1 200 OK
Content-Type: application/json
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"
}
}
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
the type of the entity |
|
|
the id of the requirement link type in SquashTM |
|
|
the name of the requirement link type in SquashTM |
|
|
the name of the requirement link type in jira |
|
|
related links |
Links
| Relation | Description |
|---|---|
|
link to this requirement link type mapping |