ToolJi
HomeCaptureTools
HomeAll ToolsCaptureRequest
Developer Guide & Complete Reference

Test API Online – Complete Guide to Testing REST APIs

Learn how to test APIs online with GET, POST, PUT, PATCH, and DELETE requests. Send headers and JSON payloads, inspect responses, and test REST APIs directly in your browser without installing heavy desktop software.

Build and send API requests directly from your browser. 100% free • No installation required.

An API (Application Programming Interface) is the foundational glue of modern digital software. It allows web applications, mobile apps, databases, and third-party microservices to communicate with one another securely and standardly over the HTTP protocol.

Whether you are building a custom web application, integrating payment gateways, inspecting webhooks, or learning backend development, API testing is the process of sending test requests to an endpoint to verify that it returns the expected HTTP status code, headers, and JSON response body.

Historically, developers had to download and install bloated 200MB+ desktop software like Postman or Insomnia just to test a single GET or POST request. Today, modern browser-based online API testing tools—such as ToolJi API Testing Lab—allow developers, testers, and students to configure, send, inspect, and debug API requests directly inside their web browser with zero installation.

What Is API Testing?

API testing is the software engineering practice of validating that a server-side API endpoint meets expectations for functionality, reliability, performance, and security. Unlike UI testing (which checks visual buttons and forms), API testing operates directly at the business logic layer without relying on a graphical user interface.

1. Client

Your browser or mobile app triggering the request.

2. Request

The HTTP method, URL, headers, and JSON payload.

3. Server

The backend server processing the business logic.

4. Response

The status code, response headers, and output JSON.

Architecture Sequence DiagramHTTP Protocol
CLIENT (Browser)
↓ API REQUEST (GET/POST) ↓Headers + Query + JSON
API SERVER
↓ API RESPONSE ↓200 OK + JSON Payload
CLIENT (Inspector)

How to Test an API Online (Step-by-Step)

Testing an API endpoint in your browser follows a straightforward 12-step engineering workflow:

1

Open an online API tester

Launch ToolJi API Testing Lab in your web browser.

2

Enter the API endpoint URL

