Step 5: Test the API with the Mock URL
After successfully deploying your API in Data Equity Studio, you will receive a Mock URL in the Properties section. This mock URL represents the endpoint for your API, where you can interact with it using popular tools like Postman or any other HTTP client.
How to Use the Mock URL
-
Locate the Mock URL:
- Go to the Properties tab in the API Editor after deployment.
- You will find the Mock URL provided for your API.
-
Copy the Mock URL:
- Copy the URL for use in testing.
-
Test the API Using Postman:
- Open Postman or another HTTP client tool.
- Paste the Mock URL into the request URL field.
- Choose the HTTP verb that matches your operation (e.g.,
GET
,POST
,PUT
,DELETE
). - Configure any necessary headers, such as
Content-Type: application/json
, if required. - Send the request and observe the response.
-
Example Postman Request:
- URL:
https://mock.dataequity.io/1/users
- Method:
GET
(for retrieving all users) - Response: The mock response will return JSON data as defined in your API.
- URL:
Testing in Action
The mock data generated by Data Equity Studio will be returned, allowing you to test the API's behavior without the need for a backend implementation. You can simulate various scenarios based on the mock data and ensure your API is working as expected.
With the Mock URL in hand, you can test and interact with your API just as you would with a live one. This allows for quick validation of your design and helps streamline the development process. Happy testing! 🚀