Skip to content

Instantly share code, notes, and snippets.

@developer1622
Created January 2, 2022 09:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save developer1622/025eae8ade628ffc8a5d5238371958ad to your computer and use it in GitHub Desktop.
Save developer1622/025eae8ade628ffc8a5d5238371958ad to your computer and use it in GitHub Desktop.
Postman collection for Basic REST API on contact
{
"info": {
"_postman_id": "047925bc-b6fe-4581-9d0c-8d8c10061cb2",
"name": "Contacts",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Index of the server",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:8080",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080"
}
},
"response": []
},
{
"name": "Fetch all Contact list",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:8080/contacts",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"contacts"
]
}
},
"response": []
},
{
"name": "Fetch contact by email",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:8080/contacts/pankaj@example.com",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"contacts",
"pankaj@example.com"
]
}
},
"response": []
},
{
"name": "Create Contact",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"somename\",\r\n \"phone_number\": \"12345\",\r\n \"alternate_phone_number\": \"6789\",\r\n \"email\": \"somename@example.com\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:8080/contacts",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"contacts"
]
}
},
"response": []
},
{
"name": "Delete contact",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "http://localhost:8080/contacts/somename@example.com",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"contacts",
"somename@example.com"
]
}
},
"response": []
},
{
"name": "Update contact",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"somename\",\r\n \"phone_number\": \"00000\",\r\n \"alternate_phone_number\": \"877878\",\r\n \"email\": \"somename@example.com\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:8080/contacts",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"contacts"
]
}
},
"response": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment