Use Zoomba API Library for requests and validation
masterThe APILibrary wraps the requests library to allow making API calls and validating responses in a streamlined way.
Making Requests
Use Call Get Request or Call Post Request to execute calls in a single keyword:
Call Get Request${headers_dictionary} ${endpoint} ${query_string}Call Post Request${headers_dictionary} ${endpoint} ${query_string} ${data_payload}
Validating Responses
Use Validate Response Contains Expected Response to compare an actual JSON response against an expected JSON structure. This keyword provides detailed line-by-line error reporting if mismatches are found.
You can ignore specific keys (like timestamps or IDs) using the ignored_keys argument.
# Making a request
Call Post Request ${headers_dictionary} endpoint query_string ${data_payload}
# Validating the response
Validate Response Contains Expected Response ${json_actual_response} ${json_expected_response}
# Validating while ignoring specific keys
Validate Response Contains Expected Response ${json_actual_response} ${json_expected_response} ignored_keys=update_date
Validate Response Contains Expected Response ${json_actual_response} ${json_expected_response} ignored_keys=${list_of_keys}