Iterations

This chapter focuses on services for iterations.

Create iteration

A POST to /campaigns/{campaignId}/iterations creates a new iteration.

HTTP request

POST /api/rest/latest/campaigns/2/iterations HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 576
Host: localhost:8080

{
  "_type" : "iteration",
  "name" : "new iteration",
  "reference" : "NEW_IT",
  "description" : "<p>A new iteration</p>",
  "parent" : {
    "_type" : "campaign",
    "id" : 2
  },
  "scheduled_start_date" : "2017-04-09T22:00:00.000+00:00",
  "scheduled_end_date" : "2017-04-14T23:00:00.000+00:00",
  "actual_start_date" : "2017-04-10T22:00:00.000+00:00",
  "actual_end_date" : "2017-04-15T22:00:00.000+00:00",
  "actual_start_auto" : false,
  "actual_end_auto" : true,
  "custom_fields" : [ {
    "code" : "CUF_A",
    "label" : "Cuf A",
    "value" : "value of A"
  } ]
}

Request fields

Path Type Description

_type

String

the type of the entity

name

String

the name of the iteration

reference

String

the reference of the iteration

description

String

the description of the iteration

parent

Object

the parent campaign of this iteration

actual_start_date

String

actual start date

actual_end_date

String

actual end date

actual_start_auto

Boolean

whether the actual start date is automatically computed

actual_end_auto

Boolean

whether the actual end date is automatically computed

scheduled_start_date

String

scheduled start date

scheduled_end_date

String

scheduled end date

custom_fields

Array

the custom fields of this iteration

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

HTTP response

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1613

{
  "_type" : "iteration",
  "id" : 22,
  "name" : "new iteration",
  "reference" : "NEW_IT",
  "description" : "<p>A new iteration</p>",
  "uuid" : "2f7194ca-eb2e-4379-f82d-ddc207c866bd",
  "parent" : {
    "_type" : "campaign",
    "id" : 2,
    "name" : "parent campaign",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/campaigns/2"
      }
    }
  },
  "created_by" : "User-A",
  "created_on" : "2017-04-07T10:00:00.000+00:00",
  "last_modified_by" : "User-A",
  "last_modified_on" : "2017-04-07T10:00:00.000+00:00",
  "scheduled_start_date" : "2017-04-09T10:00:00.000+00:00",
  "scheduled_end_date" : "2017-04-14T10:00:00.000+00:00",
  "actual_start_date" : "2017-04-10T10:00:00.000+00:00",
  "actual_end_date" : "2017-04-15T10:00:00.000+00:00",
  "actual_start_auto" : false,
  "actual_end_auto" : true,
  "custom_fields" : [ {
    "code" : "CUF",
    "label" : "cuf",
    "value" : "value"
  } ],
  "test_suites" : [ ],
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/22"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/4"
    },
    "campaign" : {
      "href" : "http://localhost:8080/api/rest/latest/campaigns/2"
    },
    "test-suites" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/22/test-suites"
    },
    "test-plan" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/22/test-plan"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/22/attachments"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of this entity

id

Number

the id of this iteration

name

String

the name of this iteration

reference

String

the reference of this iteration

description

String

the description of this iteration

uuid

String

the uuid of this iteration

parent

Object

the parent campaign of this iteration

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)

actual_start_date

String

actual start date

actual_end_date

String

actual end date

actual_start_auto

Boolean

whether the actual start date is automatically computed

actual_end_auto

Boolean

whether the actual end date is automatically computed

scheduled_start_date

String

scheduled start date

scheduled_end_date

String

scheduled end date

custom_fields

Array

the custom fields of this iteration

test_suites

Array

the test-suites of this iteration

attachments

Array

the attachments of this iteration

_links

Object

related links

Relation Description

self

link to this iteration

project

link to the project of this iteration

campaign

link to the campaign of this iteration

test-suites

link to the test suites of this iteration

test-plan

link to the test plan of this iteration

attachments

link to the attachments of this iteration

Get iteration

A GET to /iterations/{id} returns the iteration with the given id.

Path parameters

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

id

the id of the iteration

HTTP request

GET /api/rest/latest/iterations/22 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
Content-Length: 2003

{
  "_type" : "iteration",
  "id" : 22,
  "name" : "sample iteration",
  "reference" : "SAMP_IT",
  "description" : "<p>A sample iteration</p>",
  "uuid" : "2f7194ca-eb2e-4379-f82d-ddc207c866bd",
  "parent" : {
    "_type" : "campaign",
    "id" : 2,
    "name" : "sample campaign",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/campaigns/2"
      }
    }
  },
  "created_by" : "User-A",
  "created_on" : "2017-04-07T10:00:00.000+00:00",
  "last_modified_by" : "User-B",
  "last_modified_on" : "2017-04-15T10:00:00.000+00:00",
  "scheduled_start_date" : "2017-04-09T10:00:00.000+00:00",
  "scheduled_end_date" : "2017-04-14T10:00:00.000+00:00",
  "actual_start_date" : "2017-04-10T10:00:00.000+00:00",
  "actual_end_date" : "2017-04-15T10:00:00.000+00:00",
  "actual_start_auto" : false,
  "actual_end_auto" : true,
  "custom_fields" : [ {
    "code" : "CUF",
    "label" : "cuf",
    "value" : "value"
  } ],
  "test_suites" : [ {
    "_type" : "test-suite",
    "id" : 1,
    "name" : "Suite_1",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-suites/1"
      }
    }
  }, {
    "_type" : "test-suite",
    "id" : 2,
    "name" : "Suite_2",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-suites/2"
      }
    }
  } ],
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/22"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/4"
    },
    "campaign" : {
      "href" : "http://localhost:8080/api/rest/latest/campaigns/2"
    },
    "test-suites" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/22/test-suites"
    },
    "test-plan" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/22/test-plan"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/22/attachments"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of this entity

id

Number

the id of this iteration

name

String

the name of this iteration

reference

String

the reference of this iteration

description

String

the description of this iteration

uuid

String

the uuid of this iteration

parent

Object

the parent campaign of this iteration

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)

actual_start_date

String

actual start date

actual_end_date

String

actual end date

actual_start_auto

Boolean

whether the actual start date is automatically computed

actual_end_auto

Boolean

whether the actual end date is automatically computed

scheduled_start_date

String

scheduled start date

scheduled_end_date

String

scheduled end date

custom_fields

Array

the custom fields of this iteration

test_suites

Array

the test-suites of this iteration

attachments

Array

the attachments of this iteration

_links

Object

related links

Relation Description

self

link to this iteration

project

link to the project of this iteration

campaign

link to the campaign of this iteration

test-suites

link to the test suites of this iteration

test-plan

link to the test plan of this iteration

attachments

link to the attachments of this iteration

Get iteration by name

A GET to /iterations with a request parameter iterationName returns the iteration with the given name. Be careful, both the name of the parameter iterationName and the value of the iteration name are case-sensitive.

HTTP request

GET /api/rest/latest/iterations?iterationName=sample+iteration HTTP/1.1
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

iterationName

the name of the iteration

fields

which fields of the elements should be returned (optional)

HTTP response

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

{
  "_type" : "iteration",
  "id" : 22,
  "name" : "sample iteration",
  "reference" : "SAMP_IT",
  "description" : "<p>A sample iteration</p>",
  "uuid" : "2f7194ca-eb2e-4379-f82d-ddc207c866bd",
  "parent" : {
    "_type" : "campaign",
    "id" : 2,
    "name" : "sample campaign",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/campaigns/2"
      }
    }
  },
  "created_by" : "User-A",
  "created_on" : "2017-04-07T10:00:00.000+00:00",
  "last_modified_by" : "User-B",
  "last_modified_on" : "2017-04-15T10:00:00.000+00:00",
  "scheduled_start_date" : "2017-04-09T10:00:00.000+00:00",
  "scheduled_end_date" : "2017-04-14T10:00:00.000+00:00",
  "actual_start_date" : "2017-04-10T10:00:00.000+00:00",
  "actual_end_date" : "2017-04-15T10:00:00.000+00:00",
  "actual_start_auto" : false,
  "actual_end_auto" : true,
  "custom_fields" : [ {
    "code" : "CUF",
    "label" : "cuf",
    "value" : "value"
  } ],
  "test_suites" : [ {
    "_type" : "test-suite",
    "id" : 1,
    "name" : "Suite_1",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-suites/1"
      }
    }
  }, {
    "_type" : "test-suite",
    "id" : 2,
    "name" : "Suite_2",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-suites/2"
      }
    }
  } ],
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/22"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/4"
    },
    "campaign" : {
      "href" : "http://localhost:8080/api/rest/latest/campaigns/2"
    },
    "test-suites" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/22/test-suites"
    },
    "test-plan" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/22/test-plan"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/22/attachments"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of this entity

id

Number

the id of this iteration

name

String

the name of this iteration

reference

String

the reference of this iteration

description

String

the description of this iteration

uuid

String

the uuid of this iteration

parent

Object

the parent campaign of this iteration

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)

actual_start_date

String

actual start date

actual_end_date

String

actual end date

actual_start_auto

Boolean

whether the actual start date is automatically computed

actual_end_auto

Boolean

whether the actual end date is automatically computed

scheduled_start_date

String

scheduled start date

scheduled_end_date

String

scheduled end date

custom_fields

Array

the custom fields of this iteration

test_suites

Array

the test-suites of this iteration

attachments

Array

the attachments of this iteration

_links

Object

related links

Relation Description

self

link to this iteration

project

link to the project of this iteration

campaign

link to the campaign of this iteration

test-suites

link to the test suites of this iteration

test-plan

link to the test plan of this iteration

attachments

link to the attachments of this iteration

Modify iteration

A PATCH to /iterations/{id} modifies the iteration with the given id.

Path parameters

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

id

the id of the iteration

HTTP request

PATCH /api/rest/latest/iterations/332 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 481
Host: localhost:8080

{
  "_type" : "patched iteration",
  "name" : "new iteration",
  "reference" : "NEW_IT",
  "description" : "<p>A new iteration</p>",
  "parent" : {
    "_type" : "campaign",
    "id" : 2
  },
  "scheduled_start_date" : "2017-04-09T22:00:00.000+00:00",
  "scheduled_end_date" : "2017-04-14T23:00:00.000+00:00",
  "actual_start_date" : "2017-04-10T22:00:00.000+00:00",
  "actual_end_date" : "2017-04-15T22:00:00.000+00:00",
  "actual_start_auto" : false,
  "actual_end_auto" : true
}

Request fields

Path Type Description

_type

String

the type of the entity

name

String

the name of the iteration

reference

String

the reference of the iteration

description

String

the description of the iteration

parent

Object

the parent campaign of this iteration

actual_start_date

String

actual start date

actual_end_date

String

actual end date

actual_start_auto

Boolean

whether the actual start date is automatically computed

actual_end_auto

Boolean

whether the actual end date is automatically computed

scheduled_start_date

String

scheduled start date

scheduled_end_date

String

scheduled end date

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
Content-Length: 1548

{
  "_type" : "iteration",
  "id" : 22,
  "name" : "patched iteration",
  "reference" : "NEW_IT",
  "description" : "<p>A new iteration</p>",
  "uuid" : "2f7194ca-eb2e-4379-f82d-ddc207c866bd",
  "parent" : {
    "_type" : "campaign",
    "id" : 2,
    "name" : "parent campaign",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/campaigns/2"
      }
    }
  },
  "created_by" : "User-A",
  "created_on" : "2017-04-07T10:00:00.000+00:00",
  "last_modified_by" : "User-B",
  "last_modified_on" : "2017-04-15T10:00:00.000+00:00",
  "scheduled_start_date" : "2017-04-09T10:00:00.000+00:00",
  "scheduled_end_date" : "2017-04-14T10:00:00.000+00:00",
  "actual_start_date" : "2017-04-10T10:00:00.000+00:00",
  "actual_end_date" : "2017-04-15T10:00:00.000+00:00",
  "actual_start_auto" : false,
  "actual_end_auto" : true,
  "custom_fields" : [ ],
  "test_suites" : [ ],
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/22"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/4"
    },
    "campaign" : {
      "href" : "http://localhost:8080/api/rest/latest/campaigns/2"
    },
    "test-suites" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/22/test-suites"
    },
    "test-plan" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/22/test-plan"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/22/attachments"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of this entity

