API - Test case uploads

Note: All image urls which the API generate are time sensitive and are only valid for a short period of time.

Show

Description: Get the details for a test case upload.

Endpoint: <base_url>/projects/{project_id}/suites/{suite_id}/steps/{step_id}/step_uploads/{id}.json

Request: GET

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • suite_id - {Integer} The associated suite ID (Required)
  • step_id - {Integer} The test case ID (Required)
  • id - {Integer} The test case upload ID (Required)

Response

{ 
....
}

Example ruby request

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

Example Response

Response code: 200

{ 
"id":1,
"file_name":"image",
"content_type": "jpg",
"paths": {
"original": {
"name":"original",
"geometry": null,
"url":"http://s3.amazonaws.com/path/to/image"
},
"thumbnail": {
"name":"thumbnail",
"geometry":"100x100#",
"url":"http://s3.amazonaws.com/path/to/image"
},
"medium": {
"name":"thumbnail",
"geometry":"525x390>",
"url":"http://s3.amazonaws.com/path/to/image"
}
}
}

 

Create

Description: Create a new test case upload and attach to associated test case.

Endpoint: <base_url>/projects/{project_id}/suites/{suite_id}/steps/{step_id}/step_uploads.json

Request: POST

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • suite_id - {Integer} The associated suite ID (Required)
  • step_id - {Integer} The test case ID (Required)
  • id - {Integer} The test case upload ID (Required)
  • step_upload
    • file_url - {String} The URL to the image file that you would like to upload (Required)

Response

{ 
....
}

Example ruby request

HTTParty.post('https://api.testlodge.com/v1/account/1/projects/1/suites/1/steps/1/step_uploads.json', body: {
step_upload: {
file_url: 'https://www.testlodge.com/testlodge_logo.png'
}
})

Example Response

Response code: 201

{ 
"id":1,
"file_name":"testlodge_logo",
"content_type": "png",
"paths": {
"original": {
"name":"original",
"geometry": null,
"url":"http://s3.amazonaws.com/path/to/image"
},
"thumbnail": {
"name":"thumbnail",
"geometry":"100x100#",
"url":"http://s3.amazonaws.com/path/to/image"
},
"medium": {
"name":"thumbnail",
"geometry":"525x390>",
"url":"http://s3.amazonaws.com/path/to/image"
}
}
}

 

Delete

Description: Delete a test case upload.

Endpoint: <base_url>/projects/{project_id}/suites/{suite_id}/steps/{step_id}/step_uploads/{id}.json

Request: DELETE

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • suite_id - {Integer} The associated suite ID (Required)
  • step_id - {Integer} The test case ID (Required)
  • id - {Integer} The test case upload ID (Required)

Response

empty

Example ruby request

HTTParty.delete('https://api.testlodge.com/v1/account/1/projects/1/suites/1/steps/1/step_uploads/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.