You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

156 lines
3.6 KiB

{
"info": {
"_postman_id": "8ec8ce61-a7a5-4f6f-ad3f-0bc62d576f43",
"name": "ContactsAPI",
"description": "API calls used for testing the contacts REST API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Get all contacts",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:8080/api/v1/contacts/",
"host": [
"localhost"
],
"port": "8080",
"path": [
"api",
"v1",
"contacts",
""
]
}
},
"response": []
},
{
"name": "Create contact",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"name\": {\n \"first\": \"z\",\n \"middle\": \"z\",\n \"last\": \"z\"\n },\n \"address\": {\n \"street\": \"street\",\n \"city\": \"city\",\n \"state\": \"state\",\n \"zip\": \"zip\"\n },\n \"phone\": [\n {\n \"number\": \"999-999-9999\",\n \"type\": \"home\"\n }\n ],\n \"email\": \"e@mail.com\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "localhost:8080/api/v1/contacts",
"host": [
"localhost"
],
"port": "8080",
"path": [
"api",
"v1",
"contacts"
]
}
},
"response": []
},
{
"name": "Update contact",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"name\": {\n \"first\": \"y\",\n \"middle\": \"y\",\n \"last\": \"y\"\n },\n \"address\": {\n \"street\": \"street\",\n \"city\": \"city\",\n \"state\": \"state\",\n \"zip\": \"zip\"\n },\n \"phone\": [\n {\n \"number\": \"999-999-9999\",\n \"type\": \"mobile\"\n }\n ],\n \"email\": \"e@mail.com\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "localhost:8080/api/v1/contacts/5",
"host": [
"localhost"
],
"port": "8080",
"path": [
"api",
"v1",
"contacts",
"5"
]
},
"description": "Modify the ID, in this case '5', at the end of the URL to the desired contact ID and modify fields in the message body as needed."
},
"response": []
},
{
"name": "Delete contact",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "localhost:8080/api/v1/contacts/5",
"host": [
"localhost"
],
"port": "8080",
"path": [
"api",
"v1",
"contacts",
"5"
]
},
"description": "Modify the ID, in this case '5', at the end of the URL to the desired contact ID as needed."
},
"response": []
},
{
"name": "Get call list",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:8080/api/v1/contacts/call-list",
"host": [
"localhost"
],
"port": "8080",
"path": [
"api",
"v1",
"contacts",
"call-list"
]
}
},
"response": []
},
{
"name": "Get single contact by ID",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:8080/api/v1/contacts/1",
"host": [
"localhost"
],
"port": "8080",
"path": [
"api",
"v1",
"contacts",
"1"
]
},
"description": "Modify the ID, in this case '1', at the end of the URL to the desired contact ID."
},
"response": []
}
]
}