🎓API Tester features
API Tester is a mobile app for iOS and Android for testing and using APIs. By using API Tester, you can send requests to connect with APIs you are working with. When you send a request, API Tester displays the response received from the API server to examine it.
API Tester has a minimalist and user-friendly interface, so you can interact with APIs on the go using only your mobile device. Cheers, you can leave your laptop at home!
This guide is an overview of all API Tester features:
Your feedback or suggestions for new features will help to improve API Tester. To submit feedback or feature requests, send an email to hello@apitester.org. Also, you can find all relevant information about the app in API Tester Updates.
Create and send request
API Tester allows creating new requests from scratch or run imported ones. Let’s try to create a simple GET request. Launch API Tester and follow these steps:
Tap on the “Create new request” button - a pop-up with different methods will appear.
Choose a GET method - GET request will be created.
Now let's build your request. Enter a URL (representing the API endpoint you are working with). To test sending request in API Tester, you can set this URL:
Then press the blue “Play” button in the right upper corner to see what happens.
All done, you have sent your first GET request and received a response!
GET methods are typically for retrieving data from an API. You can use a variety of other methods to send data to your APIs, including the following most common options:
POST (add new data);
PUT (replace existing data);
PATCH (update some existing data fields);
DELETE (delete existing data), etc.
Import collection
In some cases, the easiest way to get started with using API is to use a collection of requests. API Tester supports different types of API collections, such as: Open API / Swagger / Postman / YAML. There are 2 ways to import collection to API Tester: via link and via file. Let's do it the first way.
So, to import Collection, do the following:
On the main screen of the app, tap on the “Plus” button in the right upper corner.
Tap on the “Collection” button, then choose the “Link” option and input your link to the Collection. In this guide, we will use the Coingecko API requests collection (gives access to cryptocurrency price, market, and developer/social data) as an example:
Requests from the imported collection will appear on the main screen.
Path variables
Let’s take a look at one of the imported requests URL:
API Tester app supports "/:name" and "{name}" formats of path variables. The URL of the imported request contains one path variable - {id}.
The Path Variables section is only displayed if the URL contains at least one path variable. To edit the value of path variable, fill in "dogecoin" to the "value" field:
Then send this request to examine the response. As you can see, the response contains general information about the Dogecoin such as name, symbol, platform, and description in different languages.
There is also some additional information that can be found on the response screen: in the left lower corner, there are: response code, time of receiving the response and its size.
In the right lower corner on the Response screen, there are 3 buttons:
“Magnifying glass” icon - to search content of the response for a specific data.
“Clock” icon - to see additional info of the response, such as Headers, Metrics, and the launching history.
“Share” icon - to share the received response.
Query params
To illustrate how to use query parameters we will run another request and get the current price of a Dogecoin expressed in USD:
Search for a word “Price” on the main screen of the app to see relevant requests included in this Collection. Select “Get the current price of any cryptocurrencies in any other supported currencies that you need”.
Specify values of query parameters. Query parameters are optional key-value pairs that appear to the right of the “?” in a URL. You can specify them directly in the URL by editing it. Alternatively, there is a more user-friendly way of adding values for Query Params in a special section (check the screenshot below). Here are the key-value pairs for getting Dogecoin to USD price:
ids=dogecoin
vs_currencies=usd
Send the constructed request that should look like this:
Response with the price of Dogecoin is received.
Duplicate request
Let’s try to get the current price of a Bitcoin expressed in USD with the request we used above by duplicating it and replacing the query parameters:
Go back to the main screen of the app and swipe the request to the left. The following three icons will appear near the request: share link, duplicate request, delete request.
Tap on the duplicate icon. After this step, you will be redirected to the duplicated request.
Change Query Params by switching Dogecoin for Bitcoin. It will look like this:
ids=bitcoin
vs_currencies=usd
Response with the price of Bitcoin is received.
Share request
What if you would like to share this request or save it for your future work? This is easy to do:
Go back to the main screen in the app, swipe the request you want to share to the left, select «Share» icon.
In the pop-up window you can choose any option for sharing, e.g., share request via message, mail, or copy link. Let’s try the last option. The link for this request will look like this, tap on it to check how it works:
Authorization
There are certain types of request which require authentication of users to get a response. In API Tester you can choose one of three authorization options in the Auth section: none, basic, OAuth. Next, we will review examples of all options.
Basic authentication implies adding the username and password of a person who wants to make a request to the specific server. In API Tester app, you can do this by following these steps:
Create new request.
Add the following endpoint into the URL field:
Fill in the authorization data into the Basic tab in the Auth section:
Run the request.
In the OAuth tab you need to place the value for the access token, also you will have the ability to add this value to the query. By default, the value for access token is not added to the query, so it's optional. To run the request with OAuth, you will need to:
Create new request.
Add the following endpoint into the URL field:
Put the value "your_token" in the Access Token field in OAuth tab of Auth section.
Run the request.
Also, you can get access keys or tokens either by making a specific authorization request or from the API source (an example of the second option is described in Google APIs Guide). Here, we'll describe how to get an access token with a request.
Create a POST request and add the following endpoint:
Put this piece of a code into the Post data tab:
Choose value "application/json" for the "Content Type" in a Raw tab of body section.
Run the request.
All done! Now you can copy the token from response and use it for the request from the next section!
Body params
Several request methods contain tabs where user need to place a piece of code with arguments and specific data for running a correct request - this section is called Body. In API Tester app there are 4 different data options for adding specific information for the request:
URLEncoded;
FormData;
Raw;
Binary.
You can either upload a file with a piece of code, place it as a key-value pair or put a code in a special field.
Let's review the adding a raw data. We'll use the POST request for creating a booking with the access token from the previous section:
Create new POST request and place this endpoint:
Place this piece of code in a Post data tab:
Choose value "application/json" for the "Content Type" Raw tab of body section.
Put an access token in a OAuth section.
Run the request.
As you can see in the response, we got the ID of the created booking and information we've uploaded.
To run the request with FormData Body parameters you will need to:
Create a new PATCH request.
Add the following endpoint in the URL field:
Fill in the FormData section in Body Params tab in a form of key-value pairs:
foo=bar baz=xyz
As a Header, set "multipart/form-data" for "Content-Type" and run the request.
Creation of a request with URLEncoded Body params consists of few simple steps:
Create a new PUT request by tapping Create new request button on the main screen, or by tapping on a Plus button in the right upper corner.
Add the following endpoint in the URL field:
Fill in the URLEncoded section in Body Params tab in a form of key-value pairs:
foo=bar baz=xyz arr=1 arr=2
As a Header, set "application/x-www-form-urlencoded" for "Content-Type" and run the request.
You can also add Binary data to your requests, to do so:
Create a new POST request.
Add the following request endpoint:
In the Binary tab of the Body section of request add any file you need, it could be photo, video, audio, or text file.
Set request Header Content-Type with value application/octet-stream and run the request.
In most of the cases Content-Type header will be added automatically depending on the data you place in the request Body, but in other cases you can always add any custom header you need manually.
Request headers
Headers are an important part of each request. Compared to parameters, headers provide information about technical components of the request or response. You can find headers either on the request main screen or on the response screen ("Clock" icon).
Some headers are added automatically when importing a request, others - need to be put manually by user. You can find headers and their values in the Headers section of request. For user's convenience, there are special hints which help you to place necessary headers. You can find them by tapping on the Add Header button.
In cases, when Headers were imported with request, you can easily manage them by tapping on "Edit" button. The special screen will open where you can place any other headers or delete existing ones.
Request cookies
API Tester app allows its users to use cookies for any requests. There is a special section in most types of request, where you can set up your cookies. To add cookies, you need to:
Open chosen request in API Tester app;
Switch the "Enable to send & accept cookies" button;
Tap "Add Cookie";
Fill in compulsory fields "Name" and "Value", and other fields if necessary;
Tap "Add" button.
All done! You've created your personal cookie!
To edit cookie, you need to tap on the created cookie and then tap the "edit" button in a right upper corner. If you want to delete a cookie, just swipe it to the left and the delete button will appear.
Request settings
In each request, there is a Settings tab, you can find it by tapping on the button with three dots. In the pop-up menu, you will find the following options:
Rename (gives you an ability to change request name);
Settings;
Export cURL;
Share link.
The second function contains additional settings for a request, such as: Timeout (Seconds), Follow Redirects, and Verify SSL. The last two options can be disabled by switching the button. All these settings allow users to set up requests according to their needs and preferences.
Clear history of requests
In some cases, you may need to delete all requests from the app (for example, to clear your requests list or to import new ones). To do that:
Go to the main screen and tap the “3 dots” icon in the left upper corner.
There are several useful options, you can: - share API Tester app, - join API Tester Community in Telegram, - reach out to our support team via email, - or delete all requests.
Tap “Delete all requests”. As you can see, all requests were successfully deleted from the main screen.
GraphQL
To create and run GraphQL request in API Tester, you need:
Tap ‘Create new request’ button and choose GraphQL.
Place a GraphQL endpoint into the URL field:
Put the following piece of code into the body tab:
Add variables to the request, by putting the piece of code presented below:
When all request elements are set, you can run the request and study the response.
After receiving the response, you can study documentation provided for this API. You can find it in docs tab. In the docs tab, all possible queries for request are listed with details and description.
Also, you can find the Settings tab in GraphQL request, where you can add Headers, Cookies, or authentication data if required.
Note that all GraphQL requests in API have the same endpoint. To get the information, you need it is required to construct a correct body and, if necessary, to add GraphQL variables.
Websocket
API Tester supports the exchange of data between the server and user through WS and WSS connections. To create a Websocket request, you need to follow these steps:
Tap the Plus button on the main screen of the app and choose Websocket.
Put this endpoint into the URL field:
Tap the "Connect" button to create a connection with this server.
4. On the response screen put any text in the message field, for example: Hello and tap Send button you will receive the response message from server.
To close the connection, you can press Disconnect button in the right upper corner of the response screen, or it will be disconnected automatically in a certain period of time (depends on the server you work with).
As well as in other request types, you can add Query params, Headers and authentication data for request if required in the Websocket request screen.
Response search
There are two ways of how to search for specific information in any response. First, is a key-word search, second - JSON Path filtering.
As an example, we’ll take the following GET request:
You need to:
run this request and open the response screen,
there you will find Magnifying glass icon, tap it and a special field for search will appear,
type in the search field any word you are looking for, e.g., word "smile".
observe all mentions of a word "smile" with their quantity in the response (search results will be marked with yellow color).
To make a JSON Path filtering in response, you need to correctly specify the information you look for. In this type of search, you should start with $. combination and then specify the concrete information for search. This might look like this:
After putting this combination in the search field, you will get the result "Face with tears of joy". You can check whether this search was correct or not by tapping of cancel button in the right upper corner and checking the whole response.
Import from WebProxyTool
WebProxyTool offers an opportunity to detect all outgoing HTTP(S) traffic from other apps and import it in a form of requests to API Tester. To do so, you will need to follow a few easy steps:
Open WebProxyTool and switch "Record HTTPS traffic" button.
Open any app you want to get requests from.
Go back to WebProxyTool and choose the request you need to import.
In a request screen in WebProxyTool open "Test" tab, then tap "Import to API Tester" button, and you will be redirected to the API Tester app.
After these steps, the request screen will be opened in API Tester where all data from WebProxyTool request will appear, and you will be able to run the chosen request.
SOAP requests
API Tester supports sending requests to SOAP APIs as well as to REST APIs. To send a SOAP request, you will need to:
Tap Create new request button or Plus button in the right upper corner and choose POST method.
Add the following endpoint:
Place this piece of code into the Post Data tab:
Also, it is required to set the value for Content Type as text/xml In Body section of the request and when all parameters are specified, we can run the request. In the response of this request, you will get the list of all world continents.
JSON-RPC requests
For this type of request, the user will need to use only one endpoint and change code in Post data for specifying the information you are looking for. Let’s create JSON-RPC request:
Create new request and choose POST method.
Add the following endpoint into the URL field:
Place the following piece of code into the Post data section of the Body Tab:
Set the value for "Content-Type" header in the Headers section as "application/json" and run the request.
As an example, we used JSON-RPS API of Solana and by running the request above you can check the current health of the node.
XML Requests
With API Tester, you can send XML requests as well. To create an XML request, do the following:
Tap "Create new request" button or "Plus" button in the right upper corner and choose GET method.
Add the following endpoint into the URL field:
Add header "Content-Type" in Headers section and specify "text/xml" value.
Run the request.
In this example as a response you will receive data about concrete board game with details and description in the XML format.
In most cases, when submitting XML calls through the API, make sure that the Content-Type is set to "text/xml".
Apple Watch
For owners of the Apple Watch, it is possible to work with API Tester using this device. It could be very convenient when you have a handy instrument to work fast with your current requests. Using API Tester with Apple Watch, you can:
Get quick access to the requests list.
Run any request without using mobile phone.
Have access to the app even if you are far away from phone or any other device.
Integration with Apple Watch offers an opportunity to perform different actions with APIs without using any other devices. This is especially helpful in cases when you want to do a quick action or command.
Widgets
IOS platform supports very helpful feature named Widgets, which offers an opportunity to personalize your mobile device and make it more convenient for users. To work faster with your current requests, it is now possible to add API Tester widgets on the home screen and get quick access to the app. To do so:
Open the home screen on your mobile device, touch and hold the empty area until your apps jingle.
In the top left-hand corner of the screen you will see the Plus button, touch it and the widget menu will appear.
Find API Tester app manually in the list of apps, or search for it using the search field.
Choose from the three available widget sizes and set the requests you want to see on the widget.
Tap Add Widget, then tap Done.
And that’s it! Now you have access to the most relevant requests of your collection. This is extremely helpful because you will have any requests from the API tester on your main screen. And to open it you will just need to tap on the request in the Widget, and it will be automatically opened in the app.
Shortcuts
Another one great feature which allows getting quick access to the API tester app on IOS platform is Shortcuts. This is a great tool which makes running requests in API Tester even easier. To use Shortcuts for API tester, you will need to:
Install Shortcuts app on your device.
Open the app on My Shortcuts screen and tap on the Plus button in the right upper corner.
Use "Search for apps and actions" button to search for API Tester and select the action.
Name your Shortcut and add the settings you need (select the exact request or requests you want to run, date and time when the request should be run, add special conditions for running the request, etc.).
The Shortcuts offer a lot of different useful settings for actions: you can add API Tester Shortcuts to the home screen as well as enabling showing them on your Apple Watch. By creating Shortcuts for the API Tester app, you will be able to automatize your work with different requests.
Run all requests
API Tester supports the function which allows running all requests on your app in one tap. To do so:
Add different set or collection of requests to API Tester.
On the main screen of the app, tap the icon with three dots in the right upper corner.
In the popped up menu, choose option "Run all requests".
Near each request you will see the data about request launch which contains: response code, time, and size. Also, for those requests where path parameters are required, but the value is missing, you will see the note "missing params".
Global Variables
For running requests with common parameters, there is a special function named Global Variables available. It allows using key-value pair for parameters which can be used in requests from one collection or in requests from common API. To set the number of Global Variables, you will need to:
Import or create requests you want to run.
On the main screen of the app and tap the button with three dots in the right upper corner.
Tap "Global Variables" button and the pop-up window will open.
4. Set necessary parameters as a key-value pairs, where "key" is a code word for a parameter’s value, and "value" is a meaning for this parameter.
5. Open request you want to run and place the variable key in double curly braces in the desired value field.
6. Run the request.
You can manage your Global Variables by adding new ones using the "Add Variable" button, or deleting existing ones by swiping any parameter to the left.
This function is extremely convenient in cases when you work on multiple requests or when you need to run all requests simultaneously by using "Run all requests" function.
You can use Global Variables in URL, query and body params, headers and auth to reference different variables.
Last updated