id

Number

the id of this iteration

name

String

the name of this iteration

reference

String

the reference of this iteration

description

String

the description of this iteration

uuid

String

the uuid of this iteration

parent

Object

the parent campaign of this iteration

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)

actual_start_date

String

actual start date

actual_end_date

String

actual end date

actual_start_auto

Boolean

whether the actual start date is automatically computed

actual_end_auto

Boolean

whether the actual end date is automatically computed

scheduled_start_date

String

scheduled start date

scheduled_end_date

String

scheduled end date

custom_fields

Array

the custom fields of this iteration

test_suites

Array

the test-suites of this iteration

attachments

Array

the attachments of this iteration

_links

Object

related links

Relation Description

self

link to this iteration

project

link to the project of this iteration

campaign

link to the campaign of this iteration

test-suites

link to the test suites of this iteration

test-plan

link to the test plan of this iteration

attachments

link to the attachments of this iteration

Get test plans of an iteration

A GET to /iterations/{id}/test-plan returns the test plans of the iteration with the given id.

Path parameters

Table 1. /api/rest/latest/iterations/{id}/test-plan
Parameter Description

id

the id of the iteration

HTTP request

GET /api/rest/latest/iterations/1/test-plan?size=2&page=1 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)

HTTP response

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

{
  "_embedded" : {
    "test-plan" : [ {
      "_type" : "iteration-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"
          }
        }
      } ],
      "iteration" : {
        "_type" : "iteration",
        "id" : 1,
        "name" : "sample iteration",
        "reference" : "IT1",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/iterations/1"
          }
        }
      },
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/4"
        }
      }
    }, {
      "_type" : "iteration-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"
          }
        }
      } ],
      "iteration" : {
        "_type" : "iteration",
        "id" : 1,
        "name" : "sample iteration",
        "reference" : "IT1",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/iterations/1"
          }
        }
      },
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/12"
        }
      }
    }, {
      "_type" : "iteration-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"
          }
        }
      } ],
      "iteration" : {
        "_type" : "iteration",
        "id" : 1,
        "name" : "sample iteration",
        "reference" : "IT1",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/iterations/1"
          }
        }
      },
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/13"
        }
      }
    } ]
  },
  "_links" : {
    "first" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/1/test-plan?page=0&size=2"
    },
    "prev" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/1/test-plan?page=0&size=2"
    },
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/1/test-plan?page=1&size=2"
    },
    "next" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/1/test-plan?page=2&size=2"
    },
    "last" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/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)

Get test suites of an iteration

A GET /iterations/{id}/test-suites returns all the test-suites of the iteration with the given id.

Path parameters

Table 1. /api/rest/latest/iterations/{id}/test-suites
Parameter Description

id

the id of the iteration

HTTP request

GET /api/rest/latest/iterations/1/test-suites?size=2&page=1 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)

HTTP response

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

