{"info":{"_postman_id":"320ab64c-a95c-43bd-92fd-7ba930bd787c","name":"REST API basics: CRUD, test & variable","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":"32381127","collectionId":"320ab64c-a95c-43bd-92fd-7ba930bd787c","publishedId":"2s9YyweKDA","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-02-05T09:03:38.000Z"},"item":[{"name":"User","item":[{"name":"로그인","event":[{"listen":"test","script":{"id":"f78d4c5b-5453-44ef-a62c-dbd9c7d7ef0c","exec":["pm.test(\"Successful POST request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201]);","});",""],"type":"text/javascript","packages":{}}}],"id":"3101aad3-1015-40c4-bd3b-a2c6cb90ff1f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"username\":\"robbie\",\n    \"password\":\"1234\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/users/login","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":{"protocol":"http","port":"8080","path":["api","users","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"3101aad3-1015-40c4-bd3b-a2c6cb90ff1f"},{"name":"회원가입","id":"c1ddf6f4-2c40-40d6-919d-a49c26bbf86b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"robbie\",\r\n    \"password\":\"Ab341234\",\r\n    \"email\":\"Robbie123@gmail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/user/signup","urlObject":{"protocol":"http","port":"8080","path":["api","user","signup"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c1ddf6f4-2c40-40d6-919d-a49c26bbf86b"},{"name":"로그인2","id":"fabbb8fc-bcb9-4cbd-ba61-2ad55942fb4f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n\t\"username\":\"robbie\",\r\n    \"password\":\"Ab341234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/users/login","urlObject":{"protocol":"http","port":"8080","path":["api","users","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"fabbb8fc-bcb9-4cbd-ba61-2ad55942fb4f"},{"name":"로그아웃","id":"f1196c54-389a-4244-b447-a56339ce1d38","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJyb2JiaWUiLCJleHAiOjE3MTA0OTAzOTF9.T_K4DPeMKVg1SFnJ-ZL2iR6OIMtBWhdzbA14G5jQHvE","type":"text"},{"key":"X-REFRESH-TOKEN","value":"eyJ0eXAiOiJBQ0NFU1NfVE9LRU4iLCJhbGciOiJIUzI1NiIsInJlZERhdGUiOjE3MTA0ODY3OTE3NDN9.eyJhdXRoIjoyLCJleHAiOjE3MTA1NzMxOTF9.yCphl98q82nX6dxzfBYnSMT1hJD7_8x29Yyqo3Ix9yA","type":"text"}],"url":"http://localhost:8080/api/users/logout","urlObject":{"protocol":"http","port":"8080","path":["api","users","logout"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"f1196c54-389a-4244-b447-a56339ce1d38"},{"name":"카카오 로그인","id":"e724df2b-d743-47f3-a67f-a58065473962","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"e724df2b-d743-47f3-a67f-a58065473962"}],"id":"ede5d174-9f9d-42bb-a3ef-edbb43392397","_postman_id":"ede5d174-9f9d-42bb-a3ef-edbb43392397","description":""},{"name":"Schedule","item":[{"name":"스케줄 목록 조회","event":[{"listen":"test","script":{"id":"d40bf6bc-b753-4d73-a0cf-505e5cfb69cb","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript"}}],"id":"8cd3e0e7-cd1f-44da-bd67-5ad2a52677b7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJSb2JiZXJ0IiwiYXV0aCI6IlVTRVIiLCJleHAiOjE3MDcxMTU3NjQsImlhdCI6MTcwNzExMjE2NH0.NCGl-R7E3HoR83jpMICc-NmmpztwKQzE2pixuETk73Y","type":"text"}],"url":"http://localhost:8080/api/schedules","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":{"protocol":"http","port":"8080","path":["api","schedules"],"host":["localhost"],"query":[{"disabled":true,"key":"id","value":"1"}],"variable":[]}},"response":[],"_postman_id":"8cd3e0e7-cd1f-44da-bd67-5ad2a52677b7"},{"name":"스케줄 작성","id":"4b5cec3b-6594-4eb4-b9fc-821766ee7c10","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJyb2JiaWUiLCJhdXRoIjoiVVNFUiIsImV4cCI6MTcwNzEyMjkwOSwiaWF0IjoxNzA3MTE5MzA5fQ.u-4gF41ctsVxNDoYNnWPDDuHoSJFc_6c9eehAE1lijg","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"title\":\"testTitle2\",\r\n    \"content\":\"testContent2\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/new","urlObject":{"protocol":"http","port":"8080","path":["api","new"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4b5cec3b-6594-4eb4-b9fc-821766ee7c10"},{"name":"스케줄 조회","id":"981f89b9-aed2-4db4-a28a-ddd6fbb66c7e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJyb2JiaWUiLCJhdXRoIjoiVVNFUiIsImV4cCI6MTcwNzEyMjkwOSwiaWF0IjoxNzA3MTE5MzA5fQ.u-4gF41ctsVxNDoYNnWPDDuHoSJFc_6c9eehAE1lijg","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/schedule/1","urlObject":{"protocol":"http","port":"8080","path":["api","schedule","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"981f89b9-aed2-4db4-a28a-ddd6fbb66c7e"},{"name":"스케줄 수정","id":"d7b6b9dc-0db0-4d1c-af34-e2bab2ae24de","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJyb2JiaWUiLCJhdXRoIjoiVVNFUiIsImV4cCI6MTcwNzEyMjkwOSwiaWF0IjoxNzA3MTE5MzA5fQ.u-4gF41ctsVxNDoYNnWPDDuHoSJFc_6c9eehAE1lijg","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"title\":\"updateTitleTest\",\r\n    \"content\":\"updateContentTest\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/schedule/update/1","urlObject":{"protocol":"http","port":"8080","path":["api","schedule","update","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d7b6b9dc-0db0-4d1c-af34-e2bab2ae24de"},{"name":"스케줄 완료","id":"0ff06e38-f78b-4bf1-9fd4-bc1b414d507e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJyb2JiaWUiLCJhdXRoIjoiVVNFUiIsImV4cCI6MTcwNzEyMjkwOSwiaWF0IjoxNzA3MTE5MzA5fQ.u-4gF41ctsVxNDoYNnWPDDuHoSJFc_6c9eehAE1lijg","type":"text"}],"url":"http://localhost:8080/api/schedule/completed/1?isCompleted=true&isPrivate=true","urlObject":{"protocol":"http","port":"8080","path":["api","schedule","completed","1"],"host":["localhost"],"query":[{"key":"isCompleted","value":"true"},{"key":"isPrivate","value":"true"}],"variable":[]}},"response":[],"_postman_id":"0ff06e38-f78b-4bf1-9fd4-bc1b414d507e"},{"name":"스케줄 삭제","id":"8defc1be-9cb1-445b-9e6a-8e78aa6b9774","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJyb2JiaWUiLCJhdXRoIjoiVVNFUiIsImV4cCI6MTcwNzEyMjkwOSwiaWF0IjoxNzA3MTE5MzA5fQ.u-4gF41ctsVxNDoYNnWPDDuHoSJFc_6c9eehAE1lijg","type":"text"}],"url":"http://localhost:8080/api/schedule/delete/2","urlObject":{"protocol":"http","port":"8080","path":["api","schedule","delete","2"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8defc1be-9cb1-445b-9e6a-8e78aa6b9774"},{"name":"스케줄 검색","id":"c0832b59-107d-4647-a5f3-621217f0c1e0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"c0832b59-107d-4647-a5f3-621217f0c1e0"}],"id":"6949ec3f-0580-430f-9017-1d30088bb396","_postman_id":"6949ec3f-0580-430f-9017-1d30088bb396","description":""},{"name":"Reply","item":[{"name":"댓글 작성","id":"f3c2dc3a-d7c6-4f06-9d5c-747afb9738a1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJyb2JiaWUiLCJhdXRoIjoiVVNFUiIsImV4cCI6MTcwNzEyMjkwOSwiaWF0IjoxNzA3MTE5MzA5fQ.u-4gF41ctsVxNDoYNnWPDDuHoSJFc_6c9eehAE1lijg","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"content\":\"testReply2\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/schedules/schedule/1/reply/new","urlObject":{"protocol":"http","port":"8080","path":["api","schedules","schedule","1","reply","new"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"f3c2dc3a-d7c6-4f06-9d5c-747afb9738a1"},{"name":"댓글 삭제","id":"c216a516-6a75-4739-b041-67f476f64bcf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJyb2JiaWUiLCJhdXRoIjoiVVNFUiIsImV4cCI6MTcwNzEyMjkwOSwiaWF0IjoxNzA3MTE5MzA5fQ.u-4gF41ctsVxNDoYNnWPDDuHoSJFc_6c9eehAE1lijg","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"content\":\"commentCreateTest4\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/schedules/schedule/1/reply/delete/2","urlObject":{"protocol":"http","port":"8080","path":["api","schedules","schedule","1","reply","delete","2"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c216a516-6a75-4739-b041-67f476f64bcf"},{"name":"댓글 수정","id":"5061f341-aa1d-47a7-bd79-d03667b2924d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJyb2JiaWUiLCJhdXRoIjoiVVNFUiIsImV4cCI6MTcwNzEyMjkwOSwiaWF0IjoxNzA3MTE5MzA5fQ.u-4gF41ctsVxNDoYNnWPDDuHoSJFc_6c9eehAE1lijg","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"content\":\"replyUpdateTest\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/schedules/schedule/1/reply/update/1","urlObject":{"protocol":"http","port":"8080","path":["api","schedules","schedule","1","reply","update","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"5061f341-aa1d-47a7-bd79-d03667b2924d"}],"id":"89d4be99-e441-4294-9bf4-be3c38ee8b11","_postman_id":"89d4be99-e441-4294-9bf4-be3c38ee8b11","description":""}],"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""]}},{"listen":"test","script":{"type":"text/javascript","exec":[""]}}],"variable":[{"id":"315bf25a-2778-43f1-a62d-4e62d71d92d4","key":"id","value":"1"},{"id":"ecfe1aee-5d14-444d-9176-182a19d022ee","key":"base_url","value":"https://postman-rest-api-learner.glitch.me/"}]}