Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titlePOST /rest/raven/1.0/api/test/{testKey}/step/{id}
Panel
borderColor#ccc
borderStylesolid

Update a specific test step.

Request

PATH PARAMETERS
parametertypedescription
testKeyString

- key of the test.

idIntegerID of the test step.
 Example
Code Block
titleExample Input
{
	"step": "example step",
	"data": "example data",
	"result": "example result",
	"attachments": {
		"add": [{
			"data": "gsddfgdsfg...(base64) ",
			"filename": "example1.txt",
			"contentType": "plain/text"
		}, {
			"data": "gsddfgdsfg...(base64) ",
			"filename": "example2.txt",
			"contentType": "plain/text"
		}],
		"remove": [
			141,
			105
		]
	}
}
Tip
titleExample Request
curl -H "Content-Type: application/json" -X POST -u admin:admin --data @example.json http://yourserver/rest/raven/1.0/api/test/TEST-123/step/1

Responses

200 OK : text/plain : Successful.

400 BAD_REQUEST : text/plain : Returns the error.

401 UNAUTHORIZED : text/plain : The Xray for JIRA license is not valid.

500  INTERNAL SERVER ERROR : text/plain : An internal error occurred updating the test step.

Expand
titleDELETE /rest/raven/1.0/api/test/{testKey}/step/{id}
Panel
borderColor#ccc
borderStylesolid

Remove a test step from a test.

Request

PATH PARAMETERS
parametertypedescription
testKeyString

- key of the test.

idIntegerID of the test step.
Tip
titleExample Request
curl -H "Content-Type: application/json" -X DELETE -u admin:admin http://yourserver/rest/raven/1.0/api/test/TEST-123/step/1
Responses

200 OK : text/plain : Successful.

400 BAD_REQUEST : text/plain : Returns the error.

401 UNAUTHORIZED : text/plain : The Xray for JIRA license is not valid.

500  INTERNAL SERVER ERROR : text/plain : An internal error occurred deleting the test step.

Expand
titleGET /rest/raven/1.0/api/test/{testKey}/step/{id}/attachment
Panel
borderColor#ccc
borderStylesolid

Return a json with all the test step attachments.

Request

PATH PARAMETERS
parametertypedescription
testKeyString

- key of the test.

idInteger

- ID of the test step.

Tip
titleExample Request
curl -H "Content-Type: application/json" -X GET -u admin:admin http://yourserver/rest/raven/1.0/api/test/TEST-123/step/1/attachment

Responses

200 OK : text/plain : Successful. Return a json.

Code Block
titleExample Output
[
   {
      "id":141,
      "fileName":"text.txt",
      "fileSize":"8,0 kB",
      "created":"Today 3:54 PM",
      "author":"admin",
      "fileURL":"http://YOURJIRA/jira/plugins/servlet/raven/attachment/141/TEST1.txt"
   },
   {
      "id":147,
      "fileName":"text.txt",
      "fileSize":"3,0 kB",
      "created":"Today 3:54 PM",
      "author":"admin",
      "fileURL":"http://YOURJIRA/jira/plugins/servlet/raven/attachment/147/TEST2.txt"
   }
]

400 BAD_REQUEST : text/plain : Returns the error.

401 UNAUTHORIZED : text/plain : The Xray for JIRA license is not valid.

500  INTERNAL SERVER ERROR : text/plain : An internal error occurred getting the test step attachments.

Expand
titleDELETE /rest/raven/1.0/api/test/{testKey}/step/{id}/attachment/{attachmentID}
Panel
borderColor#ccc
borderStylesolid

Remove an attachment from a test step.

Request

PATH PARAMETERS
parametertypedescription
testKeyString

- key of the test.

idInteger

- ID of the test step.

attachmentIDInteger- ID of the attachment
Tip
titleExample Request
curl -H "Content-Type: application/json" -X DELETE -u admin:admin http://yourserver/rest/raven/1.0/api/test/TEST-123/step/1/attachment/2

Responses

200 OK : text/plain : Successful.

400 BAD_REQUEST : text/plain : Returns the error.

401 UNAUTHORIZED : text/plain : The Xray for JIRA license is not valid.

500  INTERNAL SERVER ERROR : text/plain : An internal error occurred removing the test step attachment.