API - Test plans

List

Description: Provides a paginated list of all test plans within a given project.

Endpoint: <base_url>/projects/{project_id}/plans.json

Request: GET

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • page - {Integer} of the page (Default: 1)
  • order - {Integer} of how to order the list (Default: 0)
    • Options:
      • 0 - Created at
      • 1 - Updated at
      • 2 - Name

Response

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

Example ruby request

HTTParty.get('https://api.testlodge.com/v1/account/1/projects/1/plans.json', query: { order: 2 })

Example Response

Response code: 200

{
  "pagination": {
    "total_entries":2,
    "total_pages":1,
    "current_page":1,
    "next_page":null,
    "previous_page":null,
    "per_page":20
  },
  "plans":[{
    "id":1,
    "name":"Plan name",
"test_plan_identifier":"PLA345",
"project_id":1,
    "created_at":"2014-02-26T14:33:58Z",
    "updated_at":"2014-02-26T14:33:58Z"
  },
  { .... }]
}

 

Show

Description: Get the details for a test plan.

Endpoint: <base_url>/projects/{project_id}/plans/{id}.json

Request: GET

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • id - {Integer} The test plan ID (Required)

Response

{ .... }

Example ruby request

HTTParty.get('https://api.testlodge.com/v1/account/1/projects/1/plans/1.json')

Example Response

Response code: 200

{
"id":1,
  "name":"Plan name",
"test_plan_identifier":"PLA345",
"project_id":1,
  "created_at":"2014-02-26T14:33:58Z",
  "updated_at":"2014-02-26T14:33:58Z"
}

 

Create

Description: Create a new test plan.

Endpoint: <base_url>/projects/{project_id}/plans.json

Request: POST

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • plan:
    • name - {String} The test plan name (Required)

Response

{ .... }

Example ruby request

HTTParty.post('https://api.testlodge.com/v1/account/1/projects/1/plans.json', body: { 
plan: {
  name: 'Example plan'
  }
})

Example Response

Response code: 201

{
"id":1,
  "name":"Example plan",
"test_plan_identifier":"EXA345",
"project_id":1,
  "created_at":"2014-02-26T14:33:58Z",
  "updated_at":"2014-02-26T14:33:58Z"
}

 

Update

Description: Update a new test plan.

Endpoint: <base_url>/projects/{project_id}/plans/{id}.json

Request: PATCH

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • id - {Integer} The test plan ID (Required)
  • plan:
    • name - {String} The test plan name

Response

{ .... }

Example ruby request

HTTParty.patch('https://api.testlodge.com/v1/account/1/projects/1/plans/1.json', body: { 
plan: {
  name: 'New name'
  }
})

Example Response

Response code: 200

{
"id":1,
  "name":"New name",
"test_plan_identifier":"EXA345",
"project_id":1,
  "created_at":"2014-02-26T14:33:58Z",
  "updated_at":"2014-02-26T14:33:58Z"
}

 

Delete

Description: Delete a test plan.

Endpoint: <base_url>/projects/{project_id}/plans/{id}.json

Request: DELETE

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • id - {Integer} The test plan ID (Required)

Response

empty

Example ruby request

HTTParty.delete('https://api.testlodge.com/v1/account/1/projects/1/plans/1.json')

Example Response

Response code: 204

empty
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.