{"info":{"_postman_id":"6b9d4077-60de-3d1d-a0c6-568fa2a87bc6","name":"X-SUNIT","description":"<html><head></head><body><p>GoCase challenge: X-SUNIT REST API.</p>\n<blockquote>\n<p>The world as we know it has fallen into an apocalyptic scenario. An alien invasion is abducting humans and swapping them for evil clones that look really similar to the original person. </p>\n</blockquote>\n<blockquote>\n<p>I, as a X-SUNIT member (and the last survivor who knows how to code), developed a system to share resources between non-abducted humans.</p>\n</blockquote>\n<p>This API allow you to do basic CRUD operations on <code>Survivor</code> model. You can reprot survivor abduction too as a <code>Report</code> model.</p>\n<p>The <code>Survivor</code> model represents those who are alive and remember the name, age, gender and where they are (location). We may be abducted by aliens (not so bad in Brazil's current political senario). Therefore, the <code>Report</code> model represents a report about our abduction (who reports, some message and who was abducted).</p>\n<h2 id=\"survivor-model\">Survivor model</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Discription</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Unique identifier</td>\n</tr>\n<tr>\n<td>name</td>\n<td>Survivor full name</td>\n</tr>\n<tr>\n<td>age</td>\n<td>Survivor age</td>\n</tr>\n<tr>\n<td>gender</td>\n<td>Survivor gender</td>\n</tr>\n<tr>\n<td>latitude</td>\n<td>Latitudinal location of survivor on earth</td>\n</tr>\n<tr>\n<td>longitude</td>\n<td>Longitudinal location of survivor on earth</td>\n</tr>\n<tr>\n<td>abducted</td>\n<td>Flag to indicate survivor abduction</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"report-model\">Report model</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Discription</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Unique identifier</td>\n</tr>\n<tr>\n<td>reporter_id</td>\n<td>Identifier of who report survivor abduction</td>\n</tr>\n<tr>\n<td>abducted_id</td>\n<td><code>id</code> attribute in <code>Survivor</code> of the abducted survivor</td>\n</tr>\n<tr>\n<td>message</td>\n<td>Some text message</td>\n</tr>\n</tbody>\n</table>\n</div><p><a href=\"https://x-sunit.herokuapp.com/\">Home page</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"5362958","collectionId":"6b9d4077-60de-3d1d-a0c6-568fa2a87bc6","publishedId":"RWgwSGd5","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2018-10-24T01:20:34.000Z"},"item":[{"name":"/survivors","event":[{"listen":"test","script":{"id":"b74a9070-c2da-48bb-855f-3b5ae74d437a","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","pm.test(\"Response time is less than 200ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(200);","});"],"type":"text/javascript"}}],"id":"d536809c-64f1-25e9-c8f5-6aa6488dc439","request":{"method":"GET","header":[],"url":"https://x-sunit.herokuapp.com/api/v1/survivors","description":"<p>Get all <code>survivors</code> by alphabetic order.</p>\n","urlObject":{"protocol":"https","path":["api","v1","survivors"],"host":["x-sunit","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"5e553f86-cc4a-47a6-a8fc-42382eae5ac4","name":"200 OK","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://x-sunit.herokuapp.com/api/v1/survivors?page=1","protocol":"https","host":["x-sunit","herokuapp","com"],"path":["api","v1","survivors"],"query":[{"key":"page","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8","description":""},{"key":"ETag","value":"W/\"edeb9582c705ffc503d82bb829256be4\"","description":""},{"key":"Cache-Control","value":"max-age=0, private, must-revalidate","description":""},{"key":"X-Request-Id","value":"f6c4231f-1814-45dc-b844-d962787c28d7","description":""},{"key":"X-Runtime","value":"0.013809","description":""},{"key":"Transfer-Encoding","value":"chunked","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"page\": \"2\",\n    \"per_page\": 10,\n    \"total_pages\": 4,\n    \"total_results\": 34,\n    \"results\": [\n        {\n            \"id\": 20,\n            \"name\": \"Fermin Jacobs II\",\n            \"age\": 6,\n            \"gender\": \"Male\",\n            \"latitude\": 58178.59,\n            \"longitude\": 50741.22,\n            \"abducted\": false,\n            \"created_at\": \"2018-10-21T15:52:33.332Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.332Z\"\n        },\n        {\n            \"id\": 31,\n            \"name\": \"Gedhean Alves King\",\n            \"age\": 23,\n            \"gender\": \"male\",\n            \"latitude\": 21.65656,\n            \"longitude\": -56.65655,\n            \"abducted\": false,\n            \"created_at\": \"2018-10-21T16:38:50.494Z\",\n            \"updated_at\": \"2018-10-21T16:38:50.494Z\"\n        },\n        {\n            \"id\": 32,\n            \"name\": \"Gedwadawda\",\n            \"age\": 23,\n            \"gender\": \"male\",\n            \"latitude\": 21.65656,\n            \"longitude\": -56.65655,\n            \"abducted\": false,\n            \"created_at\": \"2018-10-22T19:46:13.944Z\",\n            \"updated_at\": \"2018-10-22T19:46:13.944Z\"\n        },\n        {\n            \"id\": 11,\n            \"name\": \"Gêdhean Alves Vieira\",\n            \"age\": 42,\n            \"gender\": \"Male\",\n            \"latitude\": 145455,\n            \"longitude\": -451.45455,\n            \"abducted\": false,\n            \"created_at\": \"2018-10-21T15:52:33.202Z\",\n            \"updated_at\": \"2018-10-21T18:00:07.479Z\"\n        },\n        {\n            \"id\": 26,\n            \"name\": \"Horacio Weissnat\",\n            \"age\": 81,\n            \"gender\": \"Female\",\n            \"latitude\": 85669.07,\n            \"longitude\": 59326.16,\n            \"abducted\": false,\n            \"created_at\": \"2018-10-21T15:52:33.417Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.417Z\"\n        },\n        {\n            \"id\": 23,\n            \"name\": \"Idell Goodwin\",\n            \"age\": 65,\n            \"gender\": \"Male\",\n            \"latitude\": 37543.57,\n            \"longitude\": 38419.49,\n            \"abducted\": false,\n            \"created_at\": \"2018-10-21T15:52:33.375Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.375Z\"\n        },\n        {\n            \"id\": 10,\n            \"name\": \"Jesse Baumbach II\",\n            \"age\": 22,\n            \"gender\": \"Male\",\n            \"latitude\": 28495.76,\n            \"longitude\": 92192.63,\n            \"abducted\": true,\n            \"created_at\": \"2018-10-21T15:52:33.185Z\",\n            \"updated_at\": \"2018-10-21T17:03:14.811Z\"\n        },\n        {\n            \"id\": 15,\n            \"name\": \"Joel Lockman\",\n            \"age\": 87,\n            \"gender\": \"Male\",\n            \"latitude\": 64349.88,\n            \"longitude\": 64024.38,\n            \"abducted\": false,\n            \"created_at\": \"2018-10-21T15:52:33.258Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.258Z\"\n        },\n        {\n            \"id\": 3,\n            \"name\": \"Joette Gutkowski\",\n            \"age\": 83,\n            \"gender\": \"Male\",\n            \"latitude\": 78432.33,\n            \"longitude\": 51688.77,\n            \"abducted\": false,\n            \"created_at\": \"2018-10-21T15:52:33.085Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.085Z\"\n        },\n        {\n            \"id\": 12,\n            \"name\": \"Juliana Homenick\",\n            \"age\": 80,\n            \"gender\": \"Male\",\n            \"latitude\": 96272.29,\n            \"longitude\": 27838.29,\n            \"abducted\": false,\n            \"created_at\": \"2018-10-21T15:52:33.215Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.215Z\"\n        }\n    ]\n}"}],"_postman_id":"d536809c-64f1-25e9-c8f5-6aa6488dc439"},{"name":"/survivors/stats","id":"877dffab-dce8-4861-a37c-d46188c28b33","request":{"method":"GET","header":[],"url":"http://localhost:3000/api/v1/survivors/stats","description":"<p>Get statistics about percentage of abducted and non-abduncted <code>survivors</code>.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","survivors","stats"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"e6c9e881-01d1-4fa1-b1da-19cd1c4cc38d","name":"Abduction statistics","originalRequest":{"method":"GET","header":[],"url":"https://x-sunit.herokuapp.com/api/v1/survivors/stats"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8","description":""},{"key":"ETag","value":"W/\"74f93b90d76d3d680b8da7b7a9206d59\"","description":""},{"key":"Cache-Control","value":"max-age=0, private, must-revalidate","description":""},{"key":"X-Request-Id","value":"cee5cd36-1c21-4979-adf7-19d1d3dbb8bd","description":""},{"key":"X-Runtime","value":"0.004428","description":""},{"key":"Transfer-Encoding","value":"chunked","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"abducted\": 5.88,\n    \"non_abducted\": 94.12\n}"},{"id":"ea4e3fdf-a436-4ac3-b623-d6ad8df07b68","name":"No survivors","originalRequest":{"method":"GET","header":[],"url":"https://x-sunit.herokuapp.com/api/v1/survivors/stats"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8","description":""},{"key":"Cache-Control","value":"no-cache","description":""},{"key":"X-Request-Id","value":"1ee0d9be-9ff2-4270-ba60-30d625d8f9c1","description":""},{"key":"X-Runtime","value":"0.042220","description":""},{"key":"Transfer-Encoding","value":"chunked","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"There no survirvors :'(\"\n}"}],"_postman_id":"877dffab-dce8-4861-a37c-d46188c28b33"},{"name":"/survivors/:id","id":"32a34a3f-f915-c848-e857-9305c8ff19a3","request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"https://x-sunit.herokuapp.com/api/v1/survivors/1574","description":"<p>Get a <code>survivor</code> by id</p>\n","urlObject":{"protocol":"https","path":["api","v1","survivors","1574"],"host":["x-sunit","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"56302ec9-7178-46bd-add6-5736095ea5b7","name":"200 OK","originalRequest":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"https://x-sunit.herokuapp.com/api/v1/survivors/16"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8","description":""},{"key":"ETag","value":"W/\"7eb79260ecbcd102ca12fbc1f164a2e3\"","description":""},{"key":"Cache-Control","value":"max-age=0, private, must-revalidate","description":""},{"key":"X-Request-Id","value":"d106ea9c-28cb-463d-96a6-bc958aba045c","description":""},{"key":"X-Runtime","value":"0.005920","description":""},{"key":"Transfer-Encoding","value":"chunked","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Survivor found\",\n    \"result\": {\n        \"id\": 16,\n        \"name\": \"Denita Romaguera Sr.\",\n        \"age\": 29,\n        \"gender\": \"Male\",\n        \"latitude\": 19911.81,\n        \"longitude\": 25769.58,\n        \"abducted\": false,\n        \"created_at\": \"2018-10-21T15:52:33.273Z\",\n        \"updated_at\": \"2018-10-21T15:52:33.273Z\"\n    }\n}"},{"id":"ac524112-3a62-4799-886f-cec58b7e30af","name":"404 Not Found","originalRequest":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"https://x-sunit.herokuapp.com/api/v1/survivors/666"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8","description":""},{"key":"Cache-Control","value":"no-cache","description":""},{"key":"X-Request-Id","value":"36c02e94-6e63-4944-9ecb-ab4760912071","description":""},{"key":"X-Runtime","value":"0.034482","description":""},{"key":"Transfer-Encoding","value":"chunked","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errors\": \"Couldn't find Survivor with 'id'=666\"\n}"}],"_postman_id":"32a34a3f-f915-c848-e857-9305c8ff19a3"},{"name":"/survivors/:id","id":"c5265153-b190-cb3b-2248-aade9633ff16","request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"latitude\": \"145455\",\n\t\"longitude\": \"-451.45455\"\n}"},"url":"https://x-sunit.herokuapp.com/api/v1/survivors/1574","description":"<p>Edit a <code>survivor</code> by id. You can use to update <code>survivor</code> location (longitude, latitude).</p>\n","urlObject":{"protocol":"https","path":["api","v1","survivors","1574"],"host":["x-sunit","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"971eb996-5eab-436b-9835-3089ca9885d9","name":"422 Unprocessable Entity","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"latitude\": \"145455\",\n\t\"longitude\": \"two\"\n}"},"url":"https://x-sunit.herokuapp.com/api/v1/survivors/11"},"status":"Unprocessable Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8","description":""},{"key":"Cache-Control","value":"no-cache","description":""},{"key":"X-Request-Id","value":"6fca92a8-79eb-4339-9ebe-43a0f079593c","description":""},{"key":"X-Runtime","value":"0.126510","description":""},{"key":"Transfer-Encoding","value":"chunked","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errors\": {\n        \"longitude\": [\n            \"is not a number\"\n        ]\n    }\n}"},{"id":"e4ccf668-e554-4c02-8ed5-17c03bac9439","name":"202 Accepted","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"latitude\": \"145455\",\n\t\"longitude\": \"-451.45455\"\n}"},"url":"https://x-sunit.herokuapp.com/api/v1/survivors/11"},"status":"Accepted","code":202,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8","description":""},{"key":"Cache-Control","value":"no-cache","description":""},{"key":"X-Request-Id","value":"154a0a54-75ae-4dcb-8b58-3cc8f86eaba6","description":""},{"key":"X-Runtime","value":"0.005848","description":""},{"key":"Transfer-Encoding","value":"chunked","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Survivor updated\",\n    \"result\": {\n        \"id\": 11,\n        \"latitude\": 145455,\n        \"longitude\": -451.45455,\n        \"name\": \"Gêdhean Alves Vieira\",\n        \"age\": 42,\n        \"gender\": \"Male\",\n        \"abducted\": false,\n        \"created_at\": \"2018-10-21T15:52:33.202Z\",\n        \"updated_at\": \"2018-10-21T18:00:07.479Z\"\n    }\n}"}],"_postman_id":"c5265153-b190-cb3b-2248-aade9633ff16"},{"name":"/survivors","id":"fd0b5146-5fa8-bf20-b840-14e4cf8227ee","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\" : \"Jedi King III\",\n  \"age\": 23,\n  \"gender\": \"male\",\n  \"latitude\": 21.65656,\n  \"longitude\": -56.65655\n}"},"url":"https://x-sunit.herokuapp.com/api/v1/survivors","description":"<p>Create a new <code>survivor</code>.</p>\n","urlObject":{"protocol":"https","path":["api","v1","survivors"],"host":["x-sunit","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"2ac524e5-5703-4635-a527-045aee290717","name":"Invalid parameters","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"name\" : \"Jedi Master King II\",\n\t\"gender\": \"undefined\",\n\t\"latitude\": 21.65656,\n\t\"longitude\": -56.65655\n}"},"url":"https://x-sunit.herokuapp.com/api/v1/survivors"},"status":"Unprocessable Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8","description":""},{"key":"Cache-Control","value":"no-cache","description":""},{"key":"X-Request-Id","value":"f629255e-3aaf-482b-b401-36acf535cc8e","description":""},{"key":"X-Runtime","value":"0.004453","description":""},{"key":"Transfer-Encoding","value":"chunked","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errors\": {\n        \"age\": [\n            \"can't be blank\",\n            \"is not a number\"\n        ]\n    }\n}"},{"id":"a9812b3d-9374-43dc-80f5-9e0298ba1b61","name":"201 Created","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"name\" : \"Jedi Master King II\",\n\t\"age\": 23,\n\t\"gender\": \"undefined\",\n\t\"latitude\": 21.65656,\n\t\"longitude\": -56.65655\n}"},"url":"https://x-sunit.herokuapp.com/api/v1/survivors"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8","description":""},{"key":"ETag","value":"W/\"a6099caed74ea49987f7359ca087a6a3\"","description":""},{"key":"Cache-Control","value":"max-age=0, private, must-revalidate","description":""},{"key":"X-Request-Id","value":"125370e2-ae7e-4097-a68f-dff439e80eb2","description":""},{"key":"X-Runtime","value":"0.025594","description":""},{"key":"Transfer-Encoding","value":"chunked","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Survivor created\",\n    \"result\": {\n        \"id\": 36,\n        \"name\": \"wa dawda dwa da\",\n        \"age\": 23,\n        \"gender\": \"male\",\n        \"latitude\": 21.65656,\n        \"longitude\": -56.65655,\n        \"abducted\": false,\n        \"created_at\": \"2018-10-23T21:19:58.582Z\",\n        \"updated_at\": \"2018-10-23T21:19:58.582Z\"\n    }\n}"}],"_postman_id":"fd0b5146-5fa8-bf20-b840-14e4cf8227ee"},{"name":"/survivors/:id","id":"fcf336cc-fd8f-ffde-3265-29f861fb6c7d","request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":""},"url":"https://x-sunit.herokuapp.com/api/v1/survivors/1537","description":"<p>Delete a <code>survivor</code> by id</p>\n","urlObject":{"protocol":"https","path":["api","v1","survivors","1537"],"host":["x-sunit","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"2c1eeced-1d33-49d6-a17b-e2ee9fdbfecd","name":"202 Accepted","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":""},"url":"https://x-sunit.herokuapp.com/api/v1/survivors/15"},"status":"Accepted","code":202,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8","description":""},{"key":"Cache-Control","value":"no-cache","description":""},{"key":"X-Request-Id","value":"053b844c-cb9e-43fc-a1f8-7298738c55a8","description":""},{"key":"X-Runtime","value":"0.024987","description":""},{"key":"Transfer-Encoding","value":"chunked","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Survivor deleted\",\n    \"result\": {\n        \"id\": 15,\n        \"name\": \"Joel Lockman\",\n        \"age\": 87,\n        \"gender\": \"Male\",\n        \"latitude\": 64349.88,\n        \"longitude\": 64024.38,\n        \"abducted\": false,\n        \"created_at\": \"2018-10-21T15:52:33.258Z\",\n        \"updated_at\": \"2018-10-21T15:52:33.258Z\"\n    }\n}"},{"id":"d879f8ce-d9d2-4efa-8d08-6537cb576bb2","name":"404 Not Found","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":""},"url":"https://x-sunit.herokuapp.com/api/v1/survivors/666"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8","description":""},{"key":"Cache-Control","value":"no-cache","description":""},{"key":"X-Request-Id","value":"05a32ae1-074e-4e94-992c-dc0c1fb2ad27","description":""},{"key":"X-Runtime","value":"0.002980","description":""},{"key":"Transfer-Encoding","value":"chunked","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errors\": \"Couldn't find Survivor with 'id'=666\"\n}"}],"_postman_id":"fcf336cc-fd8f-ffde-3265-29f861fb6c7d"},{"name":"/reports","event":[{"listen":"test","script":{"id":"8a5ce91d-2af5-4c55-be93-45199129e808","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","pm.test(\"Response time is less than 200ms\", function () {","    pm.expect(pm.response.responseTime).to.be.below(200);","});"],"type":"text/javascript"}}],"id":"a0460e8d-4922-cec4-90d7-4398a31e4d83","request":{"method":"GET","header":[],"url":"http://localhost:3000/api/v1/reports","description":"<p>Get all <code>reports</code>.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","reports"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"f6672942-6d8f-44c6-b23c-c5a88820c20b","name":"200 OK","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://x-sunit.herokuapp.com/api/v1/reports?page=1","protocol":"https","host":["x-sunit","herokuapp","com"],"path":["api","v1","reports"],"query":[{"key":"page","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8","description":""},{"key":"ETag","value":"W/\"ab05d330b113514941374029d4abbb86\"","description":""},{"key":"Cache-Control","value":"max-age=0, private, must-revalidate","description":""},{"key":"X-Request-Id","value":"049b39d6-59c7-48a0-b2e2-fa7ffb84d1ff","description":""},{"key":"X-Runtime","value":"0.010348","description":""},{"key":"Transfer-Encoding","value":"chunked","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"page\": 1,\n    \"per_page\": 20,\n    \"total_pages\": 3,\n    \"total_results\": 45,\n    \"results\": [\n        {\n            \"id\": 91,\n            \"reporter_id\": 26,\n            \"abducted_id\": 5,\n            \"message\": \"Odio quas dicta aut.\",\n            \"created_at\": \"2018-10-21T15:52:33.492Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.492Z\"\n        },\n        {\n            \"id\": 92,\n            \"reporter_id\": 20,\n            \"abducted_id\": 1,\n            \"message\": \"Saepe dolorum exercitationem voluptates.\",\n            \"created_at\": \"2018-10-21T15:52:33.510Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.510Z\"\n        },\n        {\n            \"id\": 93,\n            \"reporter_id\": 29,\n            \"abducted_id\": 7,\n            \"message\": \"Ea nesciunt eveniet id.\",\n            \"created_at\": \"2018-10-21T15:52:33.526Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.526Z\"\n        },\n        {\n            \"id\": 94,\n            \"reporter_id\": 21,\n            \"abducted_id\": 4,\n            \"message\": \"Sit et earum et.\",\n            \"created_at\": \"2018-10-21T15:52:33.545Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.545Z\"\n        },\n        {\n            \"id\": 95,\n            \"reporter_id\": 12,\n            \"abducted_id\": 1,\n            \"message\": \"Excepturi unde molestiae omnis.\",\n            \"created_at\": \"2018-10-21T15:52:33.561Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.561Z\"\n        },\n        {\n            \"id\": 96,\n            \"reporter_id\": 26,\n            \"abducted_id\": 5,\n            \"message\": \"Doloremque ut tempora quibusdam.\",\n            \"created_at\": \"2018-10-21T15:52:33.579Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.579Z\"\n        },\n        {\n            \"id\": 97,\n            \"reporter_id\": 1,\n            \"abducted_id\": 10,\n            \"message\": \"Vel est reiciendis non.\",\n            \"created_at\": \"2018-10-21T15:52:33.595Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.595Z\"\n        },\n        {\n            \"id\": 98,\n            \"reporter_id\": 22,\n            \"abducted_id\": 6,\n            \"message\": \"Optio quidem ullam qui.\",\n            \"created_at\": \"2018-10-21T15:52:33.612Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.612Z\"\n        },\n        {\n            \"id\": 99,\n            \"reporter_id\": 1,\n            \"abducted_id\": 8,\n            \"message\": \"Enim quidem dolores eligendi.\",\n            \"created_at\": \"2018-10-21T15:52:33.628Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.628Z\"\n        },\n        {\n            \"id\": 100,\n            \"reporter_id\": 2,\n            \"abducted_id\": 7,\n            \"message\": \"Rerum maxime hic enim.\",\n            \"created_at\": \"2018-10-21T15:52:33.644Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.644Z\"\n        },\n        {\n            \"id\": 101,\n            \"reporter_id\": 19,\n            \"abducted_id\": 5,\n            \"message\": \"Et consequatur error molestiae.\",\n            \"created_at\": \"2018-10-21T15:52:33.659Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.659Z\"\n        },\n        {\n            \"id\": 102,\n            \"reporter_id\": 23,\n            \"abducted_id\": 1,\n            \"message\": \"Autem perferendis minus ducimus.\",\n            \"created_at\": \"2018-10-21T15:52:33.677Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.677Z\"\n        },\n        {\n            \"id\": 103,\n            \"reporter_id\": 6,\n            \"abducted_id\": 9,\n            \"message\": \"Impedit expedita vel nihil.\",\n            \"created_at\": \"2018-10-21T15:52:33.695Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.695Z\"\n        },\n        {\n            \"id\": 104,\n            \"reporter_id\": 28,\n            \"abducted_id\": 1,\n            \"message\": \"At eos nobis quam.\",\n            \"created_at\": \"2018-10-21T15:52:33.712Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.712Z\"\n        },\n        {\n            \"id\": 105,\n            \"reporter_id\": 1,\n            \"abducted_id\": 1,\n            \"message\": \"Tenetur molestiae ea porro.\",\n            \"created_at\": \"2018-10-21T15:52:33.729Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.729Z\"\n        },\n        {\n            \"id\": 106,\n            \"reporter_id\": 12,\n            \"abducted_id\": 7,\n            \"message\": \"Aut eum neque at.\",\n            \"created_at\": \"2018-10-21T15:52:33.744Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.744Z\"\n        },\n        {\n            \"id\": 107,\n            \"reporter_id\": 13,\n            \"abducted_id\": 4,\n            \"message\": \"Qui ut aut delectus.\",\n            \"created_at\": \"2018-10-21T15:52:33.760Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.760Z\"\n        },\n        {\n            \"id\": 108,\n            \"reporter_id\": 6,\n            \"abducted_id\": 8,\n            \"message\": \"Autem dicta rerum dolore.\",\n            \"created_at\": \"2018-10-21T15:52:33.780Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.780Z\"\n        },\n        {\n            \"id\": 109,\n            \"reporter_id\": 26,\n            \"abducted_id\": 8,\n            \"message\": \"Et quia itaque doloremque.\",\n            \"created_at\": \"2018-10-21T15:52:33.804Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.804Z\"\n        },\n        {\n            \"id\": 110,\n            \"reporter_id\": 19,\n            \"abducted_id\": 8,\n            \"message\": \"Quo debitis velit id.\",\n            \"created_at\": \"2018-10-21T15:52:33.821Z\",\n            \"updated_at\": \"2018-10-21T15:52:33.821Z\"\n        }\n    ]\n}"}],"_postman_id":"a0460e8d-4922-cec4-90d7-4398a31e4d83"},{"name":"/reports","id":"a04c2df1-d5e0-ce1a-971d-9ffd6432f54e","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"reporter_id\": 26,\n\t\"abducted_id\": 10,\n\t\"message\": \"Jhon was abducted!!!\"\n}"},"url":"http://localhost:3000/api/v1/reports","description":"<p>Create a new <code>report</code>. A <code>survivor</code> is flaged as abducted when three or more people report the same <code>survivor</code>.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","reports"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"0dce88e3-1189-4e6a-bc3c-41272b5e70ad","name":"422 Unprocessable Entity","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"abducted_id\": 10,\n\t\"message\": \"Jhon was abducted!!!\"\n}"},"url":"https://x-sunit.herokuapp.com/api/v1/reports"},"status":"Unprocessable Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8","description":""},{"key":"Cache-Control","value":"no-cache","description":""},{"key":"X-Request-Id","value":"ff9ed583-9013-4d43-9c90-61f2029d134c","description":""},{"key":"X-Runtime","value":"0.005216","description":""},{"key":"Transfer-Encoding","value":"chunked","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errors\": {\n        \"reporter_id\": [\n            \"can't be blank\",\n            \"is not a number\"\n        ]\n    }\n}"},{"id":"55c06587-fa27-40a9-80a4-5dbd5b10679f","name":"201 Created","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"reporter_id\": 26,\n\t\"abducted_id\": 10,\n\t\"message\": \"Jhon was abducted!!!\"\n}"},"url":"https://x-sunit.herokuapp.com/api/v1/reports"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8","description":""},{"key":"ETag","value":"W/\"b7e17eab3ec0e7470cccaf07fb5fbd77\"","description":""},{"key":"Cache-Control","value":"max-age=0, private, must-revalidate","description":""},{"key":"X-Request-Id","value":"f56b4be1-cc8e-43e8-9d02-5cca31bbdfdf","description":""},{"key":"X-Runtime","value":"0.067427","description":""},{"key":"Transfer-Encoding","value":"chunked","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Report created\",\n    \"report\": {\n        \"id\": 136,\n        \"reporter_id\": 26,\n        \"abducted_id\": 10,\n        \"message\": \"Jhon was abducted!!!\",\n        \"created_at\": \"2018-10-23T21:04:34.859Z\",\n        \"updated_at\": \"2018-10-23T21:04:34.859Z\"\n    }\n}"},{"id":"7898dd7c-c4e1-4b77-acd8-14b63b87b9be","name":"404 Not Found","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"reporter_id\": 26,\n\t\"abducted_id\": 666,\n\t\"message\": \"Jhon was abducted!!!\"\n}"},"url":"https://x-sunit.herokuapp.com/api/v1/reports"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8","description":""},{"key":"Cache-Control","value":"no-cache","description":""},{"key":"X-Request-Id","value":"9f9b0b3b-59ae-4b84-85fc-757de2b2fe37","description":""},{"key":"X-Runtime","value":"0.030518","description":""},{"key":"Transfer-Encoding","value":"chunked","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errors\": \"Couldn't find Survivor with 'id'=666\"\n}"}],"_postman_id":"a04c2df1-d5e0-ce1a-971d-9ffd6432f54e"}]}