{"info":{"_postman_id":"dd0872fb-7553-40a5-9943-759ddaa9f661","name":"RESTful API Basics #blueprint","description":"<html><head></head><body><h1 id=\"get-started-here\">🚀 Get started here</h1>\n<p>This collection guides you through CRUD operations (GET, POST, PUT, DELETE), variables, and tests.</p>\n<h2 id=\"🔖-how-to-use-this-collection\">🔖 <strong>How to use this collection</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 request 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 and PATCH requests.</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 variable 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 scripts in \"Tests\" to verify if the API works as expected and execute flows.</li>\n</ul>\n<h2 id=\"ℹ️-resources\">ℹ️ Resources</h2>\n<p><a href=\"https://learning.postman.com/docs/sending-requests/requests/\">Building requests</a><br><a href=\"https://learning.postman.com/docs/sending-requests/authorization/\">Authorizing requests</a><br><a href=\"https://learning.postman.com/docs/sending-requests/variables/\">Using variables</a><br><a href=\"https://learning.postman.com/docs/sending-requests/managing-environments/\">Managing environments</a><br><a href=\"https://learning.postman.com/docs/writing-scripts/intro-to-scripts/\">Writing scripts</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":"32109507","collectionId":"dd0872fb-7553-40a5-9943-759ddaa9f661","publishedId":"2sA3Bq3Ans","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-04-22T10:18:25.000Z"},"item":[{"name":"Get data","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript"}}],"id":"65864240-2607-41ce-8ea6-bafadd57f407","request":{"method":"GET","header":[],"url":"https://postman-rest-api-learner.glitch.me//info?id=1","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":["info"],"host":["https://postman-rest-api-learner.glitch.me/"],"query":[{"key":"id","value":"1"}],"variable":[]}},"response":[],"_postman_id":"65864240-2607-41ce-8ea6-bafadd57f407"},{"name":"Post data","event":[{"listen":"test","script":{"exec":["pm.test(\"Successful POST request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201]);","});",""],"type":"text/javascript"}}],"id":"36a06e4c-fabd-47ae-8284-13e82c5b32bd","request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"name\": \"Add your name in the body\"\n}","options":{"raw":{"language":"json"}}},"url":"https://postman-rest-api-learner.glitch.me//info","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":["info"],"host":["https://postman-rest-api-learner.glitch.me/"],"query":[],"variable":[]}},"response":[],"_postman_id":"36a06e4c-fabd-47ae-8284-13e82c5b32bd"},{"name":"Update data","event":[{"listen":"test","script":{"exec":["pm.test(\"Successful PUT request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201, 204]);","});",""],"type":"text/javascript"}}],"id":"0592cb79-0448-4af4-8a12-bd8af9b8fd2c","request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"name\": \"Add your name in the body\"\n}","options":{"raw":{"language":"json"}}},"url":"https://postman-rest-api-learner.glitch.me//info?id=1","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":["info"],"host":["https://postman-rest-api-learner.glitch.me/"],"query":[{"key":"id","value":"1"}],"variable":[]}},"response":[],"_postman_id":"0592cb79-0448-4af4-8a12-bd8af9b8fd2c"},{"name":"Delete data","event":[{"listen":"test","script":{"exec":["pm.test(\"Successful DELETE request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 202, 204]);","});",""],"type":"text/javascript"}}],"id":"c58fd723-bc1f-42f7-b2cc-af99a1b0eaf0","request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://postman-rest-api-learner.glitch.me//info?id=1","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":["info"],"host":["https://postman-rest-api-learner.glitch.me/"],"query":[{"key":"id","value":"1"}],"variable":[]}},"response":[],"_postman_id":"c58fd723-bc1f-42f7-b2cc-af99a1b0eaf0"}],"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""]}},{"listen":"test","script":{"type":"text/javascript","exec":[""]}}],"variable":[{"id":"1201dbdb-0b8a-4809-bb26-7d15840cecbb","key":"id","value":"1"},{"id":"4f5663f2-f788-4ca4-bf85-4059885db5b2","key":"base_url","value":"https://postman-rest-api-learner.glitch.me/"}]}