Configuring an API Endpoint
Before executing an API test in Robonito, you must properly configure the endpoint details. This involves specifying the target URL, query parameters, HTTP headers, request body payloads, and any necessary authentication methods.
Follow this guide to securely and accurately configure your API requests.
1. Defining the Endpoint URL
The URL is the base address of the API service you are testing.
- Action: Enter the complete URL of the target API endpoint into the
Endpoint URLfield. - Example:
https://api.example.com/v1/users
2. Setting Query Parameters
Query parameters let you modify requests and are appended to the URL (e.g., ?search=robonito&sort=asc).
You can configure query parameters in two ways:
- Directly in the URL Field: Type them directly at the end of the Endpoint URL.
- Via the Parameters Tab (Recommended):
- Navigate to the Parameters tab.
- Click Add new +.
- Enter the Key and Value for each parameter. This method is visually cleaner and less prone to syntax errors.
3. Adding HTTP Headers
Headers provide critical metadata to the server, such as the type of content you are sending or the client's information.
- Action:
- Go to the Headers tab.
- Click Add new + to define a new header.
- Provide the Header Name (e.g.,
Content-Type) and Value (e.g.,application/json).
- Common Examples:
Content-Type,Accept,User-Agent. (Note: For Authorization, it is recommended to use the dedicated Authentication tab).
4. Constructing the Request Body
If your request involves sending data (typically used with POST, PUT, or PATCH methods), you will configure the payload here.
- Format: Robonito expects the request body to be formatted as JSON.
- Action: Paste or type your JSON payload into the body editor.
Example (Creating a User):
{
"username": "johndoe",
"email": "johndoe@example.com",
"role": "admin"
}
5. Configuring Authentication
Securely authenticate your test requests using Robonito's built-in Authentication tab.
- Action: Navigate to the Authentication tab, select the required format, and provide your credentials.
- Supported Methods:
- Bearer Token: Supply the token string.
- Basic Auth: Supply your username and password.
- API Key: Define the key name, its value, and where it should be injected (e.g., Query Params or Header).
Saving Your Configuration
Important: Changes made in the API configuration workspace are not auto-saved. Remember to explicitly click the Save button before navigating away to prevent data loss.
Executing the Test
Once your configuration is complete and saved:
- Click the Run Test button located at the top of the interface.
- Robonito will dispatch the request to the target server.
- Review the captured response in real-time, including the HTTP status code, response time, server headers, the JSON body payload, and the results of any configured assertions.