Using
easeTest REST API
To start using the REST API, your application first needs to be authenticated by your Jira instance for your requests to go through.
After this, your application can begin to make HTTP requests to the available endpoints and manipulate the return JSON based on how you want to use the data.
Authentication
To access the REST API, the application needs to be authenticated by your Jira instance. The REST API supports the same authentication methods JIRA does.
Although, as mentioned in Jira’s API documentations:
The preferred authentication methods for the Jira REST APIs are OAuth and HTTP basic authentication (when using SSL).
Further examples regarding the different authentication methods can be found within the Jira REST API Tutorials.
URI Structure
All the endpoints can be accessed via URI paths with the following structure:http://<host>:<port>/rest/com.easesolutions.jira.plugins.testmanagement/2.0/resource-path
Methods and Parameters
HTTP methods
The
easeTest REST API 2.0 accepts the standard HTTP methods: GET, POST, PUT, and DELETE
Retrieve data by making a
request.Status colour Blue title GET Create a new resource through a
request.Status colour Green title post Make a
request to update a resource.Status colour Yellow title PUT Make a
request to remove a resource.Status colour Red title DELETE
Request and Response Body Parameters
The request and response for an endpoint is always a single JSON object.
POST and PUT requests may require you to include a request body in JSON format.
The REST API 2.0 Reference provides the details for request and response structures for each endpoint.
Path Parameters
Since
easeTest’s components are tied to Jira projects and issues, you will find that a lot of paths are structured with either a project key or an issue key. The resource identifier placeholders are indicated in curly brackets and need to be replaced with real values.
The paths are structured based on REST API naming conventions. Let’s take on the following path:http://myjirainstance.com/rest/com.easesolutions.jira.plugins.testmanagement/2.0/projects/{projectKey}/definitions/folders/{id}
In this example, projects
is the primary resource with the sub-resource definitions/folders
, both being collection resources. To identify a single resource for each, a resource identifier must be provided through the path parameters {projectKey}
and {id}
consecutively. When replacing the identifiers with actual data, your final request URL will be:http://myjirainstance.com/rest/com.easesolutions.jira.plugins.testmanagement/2.0/projects/ABCD/definitions/folders/123
Query String Parameters
The use of query string parameters has been minimized. However, when they are used, they are optional and are provided with a default. The query parameters are used for pagination, filtering, and toggles with boolean values for specific endpoints only.
Response Status Codes
easeTest uses conventional HTTP response codes to indicate the success or failure of an API request. Generally, HTTP codes in the range of
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Below is a summary of the possible response status codes for
easeTest REST APIs.
Status Code | Description | ||||||
| Everything worked as expected. Response data is returned. | ||||||
| The requested resource was created successfully. Response data is returned. | ||||||
| Everything worked as expected. No response data is provided. | ||||||
| The request was not accepted (often caused by missing a required parameter). | ||||||
| Username or password authentication failed or no permission to perform request. | ||||||
| License is invalid or expired or Jira version is incompatible. | ||||||
| The requested resource does not exist. | ||||||
| There is a conflict with the processed resource. | ||||||
| The server cannot accept the request because the payload format is in an unsupported format. |
easeTest endpoints accept request data in JSON format. | |||||||
| Something went wrong (either with Jira or the application). |
The HTTP code returns in the range of
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block |
---|
{
"message": "Reason for request failure here."
} |
Go to REST API 2.0 Reference >>
toc