API Requests-2.1228.1332




API Requests


Author: Jerry Chae


Description

The API Requests plugin is based on a Python solution called “Requests” a HTTP library that simplifies sending HTTP requests. The API Requests plugin is useful when you want your automation scenario to send requests to API that are based on HTTP such as REST(RESTful) API.


For more information, please visit this link.


https://docs.python-requests.org/en/master/


Useful Resources

Below are some of the online resources using which you can test your HTTP Requests (Against REST API)

.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

 





Need help?

Technical contact to tech@argos-labs.com


May you search all operations,


Required Input

  • HTTP request method
  • URL


Optional Input

  • Parameters
  • Headers
  • Cookies
  • Json (either in String or in File)
  • Encoding options


Return Value

  • Whatever that would be retuned as “Response” to Requests will be stored in String, CSV, or File (.txt or .csv)




Result Codes


0 for Response code 200s

4 for Response code 400s

5 for Response code 500s

9 for Everything else




How to set parameters







Examples


This website explains various HTTP request methods. Below graphics are showing how the code will be transposed to STU’s parameter section.

https://reqres.in/




1)      Case of List User



2)      Case of Single User



3)     Case of Single User Not Found




4)      Case of Create User




Return Code

Code
Meaning
0Execution successful
1Conditional Response
3Redirection
4Client Error
5Server Error
9Other Failures and Errors