API - Suite sections

List

Description: Provides a paginated list of all suite sections within a given test suite

Endpoint: <base_url>/v1/projects/{project_id}/suites/{suite_id}/suite_sections.json

Request: GET

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • suite_id - {Integer} The associated suite ID (Required)
  • page - {Integer} of the page (Default: 1)

Response

{
  "pagination": { .... },
  "suite_sections": [
    {
....
},
    {
....
}
  ]
}

Example ruby request

HTTParty.get('https://example.api.testlodge.com/v1/projects/1/suites/1/suite_sections.json')

Example Response

Response code: 200

{
  "pagination": {
    "total_entries":2,
    "total_pages":1,
    "current_page":1,
    "next_page":null,
    "previous_page":null,
    "per_page":20
  },
  "suite_sections":[{
    "id":1,
    "title":"Main",
"suite_id":1,
    "created_at":"2014-02-26T14:33:58Z",
    "updated_at":"2014-02-26T14:33:58Z"
  },
  { .... }]
}

 

Show

Description: Get the details for a suite section.

Endpoint: <base_url>/v1/projects/{project_id}/suites/{suite_id}/suite_sections/{id}.json

Request: GET

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • suite_id - {Integer} The associated suite ID (Required)
  • id - {Integer} The suite section ID (Required)

Response

{ 
....
}

Example ruby request

HTTParty.get('https://example.api.testlodge.com/v1/projects/1/suites/1/suite_sections/1.json')

Example Response

Response code: 200

{
  "id":1,
  "title":"Main",
"suite_id":1,
"created_at":"2014-02-26T14:33:58Z",
  "updated_at":"2014-02-26T14:33:58Z"
}

 

Create

Description: Create a new suite section.

Endpoint: <base_url>/v1/projects/{project_id}/suites/{suite_id}/suite_sections.json

Request: POST

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • suite_id - {Integer} The associated suite ID (Required)
  • suite_section:
    • title - {String} The suite section title (Required)

Response

{ 
....
}

Example ruby request

HTTParty.post('https://example.api.testlodge.com/v1/projects/1/suites/1/suite_sections.json', body: { 
suite_section: {
  title: 'Title'
  }
})

Example Response

Response code: 201

{
  "id":1,
  "title":"Title",
"suite_id":1,
"created_at":"2014-02-26T14:33:58Z",
  "updated_at":"2014-02-26T14:33:58Z"
}

 

Update

Description: Update a suite section.

Endpoint: <base_url>/v1/projects/{project_id}/suites/{suite_id}/suite_sections/{id}.json

Request: PATCH

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • suite_id - {Integer} The associated suite ID (Required)
  • id - {Integer} The suite section ID (Required)
  • suite_section:
    • title - {String} The suite section title (Required)

Response

{ 
....
}

Example ruby request

HTTParty.patch('https://example.api.testlodge.com/v1/projects/1/suites/1/suite_sections/1.json', body: { 
suite_section: {
  title: 'New name'
  }
})

Example Response

Response code: 200

{
  "id":1,
  "title":"New name",
"suite_id":1,
"created_at":"2014-02-26T14:33:58Z",
  "updated_at":"2014-02-26T14:33:58Z"
}

 

Delete

Description: Delete a suite section. (Most have no associated test cases to delete.)

Endpoint: <base_url>/v1/projects/{project_id}/suites/{suite_id}/suite_sections/{id}.json

Request: DELETE

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • suite_id - {Integer} The associated suite ID (Required)
  • id - {Integer} The suite section ID (Required)

Response

{ }

Example ruby request

HTTParty.delete('https://example.api.testlodge.com/v1/projects/1/suites/1/suite_sections/1.json')

Example Response

Response code: 204

{ }
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.