{
  "_embedded" : {
    "test-suites" : [ {
      "_type" : "test-suite",
      "id" : 9,
      "name" : "Suite 1",
      "description" : "<p>The first test suite.</p>",
      "uuid" : "2f7198zd-eb2e-4379-f82d-ddc207c866bd",
      "status" : "READY",
      "parent" : {
        "_type" : "iteration",
        "id" : 1,
        "name" : "Iteration 1",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/iterations/1"
          }
        }
      },
      "created_by" : "User 2B93",
      "created_on" : "2017-02-04T10:00:00.000+00:00",
      "last_modified_by" : "User 1Z45",
      "last_modified_on" : "2017-03-02T10:00:00.000+00:00",
      "custom_fields" : [ {
        "code" : "MY_CUF",
        "label" : "My Custom Field",
        "value" : "yellow"
      } ],
      "test_plan" : [ {
        "_type" : "iteration-test-plan-item",
        "id" : 7,
        "execution_status" : "SUCCESS",
        "referenced_test_case" : {
          "_type" : "test-case",
          "id" : 3,
          "name" : "test case 3",
          "_links" : {
            "self" : {
              "href" : "http://localhost:8080/api/rest/latest/test-cases/3"
            }
          }
        },
        "referenced_dataset" : {
          "_type" : "dataset",
          "id" : 2,
          "name" : "dataset 2",
          "_links" : {
            "self" : {
              "href" : "http://localhost:8080/api/rest/latest/datasets/2"
            }
          }
        },
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/7"
          }
        }
      }, {
        "_type" : "iteration-test-plan-item",
        "id" : 8,
        "execution_status" : "RUNNING",
        "referenced_test_case" : {
          "_type" : "scripted-test-case",
          "id" : 11,
          "name" : "scripted test case 11",
          "_links" : {
            "self" : {
              "href" : "http://localhost:8080/api/rest/latest/test-cases/11"
            }
          }
        },
        "referenced_dataset" : null,
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/8"
          }
        }
      } ],
      "attachments" : [ ],
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-suites/9"
        }
      }
    }, {
      "_type" : "test-suite",
      "id" : 10,
      "name" : "Suite 2",
      "description" : "<p>The second test suite.</p>",
      "uuid" : "2f7198zd-eb2e-4379-f82d-ddc207c866bd",
      "status" : "READY",
      "parent" : {
        "_type" : "iteration",
        "id" : 1,
        "name" : "Iteration 1",
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/iterations/1"
          }
        }
      },
      "created_by" : "User 2B93",
      "created_on" : "2017-02-04T10:05:42.000+00:00",
      "last_modified_by" : "User 2B93",
      "last_modified_on" : "2017-03-04T12:00:00.000+00:00",
      "custom_fields" : [ {
        "code" : "MY_CUF",
        "label" : "My Custom Field",
        "value" : "blue"
      } ],
      "test_plan" : [ {
        "_type" : "iteration-test-plan-item",
        "id" : 15,
        "execution_status" : "READY",
        "referenced_test_case" : {
          "_type" : "test-case",
          "id" : 11,
          "name" : "test case 11",
          "_links" : {
            "self" : {
              "href" : "http://localhost:8080/api/rest/latest/test-cases/11"
            }
          }
        },
        "referenced_dataset" : null,
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/15"
          }
        }
      }, {
        "_type" : "iteration-test-plan-item",
        "id" : 13,
        "execution_status" : "READY",
        "referenced_test_case" : {
          "_type" : "keyword-test-case",
          "id" : 17,
          "name" : "keyword test case 17",
          "_links" : {
            "self" : {
              "href" : "http://localhost:8080/api/rest/latest/test-cases/17"
            }
          }
        },
        "referenced_dataset" : null,
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/13"
          }
        }
      } ],
      "attachments" : [ ],
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/test-suites/10"
        }
      }
    } ]
  },
  "_links" : {
    "first" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/1/test-suites?page=0&size=2"
    },
    "prev" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/1/test-suites?page=0&size=2"
    },
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/1/test-suites?page=1&size=2"
    },
    "next" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/1/test-suites?page=2&size=2"
    },
    "last" : {
      "href" : "http://localhost:8080/api/rest/latest/iterations/1/test-suites?page=2&size=2"
    }
  },
  "page" : {
    "size" : 2,
    "totalElements" : 6,
    "totalPages" : 3,
    "number" : 1
  }
}

Response fields

Path Type Description

_embedded.test-suites

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)