Logo
Markus Postman Training API Documentation

Get list

GET {{url}}/records

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 




RESPONSES

status OK

{ "welcome": "You're using the API Adoption course! Check out the 'data' object below to see the values returned by this API request. Click **Visualize** to see the 'tutorial' guiding you through next steps - do this for every request in the collection!", "data": { "records": [ { "id": "NnYJVbspy", "phrase": "Cross-group bifurcated interface", "pic": "http://placeimg.com/640/480/cats", "num": 6 }, { "id": "xCAzUfMGZu", "phrase": "Optimized clear-thinking open system", "pic": "http://placeimg.com/640/480/people", "num": 99 }, { "id": "h4EKS71hmx", "phrase": "Re-engineered didactic array", "pic": "http://placeimg.com/640/480/nightlife", "num": 68 }, { "id": "1jNu_eCHVt", "phrase": "Ameliorated bandwidth-monitored benchmark", "pic": "http://placeimg.com/640/480/nightlife", "num": 89 }, { "id": "5tjcLhHESQ", "phrase": "Profit-focused upward-trending conglomeration", "pic": "http://placeimg.com/640/480/cats", "num": 68 } ] }, "tutorial": { "title": "You retrieved all records!", "intro": "We've used examples to populate the collection documentation, but we can also use them to return mock data instead of connecting to our production API.", "steps": [ { "note": "Save the response to this request as an example like you did before and return here. We're going to create a mock server for this collection, and you will be able to switch between the mock API and the 'production' one we've been using so far, using an environment. The URL for the API is stored in a collection variable, but we're going to store the mock one in an environment variable." }, { "note": "> ✏️ Postman variable scope means that if the environment and collection have a variable with the same name, the value in the environment will override the collection value, so we're going to add a `url` var to the environment and it will determine where the requests send–as long as the environment is selected. If we deselect the environment, the request addresses will again use the collection variable URL value." } ], "next": [ { "step": "In **Mock Servers** on the left, create a new mock server and select the existing `Galaxy API Adoption` collection. Enter a name for the mock, check **Save the mock server URL as an environment variable** and create the mock server before returning here to `Get list`." }, { "step": "Select the new environment from the list at the top right of Postman so that it becomes the _active_ environment (it will have the same name as the mock). Click the eye button to see that the value of the variable has been set to the new mock server. In the `Get list` request hover over the `url` in the address to see that it now points at the mock." }, { "step": "**Send** to make sure the request returns the same response. Try out another request you added an example to, to check that it still works from the mock URL." }, { "step": "> ✏️ If you're in doubt about where a request sent, check out the **Console** at the bottom left of Postman. Note that the only requests with saved examples will return a response from the mock server. 😉" }, { "step": "Before you move on–**deselect the environment using the control at the top right** so that it reads `No environment`." }, { "step": "#### Visualizing data\n\nBefore we finish with this collection, let's take a look at what you can do with data visualization in Postman. The instructions you've been reading use a script in the collection that renders a tutorial in the **Visualize** view, based on the response data returned by the API. You can do much more than this to make your response data come to life, including charts and graphs. 🖼️📊" }, { "step": "Go back into `Get customer` and open **Tests**. You'll see some code in there with part of it commented out. Remove the `/*` and `*/` at the start and end of the script (so that the code is no longer commented out). Hit **Send** to see what the visualizer script does with the response data. Tak
Curl
curl -X GET 'prod-api/records'

ENDPOINTS