RESTful API Client
This Addon provides actions to to send HTTP/S requests using GET, POST, PUT and DELETE methods.
There are 5 actions in this Addon:
- HTTP GET Request
- HTTP POST Request
- HTTP PUT Request
- HTTP DELETE Request
- HTTP PATCH Request
Field/Action | Required | Input/Output | GET | POST | PUT | DELETE | PATCH |
uri | X | INPUT | X | X | X | X | X |
query | | INPUT | X | X | X | X | X |
headers | | INPUT | X | X | X | X | X |
body | | INPUT | X | X | X | X | X |
format | | INPUT | X | X | X | X | X |
jsonPath | | INPUT | X | X | X | X | X |
expectedStatus | | INPUT | X | X | X | X | X |
schenaPath | | INPUT | X | X | X | X | X |
headerDelimiter | | INPUT | X | X | X | X | X |
filePath | | INPUT | | X | X | | X |
response | | OUTPUT | X | X | X | X | X |
status | | OUTPUT | X | X | X | X | X |
responseHeaders | | OUTPUT | X | X | X | X | X |
jsonSchemaValidation | | OUTPUT | X | X | X | X | X |
uri
- Request URL (endpoint)This is a mandatory parameter, otherwise action will fail.This parameter should contain only the schema, hostname, path and port (e.g. https://domain.tld:8080/api) It should not contain query parameters (e.g. ?a=1&b=2).query
- Query parameters.For example:If your request query parameters needs to be a=1 and b=2, then write in this field a=1&b=2The & symbol is used to separate between each parameter.headers
- Request headers. The following default headers are sent:accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2connection: keep-alivecontent-length:content-type: application/jsonhost: The hostuser-agent: Jersey/2.22.1 (HttpUrlConnection 1.8.0_181)Note: the default headers listed above are not overwritten if you don't specify them.The list of headers are separated by commas (,).For example:If your request headers needs to be connection=keep-alive and content-type=application/json, then write in this field:connection=keep-alive,content-type=application/json- Note: You can delimit the headers with a different character by using the HeaderDelimiter field.
body
- Body that will be sent in the requestformat
- Body (if provided) format. For example: application/json or text/html, etc...expectedStatus
- If this parameter is set, the action will check if the actual status code equals expected status code.If the actual status code is not the expected status code then action fail. Accepted values are numbers between 100 and 599 (1xx - 5xx).HeaderDelimiter
- This parameter is used to decide the character to delimit the headers around, by default '=' will be used.jsonPath
- This parameter is used to extract nodes or value from server's JSON response (if such is available).Supported syntax is the Jayway JsonPath syntax. You can find a complete documentation for Jayway JsonPath at GitHubFor a specific example, see Example 1.2If the value specified is not found or the the response is a non-JSON response, action will fail.ignoreUntrustedCertificate
- This parameter is used to disable the verification of SSL certificate.Parameter is false by default. If set totrue
, RESTful client will accept self signed and untrusted SSL certificate presented by the server when sending a request.schemaValidationOutputFilePath
- This parameter is the file path for the result of the JSON schema validation.If empty, it will create the output file in the system's Downloads directory.schemaPath
- This parameter is the path for the JSON Schema file.This parameter is for a full* path of a local schema file, or a URL pointing to a remote schema file. If a URL is provided, it will download the schema locally to a temporary file, before performing the validation. Schema validation is performed on the JSON response object provided in theJsonResponse
field.createFile
- This parameter is a boolean flag to indicate that a validation results output is required.If set totrue
, and theschemaValidationOutput
parameter is set, a file holding the validation result will be created in the provided location.filePath
- This parameter is the full path of a local file which should be sent to the designated endpoint using POST, PUT, or PATCH. if this parameter is set, the file will be sent as multipart/form-data format, you can still supply a separate body and body format to the request.
response
- The full response from the server or the extracted node/value found using expression specified injsonPath
parameter.IfjsonPath
is set,response
will be limited to the node/value found using the provided expression. If the value specified is not found or the the response or the response is not a valid JSON, this field will be empty.jsonResponse
- The full response from the server or the extracted node/value found using expression specified injsonPath
parameter as a JSON object.This parameter holds the whole response body, or the node/property requested via jsonPath as a JSON object.status
- Server's response status that is a number between 100 and 599 (1xx - 5xx).schemaValidationOutput
- This parameter is the output parameter for the schema validation.This parameter will contain the output of any violations in the JSON file according to the provided schema.
By using parameters in your rest API calls, you will be able to pass information between test steps like bearer tokens, API keys and server responses and create data driven tests (utilizing CSV files).
Parameters on rest API tests are avilbale on any input fields.
To create/select a parameter, simply select the input field and click on Select parameter:

From the Parameters menu, you can create a new parameter or select existing ones to use in your steps.
Project parameters are shared across all your tests, and test variables are set per test
You will easily be able to chain requests and transfer data from one request to another, like shown in Examples 13-15, by saving the response of the POST request, we receive the URL to use in the next PUT request.
All actions have several criterias that may result in failure assertion:
- When
expectedStatus
does not match the actual response status:Note: If theexpectedStatus
is not set, and the server responds with status other than 1xx, this will not be considered a failure. - When the requested node/value by
jsonPath
is not found in the response. - When the server fails to respond.
- Connectivity errors
All actions will report a message with the following information, no matter if the action pass or fail:
- Server response status (taken from the
status
field) - Response body or “No body/value was returned by the server” when it's absent.
- Report of violations discovered using provided JSON schema, or a statement that none were found.
Following TestProject platform conventions, unset parameters will be treated as nulls / empty strings and won't be used.
If the format field is empty it will take
application/json
as the default value.
Field | Value | Input/Output |
uri | INPUT | |
body | {"name": "Example User", "email": "[email protected]", "username": "ExampleUser"} | INPUT |
response | {"name": "Example User", "email": "[email protected]", "username": "ExampleUser", "id": 11} | OUTPUT |
status | 201 | OUTPUT |
Action result: PASSED
Field | Value | Input/Output |
uri | INPUT | |
body | {"name": "Example User", "email": "[email protected]", "username": "ExampleUser"} | INPUT |
response | {"name": "Example User", "email": "[email protected]", "username": "ExampleUser", "id": 11} | OUTPUT |
status | 201 | OUTPUT |
expectedStatus | 200 | |
Action result: FAILED (Due to
expectedStatus
that does not much status
)Field | Value | Input/Output |
uri | INPUT | |
body | {"name": "Example User", "email": "[email protected]", "username": "ExampleUser"} | INPUT |
jsonPath | name | INPUT |
response | ExampleUser | OUTPUT |
status | 201 | OUTPUT |
Action result: PASSED
Field | Value | Input/Output |
uri | INPUT | |
query | postId=1&id=1 | INPUT |
response | {"postId": 1, "id": 1, "name": "SOME_USER_NAME", "email": "SOME_EMAIL", "body": "SOME_BODY"} | OUTPUT |
status | 200 | OUTPUT |
Action result: PASSED
Field | Value | Input/Output |
uri | INPUT | |
headers | Authorization=YOUR_API_TOKEN,Host=jsonplaceholder.typicode.com | INPUT |
response | | OUTPUT |
status | 200 | OUTPUT |
Action result: PASSED
Field | Value | Input/Output |
uri | https://jsonplaceholder.typicode.com/posts | INPUT |
filePath | /files/users.txt | INPUT |
headers | Authorization=API_KEY | INPUT |
response | {"messsage":"Users updated"} | OUTPUT |
status | 200 | OUTPUT |
Field | Value | Input/Output |
uri | https://api.testproject.io/v2/projects/{projectid}/applications/{appid}/file/upload-link | INPUT |
headers | INPUT | |
jsonPath | $.url | INPUT |
response | URL to upload the APK/IPA to TestProject | OUTPUT |
status | 200 | OUTPUT |
Field | Value | Input/Output |
uri | URL From the previous Example | INPUT |
filePath | Local path to file e.g. C:\files\application.apk | INPUT |
status | 200 | OUTPUT |
Files are sent as
multipart/form data
, additional body and body format can be supplied to the request.Field | Value | Input/Output |
uri | https://api.testproject.io/v2/projects/{projectid}/applications/{appid}/file | INPUT |
headers | INPUT | |
body | {"fileName": "Enter-the-desired-file-name-here.apk/ipa"} | INPUT |
status | 200 | OUTPUT |
Field | Value | Input/Output |
uri | INPUT | |
body | {"query": "query ($id: Int) {Media(id: $id, type: ANIME) { id title {romaji english native}}}"} | INPUT |
format | application/graphql | INPUT |
response | { "data": { "Media": { "id": 1, "title": { "romaji": "Cowboy Bebop", "english": "Cowboy Bebop", "native": "カウボーイビバップ" } } } } | OUTPUT |
response | 200 | OUTPUT |
To use GraphQL, you must supply all Mutations/Queries as a valid JSON format.
Field | Value | Input/Output |
uri | INPUT | |
body | grant_type=password&password=test&client_id=test&[email protected] | INPUT |
format | application/x-xxx-form-urlencoded | INPUT |
response | {"token":"1234"} | OUTPUT |
status | 200 | OUTPUT |
Field | Value | Input/Output |
uri | https://jsonplaceholder.typicode.com/posts | INPUT |
query | apikey=1234&username=test&password=project | INPUT |
body | {"postsId":"15"} | INPUT |
status | 201 | OUTPUT |
Field | Value | Input/Output |
uri | https://jsonplaceholder.typicode.com/posts | INPUT |
headers | Authorization= Basic {base64encoded) | INPUT |
status | 200 | OUTPUT |
To use Basic Auth, the token needs to be encoded to Base64 prior to running the step, you can easily do that using the Base64 encode action which you can see here.
Field | Value | Input/Output |
uri | https://jsonplaceholder.typicode.com/posts | INPUT |
query | username=test&password=project | INPUT |
body | This is a test | INPUT |
format | application/raw | INPUT |
status | 201 | OUTPUT |
Field | Value | Input/Output |
uri | https://jsonplaceholder.typicode.com/users | INPUT |
query | username={username}&password={password} | INPUT |
headers | Authorization={api_key} | INPUT |
response | {"user":"Test", "ID:1} | OUTPUT |
status | 200 | OUTPUT |

Text in curly brackets {} represents Parameters in TestProject recorded tests
Field | Value | Input/Output |
uri | https://jsonplaceholder.typicode.com/posts | INPUT |
body | { "username":"{username}", "password":"{userpassword}"} | INPUT |
status | 201 | OUTPUT |
response | {"message": "user created"} | OUTPUT |

Field | Value | Input/Output |
uri | INPUT | |
headers | Authorization={api_key} | INPUT |
body | { "username":"{username}", "password":"{password}"} | INPUT |
status | 201 | OUTPUT |

Below is an example of a valid schema format:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://reqres.in/api/users?page=2/users.schema.json",
"title": "users",
"description": "A user from list",
"type": "object",
"properties": {
"name": {
"description": "The name for a user",
"type": "string"
}
},
"required": [ "name" ]
}
This is also a good source for a schema: https://json-schema.org/learn/getting-started-step-by-step.html
Last modified 1yr ago