{"info":{"_postman_id":"79af1da7-4506-4c43-b18e-b21b801c7303","name":"AWS Lambda serverless","description":"<html><head></head><body><h1 id=\"get-started-here\">🚀 Get started here</h1>\n<p>This template guides you through CRUD operations (GET, POST, PUT, DELETE), variables, and tests.</p>\n<h2 id=\"🔖-how-to-use-this-template\">🔖 <strong>How to use this template</strong></h2>\n<h4 id=\"step-1-send-requests\"><strong>Step 1: Send requests</strong></h4>\n<p>RESTful APIs allow you to perform CRUD operations using the POST, GET, PUT, and DELETE HTTP methods.</p>\n<p>This collection contains each of these <a href=\"https://learning.postman.com/docs/sending-requests/requests/\">request</a> types. Open each request and click \"Send\" to see what happens.</p>\n<h4 id=\"step-2-view-responses\"><strong>Step 2: View responses</strong></h4>\n<p>Observe the response tab for status code (200 OK), response time, and size.</p>\n<h4 id=\"step-3-send-new-body-data\"><strong>Step 3: Send new Body data</strong></h4>\n<p>Update or add new data in \"Body\" in the POST request. Typically, Body data is also used in PUT request.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"name\": \"Add your name in the body\"\n}\n\n</code></pre><h4 id=\"step-4-update-the-variable\"><strong>Step 4: Update the variable</strong></h4>\n<p>Variables enable you to store and reuse values in Postman. We have created a <a href=\"https://learning.postman.com/docs/sending-requests/variables/\">variable</a> called <code>base_url</code> with the sample request <a href=\"https://postman-api-learner.glitch.me\">https://postman-api-learner.glitch.me</a>. Replace it with your API endpoint to customize this collection.</p>\n<h4 id=\"step-5-add-tests-in-the-tests-tab\"><strong>Step 5: Add tests in the \"Tests\" tab</strong></h4>\n<p>Tests help you confirm that your API is working as expected. You can write test scripts in JavaScript and view the output in the \"Test Results\" tab.</p>\n<img src=\"https://content.pstmn.io/b5f280a7-4b09-48ec-857f-0a7ed99d7ef8/U2NyZWVuc2hvdCAyMDIzLTAzLTI3IGF0IDkuNDcuMjggUE0ucG5n\">\n\n<h2 id=\"💪-pro-tips\">💪 Pro tips</h2>\n<ul>\n<li>Use folders to group related requests and organize the collection.</li>\n<li>Add more <a href=\"https://learning.postman.com/docs/writing-scripts/intro-to-scripts/\">scripts</a> in \"Tests\" to verify if the API works as expected and execute workflows.</li>\n</ul>\n<h2 id=\"💡related-templates\">💡Related templates</h2>\n<p><a href=\"https://go.postman.co/redirect/workspace?type=personal&amp;collectionTemplateId=e9a37a28-055b-49cd-8c7e-97494a21eb54&amp;sourceTemplateId=ddb19591-3097-41cf-82af-c84273e56719\">API testing basics</a><br><a href=\"https://go.postman.co/redirect/workspace?type=personal&amp;collectionTemplateId=e9c28f47-1253-44af-a2f3-20dce4da1f18&amp;sourceTemplateId=ddb19591-3097-41cf-82af-c84273e56719\">API documentation</a><br><a href=\"https://go.postman.co/redirect/workspace?type=personal&amp;collectionTemplateId=31a9a6ed-4cdf-4ced-984c-d12c9aec1c27&amp;sourceTemplateId=ddb19591-3097-41cf-82af-c84273e56719\">Authorization methods</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"🚀 Get started here","slug":"get-started-here"}],"owner":"22926184","collectionId":"79af1da7-4506-4c43-b18e-b21b801c7303","publishedId":"2sA35K1Kqj","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-04-03T07:20:13.000Z"},"item":[{"name":"get all users","event":[{"listen":"test","script":{"id":"75120273-d891-48a1-a1ee-a7175d30465e","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}}],"id":"23c4cdb1-0793-4b70-b12a-98710f9fbf06","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://m2h8bypvdf.execute-api.ap-south-1.amazonaws.com/dev/users","description":"<p>This is a GET request and it is used to \"get\" data from an endpoint. There is no request body for a GET request, but you can use query parameters to help specify the resource you want data on (e.g., in this request, we have <code>id=1</code>).</p>\n<p>A successful GET response will have a <code>200 OK</code> status, and should include some kind of response body - for example, HTML web content or JSON data.</p>\n","urlObject":{"path":["users"],"host":["https://m2h8bypvdf.execute-api.ap-south-1.amazonaws.com/dev"],"query":[],"variable":[]}},"response":[{"id":"00c6ffc0-6201-479b-968e-d898b485c7a4","name":"get all users success","originalRequest":{"method":"GET","header":[],"url":"https://m2h8bypvdf.execute-api.ap-south-1.amazonaws.com/dev/users"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 02 Apr 2024 11:43:14 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"39"},{"key":"Connection","value":"keep-alive"},{"key":"x-amzn-RequestId","value":"432f266a-91f5-4483-826f-5dc627b6b1b3"},{"key":"x-amz-apigw-id","value":"VmJVAH36BcwEYqA="},{"key":"X-Amzn-Trace-Id","value":"Root=1-660bef52-48b4569b1fc0b8393786f0bb;Parent=24e72eff411040a4;Sampled=0;lineage=a01657b8:0"}],"cookie":[],"responseTime":null,"body":"{\n    \"users\": [\n        {\n            \"id\": 1,\n            \"name\": \"mihir\"\n        }\n    ]\n}"}],"_postman_id":"23c4cdb1-0793-4b70-b12a-98710f9fbf06"},{"name":"create a user","event":[{"listen":"test","script":{"id":"8f186800-7563-4088-b067-df68c3245772","exec":["pm.test(\"Successful POST request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201]);","});",""],"type":"text/javascript","packages":{}}}],"id":"3936598d-9840-487f-8253-4dac04dd3eee","request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"id\" : 1,\n    \"username\" : \"mihir\"\n}","options":{"raw":{"language":"json"}}},"url":"https://m2h8bypvdf.execute-api.ap-south-1.amazonaws.com/dev/users","description":"<p>This is a POST request, submitting data to an API via the request body. This request submits JSON data, and the data is reflected in the response.</p>\n<p>A successful POST request typically returns a <code>200 OK</code> or <code>201 Created</code> response code.</p>\n","urlObject":{"path":["users"],"host":["https://m2h8bypvdf.execute-api.ap-south-1.amazonaws.com/dev"],"query":[],"variable":[]}},"response":[{"id":"bfb3e943-9582-49a9-bc30-2aebff96f083","name":"create a user success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"id\" : 1,\n    \"name\" : \"mihir\"\n}","options":{"raw":{"language":"json"}}},"url":"https://m2h8bypvdf.execute-api.ap-south-1.amazonaws.com/dev/users"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 02 Apr 2024 11:43:00 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"79"},{"key":"Connection","value":"keep-alive"},{"key":"x-amzn-RequestId","value":"65f37187-2c61-42ee-9856-dd8885581a23"},{"key":"x-amz-apigw-id","value":"VmJStGBuhcwEY6Q="},{"key":"X-Amzn-Trace-Id","value":"Root=1-660bef44-398c0bdd5eedf13d36493772;Parent=523960b7065217cd;Sampled=0;lineage=a01657b8:0"}],"cookie":[],"responseTime":null,"body":"{\n    \"Operation\": \"SAVE\",\n    \"Message\": \"SUCCESS\",\n    \"Item\": {\n        \"id\": 1,\n        \"name\": \"mihir\"\n    }\n}"}],"_postman_id":"3936598d-9840-487f-8253-4dac04dd3eee"},{"name":"Update data","event":[{"listen":"test","script":{"id":"6fb62067-3a4a-44bb-b0f1-b145155f266c","exec":["pm.test(\"Successful PUT request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201, 204]);","});",""],"type":"text/javascript","packages":{}}}],"id":"36764ee9-52c3-49be-a076-acccf02451cb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n\t\"id\" : 1,\n    \"updateKey\" : \"username\",\n    \"updateValue\" : \"mihir new\"\n}","options":{"raw":{"language":"json"}}},"url":"https://m2h8bypvdf.execute-api.ap-south-1.amazonaws.com/dev/users","description":"<p>This is a PUT request and it is used to overwrite an existing piece of data. For instance, after you create an entity with a POST request, you may want to modify that later. You can do that using a PUT request. You typically identify the entity being updated by including an identifier in the URL (eg. <code>id=1</code>).</p>\n<p>A successful PUT request typically returns a <code>200 OK</code>, <code>201 Created</code>, or <code>204 No Content</code> response code.</p>\n","urlObject":{"path":["users"],"host":["https://m2h8bypvdf.execute-api.ap-south-1.amazonaws.com/dev"],"query":[],"variable":[]}},"response":[],"_postman_id":"36764ee9-52c3-49be-a076-acccf02451cb"},{"name":"Delete data","event":[{"listen":"test","script":{"id":"75e41a0e-3a10-45b0-b04c-07becd8e726c","exec":["pm.test(\"Successful DELETE request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 202, 204]);","});",""],"type":"text/javascript","packages":{}}}],"id":"8cc96467-6c89-430a-a505-58dd2e344099","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\r\n    \"id\" : 1\r\n}","options":{"raw":{"language":"json"}}},"url":"https://m2h8bypvdf.execute-api.ap-south-1.amazonaws.com/dev/users","description":"<p>This is a DELETE request, and it is used to delete data that was previously created via a POST request. You typically identify the entity being updated by including an identifier in the URL (eg. <code>id=1</code>).</p>\n<p>A successful DELETE request typically returns a <code>200 OK</code>, <code>202 Accepted</code>, or <code>204 No Content</code> response code.</p>\n","urlObject":{"path":["users"],"host":["https://m2h8bypvdf.execute-api.ap-south-1.amazonaws.com/dev"],"query":[],"variable":[]}},"response":[{"id":"fab9dadf-1d5c-4cbc-9acc-5eb164fcf70f","name":"Delete data","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\r\n    \"id\" : 1\r\n}","options":{"raw":{"language":"json"}}},"url":"https://m2h8bypvdf.execute-api.ap-south-1.amazonaws.com/dev/users"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 02 Apr 2024 11:45:55 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"512"},{"key":"Connection","value":"keep-alive"},{"key":"x-amzn-RequestId","value":"d5c127ad-3080-4381-a72b-69e8e18e9806"},{"key":"x-amz-apigw-id","value":"VmJuEEGwBcwEZpA="},{"key":"X-Amzn-Trace-Id","value":"Root=1-660beff3-6aa7a883172c732342565588;Parent=47117b773c4cb4b2;Sampled=0;lineage=a01657b8:0"}],"cookie":[],"responseTime":null,"body":"{\n    \"Operation\": \"DELETE\",\n    \"Message\": \"SUCCESS\",\n    \"Item\": {\n        \"Attributes\": {\n            \"id\": 1,\n            \"name\": \"mihir\"\n        },\n        \"ResponseMetadata\": {\n            \"RequestId\": \"U910JSHBDJ11HODAS5SBS0C873VV4KQNSO5AEMVJF66Q9ASUAAJG\",\n            \"HTTPStatusCode\": 200,\n            \"HTTPHeaders\": {\n                \"server\": \"Server\",\n                \"date\": \"Tue, 02 Apr 2024 11:45:55 GMT\",\n                \"content-type\": \"application/x-amz-json-1.0\",\n                \"content-length\": \"52\",\n                \"connection\": \"keep-alive\",\n                \"x-amzn-requestid\": \"U910JSHBDJ11HODAS5SBS0C873VV4KQNSO5AEMVJF66Q9ASUAAJG\",\n                \"x-amz-crc32\": \"3934598969\"\n            },\n            \"RetryAttempts\": 0\n        }\n    }\n}"}],"_postman_id":"8cc96467-6c89-430a-a505-58dd2e344099"}],"event":[{"listen":"prerequest","script":{"id":"e6ec565c-0320-4f96-a5f2-fa471f683ce6","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"4a10fb65-d0f0-43ca-826a-44753b90dda5","type":"text/javascript","exec":[""]}}],"variable":[{"key":"id","value":"1"},{"key":"base_url","value":"https://m2h8bypvdf.execute-api.ap-south-1.amazonaws.com/dev"}]}