REST Services Home Page

WS Test Connectivity Service Documentation

Welcome to the WS Test Connectivity Service. This service allows you to test if your client can successfully connect to the API. It supports only GET and OPTIONS requests and provides a JSON response confirming the connection status.

Note for Beginners: This example shows how to make a request using Burp Repeater and the curl command. If you’re new to web services, follow these examples to learn how requests and responses work.

Endpoint

The service is hosted at the following endpoint:

GET /webservices/rest/ws-test-connectivity.php

Request Methods

Step-by-Step Example Using Burp Repeater

Here’s how you can test the connectivity with Burp Repeater:

GET /webservices/rest/ws-test-connectivity.php HTTP/1.1
Host: mutillidae.localhost
Origin: http://mutillidae.localhost
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Accept: application/json
Connection: close
Content-Type: application/json

Instructions:

  1. Open Burp Suite and navigate to the Repeater tab.
  2. Copy the above request and paste it into the Repeater window.
  3. Click Send to receive the response from the server.

Example Using curl (Command Line)

If you prefer the command line, use the following curl command:

curl -X GET "http://mutillidae.localhost/webservices/rest/ws-test-connectivity.php" \
 -H "Host: mutillidae.localhost" \
 -H "Origin: http://mutillidae.localhost" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json"

Instructions:

  1. Open a terminal or command prompt.
  2. Copy and paste the above curl command.
  3. Press Enter to send the request and view the response.

Expected Response

If everything works correctly, you should receive a response like this:

{
    "code": 200,
    "status": "OK",
    "message": "Connection succeeded...",
    "timestamp": "2024-10-27 22:35:12"
}
Troubleshooting Tips:

Learn More

Try experimenting with preflight OPTIONS requests to explore how CORS settings affect the service. This will help you understand how the API behaves in real-world scenarios.