API - Projects

List

Description: Provides a paginated list of all projects that the user has access to.

Endpoint: <base_url>/v1/projects.json

Request: GET

Formats supported: JSON

Params:

  • page - {Integer} of the page (Default: 1)

Response

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

Example ruby request

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

Example Response

Response code: 200

{
  "pagination": {
    "total_entries":2,
    "total_pages":1,
    "current_page":1,
    "next_page":null,
    "previous_page":null,
    "per_page":15
  },
  "projects":[{
    "id":1,
    "name":"TestLodge Test scripts",
    "description":null,
    "issue_tracker_project_id":"20",
    "created_at":"2014-02-26T14:33:58Z",
    "updated_at":"2014-02-26T14:33:58Z"
  },
  { .... }]
}

 

Show

Description: Get the details for a single project.

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

Request: GET

Formats supported: JSON

Params:

  • id - {Integer} The project ID (Required)

Response

{ .... }

Example ruby request

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

Example Response

Response code: 200

{
  "id":1,
  "name":"TestLodge Test scripts",
  "description":null,
  "issue_tracker_project_id":"20",
  "created_at":"2014-02-26T14:33:58Z",
  "updated_at":"2014-02-26T14:33:58Z"
}

 

Create

Description: Create a new project.

Endpoint: <base_url>/v1/projects.json

Request: POST

Formats supported: JSON

Params:

  • project:
    • name - {String} The project name (Required)
    • description - {Text} The project description
    • issue_tracker_project_id - {String} If you have an issue tracker enabled, the issue tracker project id/key to associate with the new TestLodge project

Response

{ .... }

Example ruby request

HTTParty.post('https://example.api.testlodge.com/v1/projects.json', body: { 
project: {
  name: 'Example',
    description: 'A example project'
  }
})

Example Response

Response code: 201

{
  "id":1,
  "name":"Example",
  "description":"A example project",
  "issue_tracker_project_id":null,
  "created_at":"2014-02-26T14:33:58Z",
  "updated_at":"2014-02-26T14:33:58Z"
}

 

Update

Description: Update a project.

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

Request: PATCH

Formats supported: JSON

Params:

  • id - {Integer} The project ID (Required)

  • project:
    • name - {String} The project name
    • description - {Text} The project description
    • issue_tracker_project_id - {String} If you have an issue tracker enabled, the issue tracker project id/key to associate with the new TestLodge project

Response

{ .... }

Example ruby request

HTTParty.patch('https://example.api.testlodge.com/v1/projects/1.json', body: { 
project: {
    description: 'A new description'
  }
})

Example Response

Response code: 200

{
  "id":1,
  "name":"Example",
  "description":"A new description",
  "issue_tracker_project_id":null,
  "created_at":"2014-02-26T14:33:58Z",
  "updated_at":"2014-02-26T14:33:58Z"
}

 

Delete

Description: Delete a project and all of its content.

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

Request: DELETE

Formats supported: JSON

Params:

  • id - {Integer} The project ID (Required)

Response

{ }

Example ruby request

HTTParty.delete('https://example.api.testlodge.com/v1/projects/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.