Paste your target endpoint (e.g., https://api.example.com/v1/users).

3

Select the HTTP method

Choose GET, POST, PUT, PATCH, or DELETE from the method selector.

4

Add query parameters

Configure key-value URL parameters like ?page=1&limit=10.

5

Configure HTTP headers

Add headers like Content-Type: application/json or Accept.

6

Add authentication

Include Bearer Tokens, Basic Auth credentials, or API Keys.

7

Provide request body

For POST/PUT/PATCH, enter valid JSON payload data in the body tab.

8

Click Send

Dispatch the HTTP request directly from your browser workspace.

9

Inspect response body

View formatted JSON tree output or raw text payload response.

10

Check HTTP status code

Verify if the server responded with 200 OK, 201 Created, or an error.

11

Inspect response headers

Review server content-type, cache headers, and rate limits.

12

Analyze response time

Measure execution latency in milliseconds to evaluate performance.

Ready to try it right now?

Test your first GET or POST API endpoint in under 30 seconds.

Test API Online with ToolJi →

HTTP Methods You Need to Know

HTTP methods (verbs) inform the server what operation you wish to perform on the target API resource.

MethodCommon PurposeHas Body?Example Use Case
GETFetch / retrieve data from serverNoGET /api/v1/users
POSTCreate new resource on serverYes (JSON)POST /api/v1/users
PUTReplace entire existing resourceYes (JSON)PUT /api/v1/users/123
PATCHPartially update resource fieldsYes (JSON)PATCH /api/v1/users/123
DELETERemove resource from databaseOptionalDELETE /api/v1/users/123

GET API Example

A GET request is used exclusively to fetch data from an endpoint without making state changes.

GET Request EndpointHTTP GET

https://jsonplaceholder.typicode.com/users?limit=2

Query Params: limit = 2

Headers: Accept: application/json

200 OK • 124 ms • Response JSON
[
  {
    "id": 1,
    "name": "Leanne Graham",
    "username": "Bret",
    "email": "Sincere@april.biz",
    "company": { "name": "Romaguera-Crona" }
  }
]

POST API Example

A POST request creates a new record on the server. You must specify the header Content-Type: application/json and send a JSON string in the request body.

Request Body (JSON)Content-Type: application/json
{
  "name": "John Doe",
  "email": "john@example.com",
  "role": "Developer"
}
Server Response (201 Created)185 ms
{
  "id": 101,
  "name": "John Doe",
  "email": "john@example.com",
  "role": "Developer",
  "createdAt": "2026-08-31T22:45:00Z"
}

Testing API Headers & Security

HTTP headers pass additional metadata between client and server. Common headers include:

Content-Type: application/json

Defines format of payload sent in body.

Authorization: Bearer YOUR_TOKEN

Passes authentication security token.

Accept: application/json

Tells server what format response client expects.

User-Agent: ToolJi/1.0

Identifies client software making request.

Security Best Practice

Never paste private production API secrets, database passwords, or main production credentials into web tools. Always use sandbox API keys or test environment tokens during online API testing.

Testing API Query Parameters

Query parameters append filter criteria to your URL starting with a ? symbol and joined with &:

Base URL: https://api.store.com/v1/products+ Query Params

?page=1

&limit=10

&search=phone

Final Request URL: https://api.store.com/v1/products?page=1&limit=10&search=phone

Testing JSON Request Bodies

Methods like POST, PUT, and PATCH require valid JSON formatted request strings.

Pro Tip for JSON Debugging:

If your API returns a 400 Bad Request error due to a syntax typo (such as a missing comma or unquoted key), validate your payload using ToolJi's JSON Formatter & Validator.

Understanding API Responses

When an API executes, it returns four key metrics in its response:

200 OKHTTP Status Code
142 msResponse Latency
1.4 KBPayload Size
application/jsonContent Type Header

HTTP Status Codes Explained

CodeStatus NameMeaning & Beginner Explanation
200OKRequest succeeded and returned requested data.
201CreatedPOST request successfully created a new resource.
204No ContentSucceeded but returns no response body (common in DELETE).
400Bad RequestClient sent invalid syntax, bad JSON, or missing parameters.
401UnauthorizedMissing or invalid Authorization Bearer token/API Key.
403ForbiddenAuthenticated client lacks permission to access resource.
404Not FoundTarget URL endpoint or resource ID does not exist.
409ConflictResource collision (e.g. email address already registered).
422Unprocessable EntityValid JSON structure but failed server validation checks.
429Too Many RequestsClient exceeded rate limit quota set by server.
500Internal Server ErrorBackend crashed or threw an unhandled server exception.
502Bad GatewayProxy or gateway server received invalid upstream response.
503Service UnavailableServer is temporarily overloaded or undergoing maintenance.

Common API Errors & How to Fix Them

CORS Error (Failed to fetch)

What it means: The API server lacks Access-Control-Allow-Origin headers for web browsers.

What to check: Enable ToolJi's Server Proxy toggle to route requests through our server-side API proxy.

401 Unauthorized

What it means: The API token is missing, expired, or malformed.

What to check: Verify Authorization: Bearer YOUR_KEY header or token expiry timestamp.

400 Bad Request / Invalid JSON

What it means: Syntax error in body payload or missing Content-Type header.

What to check: Validate JSON formatting and ensure Content-Type is set to application/json.

What Is CORS and Why Can't I Test Some APIs in a Browser?

Cross-Origin Resource Sharing (CORS) is a browser security standard. When a web page running on toolji.com sends an HTTP request directly to a third-party server (e.g. api.example.com), the web browser sends a preflight check. If api.example.com does not return an Access-Control-Allow-Origin header permitting browser access, your web browser blocks the request for security reasons.

Because of CORS, not every API can be called directly from client-side browser JavaScript. To solve this limitation cleanly, ToolJi API Testing Lab provides an integrated Server-Side Proxy Mode (`/api/api-proxy`) that safely forwards your HTTP request from our backend server, bypassing browser CORS restrictions while preserving your request headers and parameters.

How to Test a REST API Online

REST (Representational State Transfer) APIs structure URLs around nouns (resources) like /users or /orders. Testing a REST API follows a standard CRUD lifecycle:

1. GET /api/v1/users → List all users

2. POST /api/v1/users → Create user with JSON body

3. PUT /api/v1/users/42 → Replace user #42

4. PATCH /api/v1/users/42 → Update email of user #42

5. DELETE /api/v1/users/42 → Delete user #42

Online API Tester vs Desktop API Tools

Feature / MetricOnline Browser API Tester (ToolJi)Desktop API Client (Postman / Insomnia)
InstallationZero install • Opens in 1 secondRequires 200MB+ software download
Speed & PortabilityWorks on Desktop, Mobile, ChromebooksRequires desktop OS installation
cURL Import & Code GenInstant paste & export JS, Python, cURLSupported via desktop UI menus
CORS LimitsRequires Server Proxy for CORS-blocked sitesNative OS bypasses CORS
Account Registration100% Free • No signup requiredOften prompts mandatory user cloud login

How to Test an API Without Installing Software

If you are on a restricted work computer, school laptop, or mobile phone where you cannot install software, follow these 7 simple steps:

  1. Open your web browser (Chrome, Edge, Safari, Firefox).
  2. Navigate to ToolJi's API Testing Lab.
  3. Enter your target endpoint URL.
  4. Select the HTTP method (GET, POST, etc.).
  5. Add headers or JSON request body payload if required.
  6. Click Send Request.
  7. Inspect your JSON response, status code, and latency instantly.

API Testing Checklist

Correct endpoint URL and protocol (https://)
Correct HTTP method selected (GET, POST, etc.)
Query parameters properly formatted
Required headers configured (Content-Type, Accept)
Valid authentication token / API Key provided
Valid JSON syntax in request body payload
Content-Type set to application/json for POST/PUT
Expected HTTP status code returned (200 / 201)
Response JSON schema matches contract expectations
Response headers inspected for rate limits
Latency & response time within target SLA
Error scenarios tested (invalid data, 401, 404)

Practical API Testing Scenarios

Scenario 1: Get User List

GET https://jsonplaceholder.typicode.com/users

What to check: Status 200 OK, returns array of 10 users.

Scenario 2: Create User

POST https://jsonplaceholder.typicode.com/users

What to check: Status 201 Created, returns new user ID.

Scenario 3: Update Email

PATCH https://jsonplaceholder.typicode.com/users/1

What to check: Status 200 OK with updated email key.

Scenario 4: Test 404 Error

GET https://jsonplaceholder.typicode.com/unknown_route

What to check: Status 404 Not Found response.

API Testing for Beginners (Roadmap)

START HERE
1. Understand API
2. Learn HTTP Methods
3. Try GET Request
4. Add Query Params
5. Add HTTP Headers
6. Try POST + JSON
7. Check Status Codes
8. Add Authentication
9. Troubleshoot Errors
Flagship ToolJi Developer Utility

Test APIs Directly in Your Browser

ToolJi API Testing Lab packs full API testing capabilities into a fast, privacy-friendly browser client. Build, send, inspect, import cURL, and export client code with zero installation.

GET, POST, PUT, PATCH, DELETE
Query Parameters & Headers
JSON, Form Data & Raw Payload
Bearer & Basic Authentication
Interactive JSON Response Tree
cURL Import & Code Generation
FAQ Reference

Frequently Asked Questions

Ready to test an API?

Build, send, and inspect API requests directly from your browser with ToolJi API Testing Lab.

Need help understanding APIs first? Start with the guide above.