Skip to content

Can We Use Postman Online

API Testing Blog

The Power of Postman in the Cloud: A Guide to Online API Testing

Postman, a popular API platform, offers both a desktop application and a web-based interface. While the desktop app offers more features and offline capabilities, the online version, Postman for Web, provides a convenient and accessible way to test APIs.

1. Why Use Postman Online?

There are several reasons why you might prefer to use Postman online:

  1. Accessibility: Access Postman from any device with a web browser, without needing to download or install software.

  2. Collaboration: Seamlessly share and collaborate on collections and workspaces with your team, even if they don’t have the desktop app.

  3. Centralized Management: Manage your API testing environment and documentation in one central location.

  4. Easy Setup: No need for complex installation processes; simply create an account and start testing.

2. Getting Started with Postman for Web

  1. Create a Postman Account: Go to https://www.postman.com/ and sign up for a free account.

  2. Access Postman Web:

    • You can access Postman for Web directly through your account on the website.
    • You can also use the dedicated web version, available at https://web.postman.io/.

3. Building API Requests:

  1. Start a Request: Click on the “New” button to create a new request.

  2. Choose Method: Select the HTTP method you want to use (GET, POST, PUT, DELETE, etc.).

  3. Enter URL: Add the API endpoint you want to test.

Example: Getting Data with GET Request

Let’s say you want to retrieve data from a simple API endpoint that returns a list of users.

// API Endpoint
https://dummyjson.com/users

Steps:

  1. Select the GET method.
  2. Paste the API endpoint into the “Enter request URL” field.
  3. Click “Send”.

Result:

Postman will display the response from the API. You’ll see the status code, headers, and the response body containing the user data.

Sample Response:

{
"users": [
{
"id": 1,
"firstName": "Ashton",
"lastName": "Cox",
"email": "ashton.cox@example.com",
"phoneNumber": "1-770-736-8031 x56442",
"website": "http://www.ashtoncox.com",
...
},
{
"id": 2,
...
},
...
]
}

4. Sending Data with POST Requests

Example: Creating a New User with POST Request

Let’s create a new user using the same dummy API.

  1. Select POST method: Select the POST method.

  2. Enter API Endpoint: Paste the API endpoint for creating users:

    https://dummyjson.com/users/add
  3. Add Request Body:

    • Click the “Body” tab and choose the “raw” option.
    • Select “JSON” from the dropdown.
    • Enter the JSON data representation of the user you want to create.

Sample JSON Body:

{
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phoneNumber": "1234567890",
"website": "https://johndoe.com"
}
  1. Send Request: Click “Send”.

Result:

Upon successful completion, the API might return a 201 created status code and a JSON representation of the newly created user.

5. Using Environment Variables:

Postman allows you to store dynamic values in environment variables, making your tests reusable for different scenarios.

  1. Create an Environment: Go to “Environments” and click “Add environment.”

  2. Add Variables:

    • Give your environment a name.
    • Add variables with keys and values.

    Example:

    KeyValue
    baseUrlhttps://dummyjson.com
    userId1
  3. Use Variables in Requests: In your requests, you can directly reference environment variables using double curly braces ({{variable_name}}).

Example:

{{baseUrl}}/users/{{userId}}

6. Using Collections:

Collections keep your API requests organized. You can group related requests together and even document them.

  1. Create a Collection: Click the “Collections” tab and create a new collection.

  2. Add Requests to Collection: Drag and drop your existing requests into the collection or create new requests within it.

  3. Add Documentation: Use the “Description” field to add details about the collection and individual requests.

7. Postman for Web Limitations

While Postman for Web offers a powerful way to test APIs, it lacks some features available in the desktop app:

  • Offline Access: You can’t use Postman for Web offline.
  • Advanced Features: Limited features like scripting and mocking compared to the desktop app.

Conclusion:

Postman for Web provides a convenient and accessible online platform for API testing. Its ease of use, collaboration features, and integration with environment variables make it an excellent choice for both beginners and experienced testers. While some advanced functionality is limited compared to the desktop version, Postman for Web is a powerful tool for testing and managing your APIs from anywhere.

API Testing Blog