2018-09-12 21:29:47 +00:00
{
"info" : {
2018-12-10 19:43:07 +00:00
"_postman_id" : "94807b85-ef65-4370-9144-b1a74e04cb0e" ,
2018-12-10 06:29:12 +00:00
"name" : "Statping" ,
2018-12-06 19:03:55 +00:00
"description" : "Statup API Requests" ,
2018-09-12 21:29:47 +00:00
"schema" : "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
} ,
"item" : [
{
"name" : "Main" ,
"item" : [
{
2018-12-06 19:03:55 +00:00
"name" : "Statup Details" ,
2018-11-17 17:14:14 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "08b8f487-2318-44b9-bdb8-f1f1041e9462" ,
"exec" : [
"pm.test(\"Check Core API Route\", function () {" ,
" var jsonData = pm.response.json();" ,
2018-12-04 04:17:29 +00:00
" pm.expect(jsonData.name).to.eql(\"Statping\");" ,
" pm.expect(jsonData.description).to.eql(\"Statping Monitoring Sample Data\");" ,
2018-11-17 17:14:14 +00:00
" pm.expect(jsonData.using_cdn).to.eql(false);" ,
" pm.expect(jsonData.database).to.eql(\"sqlite\");" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
2018-09-12 21:29:47 +00:00
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [ ] ,
2018-12-10 06:29:12 +00:00
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
2018-09-12 21:29:47 +00:00
"url" : {
"raw" : "{{endpoint}}/api" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api"
]
2018-12-10 19:43:07 +00:00
} ,
"description" : "The root API route to view basic Statping settings."
2018-09-12 21:29:47 +00:00
} ,
"response" : [ ]
}
] ,
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
}
} ,
{
"name" : "Services" ,
"item" : [
{
2018-11-17 17:14:14 +00:00
"name" : "All Services" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "d87f8a4e-7640-45b8-9d45-4f6e6f2463ee" ,
"exec" : [
"pm.test(\"View All Services\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.length).to.eql(5);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
2018-09-12 21:29:47 +00:00
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [ ] ,
2018-11-17 17:14:14 +00:00
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
2018-09-12 21:29:47 +00:00
"url" : {
"raw" : "{{endpoint}}/api/services" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services"
]
2018-12-10 19:43:07 +00:00
} ,
"description" : "View an array of all Services added to your Statping instance."
2018-09-12 21:29:47 +00:00
} ,
"response" : [ ]
} ,
{
"name" : "View Service" ,
2018-11-17 17:14:14 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "023c5643-6cb1-4cd0-b775-566f232d68f8" ,
"exec" : [
"pm.test(\"View Service\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.name).to.eql(\"Google\");" ,
" pm.expect(jsonData.status_code).to.eql(200);" ,
" pm.expect(jsonData.type).to.eql(\"http\");" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
2018-09-12 21:29:47 +00:00
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
2018-11-17 17:14:14 +00:00
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"value" : "application/json" ,
"type" : "text"
}
] ,
"body" : {
"mode" : "raw" ,
2018-12-06 19:03:55 +00:00
"raw" : ""
2018-11-17 17:14:14 +00:00
} ,
2018-09-12 21:29:47 +00:00
"url" : {
"raw" : "{{endpoint}}/api/services/1" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"1"
]
2018-12-10 19:43:07 +00:00
} ,
"description" : "View a specific service, this will include the service's failures and checkins."
2018-09-12 21:29:47 +00:00
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "View Service" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"value" : "application/json" ,
"type" : "text"
}
] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/services/1" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"1"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:31:19 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "482"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"id\": 1,\n \"name\": \"Google\",\n \"domain\": \"https://google.com\",\n \"expected\": null,\n \"expected_status\": 200,\n \"check_interval\": 10,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": null,\n \"port\": 0,\n \"timeout\": 10,\n \"order_id\": 1,\n \"allow_notifications\": false,\n \"created_at\": \"2018-12-10T11:15:42.24769-08:00\",\n \"updated_at\": \"2018-12-10T11:15:42.247837-08:00\",\n \"online\": true,\n \"latency\": 0.190599816,\n \"ping_time\": 0.00476598,\n \"online_24_hours\": 0,\n \"avg_response\": \"\",\n \"status_code\": 200,\n \"last_success\": \"2018-12-10T11:31:13.511139-08:00\"\n}"
}
]
2018-09-12 21:29:47 +00:00
} ,
2018-11-17 17:14:14 +00:00
{
"name" : "View Service Chart Data" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "023c5643-6cb1-4cd0-b775-566f232d68f8" ,
"exec" : [
"pm.test(\"Service Chart Default\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.data.length).to.be.at.least(100);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"type" : "text" ,
"value" : "application/json"
}
] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/services/1/data" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"1" ,
"data"
]
}
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "View Service Chart Data" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"type" : "text" ,
"value" : "application/json"
}
] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/services/1/data" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"1" ,
"data"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:31:32 GMT"
} ,
{
"key" : "Transfer-Encoding" ,
"value" : "chunked"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"data\": [\n {\n \"x\": \"2018-12-03T12:00:00-08:00\",\n \"y\": 476\n },\n {\n \"x\": \"2018-12-03T13:00:00-08:00\",\n \"y\": 663\n },\n {\n \"x\": \"2018-12-03T14:00:00-08:00\",\n \"y\": 411\n },\n {\n \"x\": \"2018-12-03T15:00:00-08:00\",\n \"y\": 759\n },\n {\n \"x\": \"2018-12-03T16:00:00-08:00\",\n \"y\": 143\n },\n {\n \"x\": \"2018-12-03T17:00:00-08:00\",\n \"y\": 11\n },\n {\n \"x\": \"2018-12-03T18:00:00-08:00\",\n \"y\": 1073\n },\n {\n \"x\": \"2018-12-03T19:00:00-08:00\",\n \"y\": 419\n },\n {\n \"x\": \"2018-12-03T20:00:00-08:00\",\n \"y\": 85\n },\n {\n \"x\": \"2018-12-03T21:00:00-08:00\",\n \"y\": 444\n },\n {\n \"x\": \"2018-12-03T22:00:00-08:00\",\n \"y\": 307\n },\n {\n \"x\": \"2018-12-03T23:00:00-08:00\",\n \"y\": 889\n },\n {\n \"x\": \"2018-12-04T00:00:00-08:00\",\n \"y\": 625\n },\n {\n \"x\": \"2018-12-04T01:00:00-08:00\",\n \"y\": 407\n },\n {\n \"x\": \"2018-12-04T02:00:00-08:00\",\n \"y\": 505\n },\n {\n \"x\": \"2018-12-04T03:00:00-08:00\",\n \"y\": 71\n },\n {\n \"x\": \"2018-12-04T04:00:00-08:00\",\n \"y\": 1063\n },\n {\n \"x\": \"2018-12-04T05:00:00-08:00\",\n \"y\": 488\n },\n {\n \"x\": \"2018-12-04T06:00:00-08:00\",\n \"y\": 981\n },\n {\n \"x\": \"2018-12-04T07:00:00-08:00\",\n \"y\": 1008\n },\n {\n \"x\": \"2018-12-04T08:00:00-08:00\",\n \"y\": 734\n },\n {\n \"x\": \"2018-12-04T09:00:00-08:00\",\n \"y\": 307\n },\n {\n \"x\": \"2018-12-04T10:00:00-08:00\",\n \"y\": 227\n },\n {\n \"x\": \"2018-12-04T11:00:00-08:00\",\n \"y\": 445\n },\n {\n \"x\": \"2018-12-04T12:00:00-08:00\",\n \"y\": 1181\n },\n {\n \"x\": \"2018-12-04T13:00:00-08:00\",\n \"y\": 937\n },\n {\n \"x\": \"2018-12-04T14:00:00-08:00\",\n \"y\": 506\n },\n {\n \"x\": \"2018-12-04T15:00:00-08:00\",\n \"y\": 1064\n },\n {\n \"x\": \"2018-12-04T16:00:00-08:00\",\n \"y\": 459\n },\n {\n \"x\": \"2018-12-04T17:00:00-08:00\",\n \"y\": 693\n },\n {\n \"x\": \"2018-12-04T18:00:00-08:00\",\n \"y\": 760\n },\n {\n \"x\": \"2018-12-04T19:00:00-08:00\",\n \"y\": 277\n },\n {\n \"x\": \"2018-12-04T20:00:00-08:00\",\n \"y\": 460\n },\n {\n \"x\": \"2018-12-04T21:00:00-08:00\",\n \"y\": 690\n },\n {\n \"x\": \"2018-12-04T22:00:00-08:00\",\n \"y\": 940\n },\n {\n \"x\": \"2018-12-04T23:00:00-08:00\",\n \"y\": 118\n },\n {\n \"x\": \"2018-12-05T00:00:00-08:00\",\n \"y\": 809\n },\n {\n \"x\": \"2018-12-05T01:00:00-08:00\",\n \"y\": 11\n },\n {\n \"x\": \"2018-12-05T02:00:00-08:00\",\n \"y\": 685\n },\n {\n \"x\": \"2018-12-05T03:00:00-08:00\",\n \"y\": 1064\n },\n {\n \"x\": \"2018-12-05T04:00:00-08:00\",\n \"y\": 370\n },\n {\n \"x\": \" 2018 -12
}
]
2018-11-17 17:14:14 +00:00
} ,
2018-09-12 21:29:47 +00:00
{
2018-12-10 19:43:07 +00:00
"name" : "Reorder Services" ,
2018-11-17 17:14:14 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2018-12-10 19:43:07 +00:00
"id" : "b5a67a19-fd08-40b0-a961-3e9474ab78c6" ,
2018-11-17 17:14:14 +00:00
"exec" : [
2018-12-10 19:43:07 +00:00
""
2018-11-17 17:14:14 +00:00
] ,
"type" : "text/javascript"
}
}
] ,
2018-09-12 21:29:47 +00:00
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
}
] ,
"body" : {
"mode" : "raw" ,
2018-12-10 19:43:07 +00:00
"raw" : "[{\"service\":1,\"order\":1},{\"service\":5,\"order\":2},{\"service\":2,\"order\":3},{\"service\":3,\"order\":4},{\"service\":4,\"order\":5}]"
2018-09-12 21:29:47 +00:00
} ,
"url" : {
2018-12-10 19:43:07 +00:00
"raw" : "{{endpoint}}/api/services/reorder" ,
2018-09-12 21:29:47 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2018-12-10 19:43:07 +00:00
"services" ,
"reorder"
2018-09-12 21:29:47 +00:00
]
2018-12-10 19:43:07 +00:00
} ,
"description" : "Reorder services in a specific order for the index page."
2018-09-12 21:29:47 +00:00
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "Reorder Services" ,
"originalRequest" : {
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
}
] ,
"body" : {
"mode" : "raw" ,
"raw" : "[{\"service\":1,\"order\":1},{\"service\":5,\"order\":2},{\"service\":2,\"order\":3},{\"service\":3,\"order\":4},{\"service\":4,\"order\":5}]"
} ,
"url" : {
"raw" : "{{endpoint}}/api/services/reorder" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"reorder"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:31:40 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "122"
}
] ,
"cookie" : [ ] ,
"body" : "[\n {\n \"service\": 1,\n \"order\": 1\n },\n {\n \"service\": 5,\n \"order\": 2\n },\n {\n \"service\": 2,\n \"order\": 3\n },\n {\n \"service\": 3,\n \"order\": 4\n },\n {\n \"service\": 4,\n \"order\": 5\n }\n]"
}
]
2018-09-12 21:29:47 +00:00
} ,
{
2018-12-10 19:43:07 +00:00
"name" : "Create Service" ,
2018-11-17 17:14:14 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2018-12-10 19:43:07 +00:00
"id" : "d4eb16fe-8495-40e5-9ca3-be20951e5133" ,
2018-11-17 17:14:14 +00:00
"exec" : [
2018-12-10 19:43:07 +00:00
"pm.test(\"Create Service\", function () {" ,
2018-11-17 17:14:14 +00:00
" var jsonData = pm.response.json();" ,
2018-12-10 19:43:07 +00:00
" pm.expect(jsonData.output.name).to.eql(\"New Service\");" ,
" pm.expect(jsonData.output.domain).to.eql(\"https://statping.com\");" ,
2018-11-17 17:14:14 +00:00
" pm.expect(jsonData.output.type).to.eql(\"http\");" ,
" pm.expect(jsonData.output.method).to.eql(\"GET\");" ,
" pm.expect(jsonData.output.expected_status).to.eql(200);" ,
2018-12-10 19:43:07 +00:00
" pm.globals.set(\"service_id\", jsonData.output.id);" ,
2018-11-17 17:14:14 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
2018-09-12 21:29:47 +00:00
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
}
] ,
"body" : {
"mode" : "raw" ,
2018-12-10 19:43:07 +00:00
"raw" : "{\n \"name\": \"New Service\",\n \"domain\": \"https://statping.com\",\n \"expected\": \"\",\n \"expected_status\": 200,\n \"check_interval\": 30,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 30,\n \"order_id\": 0\n}"
2018-09-12 21:29:47 +00:00
} ,
"url" : {
2018-12-10 19:43:07 +00:00
"raw" : "{{endpoint}}/api/services" ,
2018-09-12 21:29:47 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2018-12-10 19:43:07 +00:00
"services"
2018-09-12 21:29:47 +00:00
]
2018-12-10 19:43:07 +00:00
} ,
"description" : "Create a new service and begin monitoring."
2018-09-12 21:29:47 +00:00
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "Create Service" ,
"originalRequest" : {
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
}
] ,
"body" : {
"mode" : "raw" ,
"raw" : "{\n \"name\": \"New Service\",\n \"domain\": \"https://statping.com\",\n \"expected\": \"\",\n \"expected_status\": 200,\n \"check_interval\": 30,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 30,\n \"order_id\": 0\n}"
} ,
"url" : {
"raw" : "{{endpoint}}/api/services" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:31:47 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "528"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"status\": \"success\",\n \"type\": \"service\",\n \"method\": \"create\",\n \"id\": 10,\n \"output\": {\n \"id\": 10,\n \"name\": \"New Service\",\n \"domain\": \"https://statping.com\",\n \"expected\": \"\",\n \"expected_status\": 200,\n \"check_interval\": 30,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 30,\n \"order_id\": 0,\n \"allow_notifications\": false,\n \"created_at\": \"2018-12-10T11:31:47.535086-08:00\",\n \"updated_at\": \"2018-12-10T11:31:47.535184-08:00\",\n \"online\": false,\n \"latency\": 0,\n \"ping_time\": 0,\n \"online_24_hours\": 0,\n \"avg_response\": \"\",\n \"status_code\": 0,\n \"last_success\": \"0001-01-01T00:00:00Z\"\n }\n}"
}
]
2018-11-29 19:18:46 +00:00
} ,
{
2018-12-10 19:43:07 +00:00
"name" : "Update Service" ,
2018-11-29 19:18:46 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "b5a67a19-fd08-40b0-a961-3e9474ab78c6" ,
"exec" : [
2018-12-10 19:43:07 +00:00
"pm.test(\"Update Service\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.output.name).to.eql(\"Updated New Service\");" ,
" pm.expect(jsonData.output.domain).to.eql(\"https://google.com\");" ,
" pm.expect(jsonData.output.type).to.eql(\"http\");" ,
" pm.expect(jsonData.output.method).to.eql(\"GET\");" ,
" pm.expect(jsonData.output.expected_status).to.eql(200);" ,
"});"
2018-11-29 19:18:46 +00:00
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
}
] ,
"body" : {
"mode" : "raw" ,
2018-12-10 19:43:07 +00:00
"raw" : "{\n \"name\": \"Updated New Service\",\n \"domain\": \"https://google.com\",\n \"expected\": \"\",\n \"expected_status\": 200,\n \"check_interval\": 60,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 10,\n \"order_id\": 0\n}"
2018-11-29 19:18:46 +00:00
} ,
"url" : {
2018-12-10 19:43:07 +00:00
"raw" : "{{endpoint}}/api/services/{{service_id}}" ,
2018-11-29 19:18:46 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
2018-12-10 19:43:07 +00:00
"{{service_id}}"
2018-11-29 19:18:46 +00:00
]
2018-12-10 19:43:07 +00:00
} ,
"description" : "Update a service with new values and begin monitoring."
2018-11-29 19:18:46 +00:00
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "Update Service" ,
"originalRequest" : {
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
}
] ,
"body" : {
"mode" : "raw" ,
"raw" : "{\n \"name\": \"Updated New Service\",\n \"domain\": \"https://google.com\",\n \"expected\": \"\",\n \"expected_status\": 200,\n \"check_interval\": 60,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 10,\n \"order_id\": 0\n}"
} ,
"url" : {
"raw" : "{{endpoint}}/api/services/{{service_id}}" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"{{service_id}}"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:31:54 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "567"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"status\": \"success\",\n \"type\": \"service\",\n \"method\": \"update\",\n \"id\": 10,\n \"output\": {\n \"id\": 10,\n \"name\": \"Updated New Service\",\n \"domain\": \"https://google.com\",\n \"expected\": \"\",\n \"expected_status\": 200,\n \"check_interval\": 60,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 10,\n \"order_id\": 0,\n \"allow_notifications\": false,\n \"created_at\": \"2018-12-10T11:31:47.535086-08:00\",\n \"updated_at\": \"2018-12-10T11:31:47.535184-08:00\",\n \"online\": true,\n \"latency\": 0.550636193,\n \"ping_time\": 0.073339805,\n \"online_24_hours\": 0,\n \"avg_response\": \"\",\n \"status_code\": 200,\n \"last_success\": \"2018-12-10T11:31:49.161389-08:00\"\n }\n}"
}
]
2018-09-12 21:29:47 +00:00
} ,
{
"name" : "Delete Service" ,
2018-11-17 17:14:14 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "dd4d721d-d874-448b-abc9-59c1afceb58e" ,
"exec" : [
"pm.test(\"Delete Service\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.status).to.eql(\"success\");" ,
" pm.expect(jsonData.type).to.eql(\"service\");" ,
" pm.expect(jsonData.method).to.eql(\"delete\");" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
2018-09-12 21:29:47 +00:00
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "DELETE" ,
"header" : [ ] ,
2018-12-10 06:29:12 +00:00
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
2018-09-12 21:29:47 +00:00
"url" : {
2018-12-10 19:43:07 +00:00
"raw" : "{{endpoint}}/api/services/{{service_id}}" ,
2018-09-12 21:29:47 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
2018-12-10 19:43:07 +00:00
"{{service_id}}"
2018-09-12 21:29:47 +00:00
]
2018-12-10 19:43:07 +00:00
} ,
"description" : "Delete a service and stop monitoring."
2018-09-12 21:29:47 +00:00
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "Delete Service" ,
"originalRequest" : {
"method" : "DELETE" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/services/{{service_id}}" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"{{service_id}}"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:32:06 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "567"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"status\": \"success\",\n \"type\": \"service\",\n \"method\": \"delete\",\n \"id\": 10,\n \"output\": {\n \"id\": 10,\n \"name\": \"Updated New Service\",\n \"domain\": \"https://google.com\",\n \"expected\": \"\",\n \"expected_status\": 200,\n \"check_interval\": 60,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 10,\n \"order_id\": 0,\n \"allow_notifications\": false,\n \"created_at\": \"2018-12-10T11:31:47.535086-08:00\",\n \"updated_at\": \"2018-12-10T11:31:47.535184-08:00\",\n \"online\": true,\n \"latency\": 0.203382878,\n \"ping_time\": 0.001664491,\n \"online_24_hours\": 0,\n \"avg_response\": \"\",\n \"status_code\": 200,\n \"last_success\": \"2018-12-10T11:31:55.455091-08:00\"\n }\n}"
}
]
2018-09-12 21:29:47 +00:00
}
] ,
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"event" : [
{
"listen" : "prerequest" ,
"script" : {
"id" : "4cd2ab82-e60d-45cd-9b74-cb4b5d893f4d" ,
"type" : "text/javascript" ,
"exec" : [
""
]
}
} ,
{
"listen" : "test" ,
"script" : {
"id" : "c7cb2b6d-289a-4073-b291-202bbec8cb44" ,
"type" : "text/javascript" ,
"exec" : [
""
]
}
}
]
} ,
{
"name" : "Users" ,
"item" : [
{
"name" : "View All Users" ,
2018-11-17 17:14:14 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "9a2977fe-9689-4039-bdcb-eaa34abee958" ,
"exec" : [
"pm.test(\"View All Users\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.length).to.eql(1);" ,
" var user = jsonData[0];" ,
" pm.expect(user.id).to.eql(1);" ,
" pm.expect(user.username).to.eql(\"admin\");" ,
" pm.expect(user.email).to.eql(\"info@admin.com\");" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
2018-09-12 21:29:47 +00:00
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [ ] ,
2018-12-10 06:29:12 +00:00
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
2018-09-12 21:29:47 +00:00
"url" : {
"raw" : "{{endpoint}}/api/users" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"users"
]
2018-12-10 19:43:07 +00:00
} ,
"description" : "View all users on your Statping instance."
2018-09-12 21:29:47 +00:00
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "View All Users" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/users" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"users"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:32:23 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "701"
}
] ,
"cookie" : [ ] ,
"body" : "[\n {\n \"id\": 1,\n \"username\": \"admin\",\n \"password\": \"$2a$14$KtPUxcclSu/DTwVCJ1uez.KbrQcGxWK8CKnvlXe1E8rbpALrR5IPi\",\n \"email\": \"info@admin.com\",\n \"api_key\": \"0a7181be6ce703851c59dcb8a4e47090f585d3de\",\n \"api_secret\": \"5fe0e1982f1669ed004ab59d5dc73a5ec375ae31\",\n \"admin\": true,\n \"created_at\": \"2018-12-10T11:15:41.12715-08:00\",\n \"updated_at\": \"2018-12-10T11:15:42.245315-08:00\"\n },\n {\n \"id\": 6,\n \"username\": \"adminuser2\",\n \"password\": \"$2a$14$T45y.jRn58G./bLIHO7enOl2c7Xhom9pGVuAo8.3hIPcH66.8ZwCq\",\n \"email\": \"info@adminemail.com\",\n \"api_key\": \"373b493a54c0dc8ce6f710e0b99c1fc968d691bb\",\n \"api_secret\": \"4f7c0469cf8c57032d7693edc8665379274e1f6f\",\n \"admin\": true,\n \"created_at\": \"2018-12-10T11:30:17.654832-08:00\",\n \"updated_at\": \"2018-12-10T11:30:18.699416-08:00\"\n }\n]"
}
]
2018-09-12 21:29:47 +00:00
} ,
{
2018-11-17 17:14:14 +00:00
"name" : "Create User" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "1913466d-83b2-4d5b-ac48-89c9abdd0c8d" ,
"exec" : [
"pm.test(\"Create User\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.status).to.eql(\"success\");" ,
" pm.expect(jsonData.type).to.eql(\"user\");" ,
" pm.expect(jsonData.method).to.eql(\"create\");" ,
2018-12-10 19:43:07 +00:00
" pm.globals.set(\"user_id\", jsonData.output.id);" ,
2018-11-17 17:14:14 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
2018-09-12 21:29:47 +00:00
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
2018-11-17 17:14:14 +00:00
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
}
] ,
"body" : {
"mode" : "raw" ,
2018-12-10 19:43:07 +00:00
"raw" : "{\n \"username\": \"adminuser2\",\n \"email\": \"info@adminemail.com\",\n \"password\": \"passsword123\",\n \"admin\": true\n}"
2018-11-17 17:14:14 +00:00
} ,
2018-09-12 21:29:47 +00:00
"url" : {
2018-11-17 17:14:14 +00:00
"raw" : "{{endpoint}}/api/users" ,
2018-09-12 21:29:47 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2018-11-17 17:14:14 +00:00
"users"
2018-09-12 21:29:47 +00:00
]
2018-12-10 19:43:07 +00:00
} ,
"description" : "Create a new Statping user"
2018-09-12 21:29:47 +00:00
} ,
"response" : [ ]
} ,
{
2018-11-17 17:14:14 +00:00
"name" : "View User" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "555b7ba4-bb36-4e86-a541-fa5a5008f951" ,
"exec" : [
"pm.test(\"View User\", function () {" ,
" var jsonData = pm.response.json();" ,
2018-12-10 19:43:07 +00:00
" var id = pm.globals.get(\"user_id\");" ,
" pm.expect(jsonData.id).to.eql(id);" ,
" pm.expect(jsonData.username).to.eql(\"adminuser2\");" ,
" pm.expect(jsonData.email).to.eql(\"info@adminemail.com\");" ,
2018-11-17 17:14:14 +00:00
" pm.expect(jsonData.admin).to.eql(true);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
2018-09-12 21:29:47 +00:00
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
2018-11-17 17:14:14 +00:00
"method" : "GET" ,
"header" : [ ] ,
2018-09-12 21:29:47 +00:00
"body" : {
"mode" : "raw" ,
2018-11-17 17:14:14 +00:00
"raw" : ""
2018-09-12 21:29:47 +00:00
} ,
"url" : {
2018-12-10 19:43:07 +00:00
"raw" : "{{endpoint}}/api/users/{{user_id}}" ,
2018-09-12 21:29:47 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2018-11-17 17:14:14 +00:00
"users" ,
2018-12-10 19:43:07 +00:00
"{{user_id}}"
2018-09-12 21:29:47 +00:00
]
}
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "View User" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/users/{{user_id}}" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"users" ,
"{{user_id}}"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:32:50 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "281"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"id\": 6,\n \"username\": \"adminuser2\",\n \"email\": \"info@adminemail.com\",\n \"api_key\": \"373b493a54c0dc8ce6f710e0b99c1fc968d691bb\",\n \"api_secret\": \"4f7c0469cf8c57032d7693edc8665379274e1f6f\",\n \"admin\": true,\n \"created_at\": \"2018-12-10T11:30:17.654832-08:00\",\n \"updated_at\": \"2018-12-10T11:30:18.699416-08:00\"\n}"
}
]
2018-09-12 21:29:47 +00:00
} ,
{
"name" : "Update User" ,
2018-11-17 17:14:14 +00:00
"event" : [
{
"listen" : "prerequest" ,
"script" : {
"id" : "d23b1822-d1de-4545-9a82-3cf4719a7e82" ,
"exec" : [
""
] ,
"type" : "text/javascript"
}
} ,
{
"listen" : "test" ,
"script" : {
"id" : "b0d22bbd-a428-4df3-8295-b40542bfa21f" ,
"exec" : [
"pm.test(\"Update User\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.status).to.eql(\"success\");" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
2018-09-12 21:29:47 +00:00
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
}
] ,
"body" : {
"mode" : "raw" ,
2018-11-17 17:14:14 +00:00
"raw" : "{\n \"username\": \"adminupdated\",\n \"email\": \"info@email.com\",\n \"password\": \"password12345\",\n \"admin\": true\n}"
2018-09-12 21:29:47 +00:00
} ,
"url" : {
2018-12-10 19:43:07 +00:00
"raw" : "{{endpoint}}/api/users/{{user_id}}" ,
2018-09-12 21:29:47 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"users" ,
2018-12-10 19:43:07 +00:00
"{{user_id}}"
2018-09-12 21:29:47 +00:00
]
}
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "Update User" ,
"originalRequest" : {
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
}
] ,
"body" : {
"mode" : "raw" ,
"raw" : "{\n \"username\": \"adminupdated\",\n \"email\": \"info@email.com\",\n \"password\": \"password12345\",\n \"admin\": true\n}"
} ,
"url" : {
"raw" : "{{endpoint}}/api/users/{{user_id}}" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"users" ,
"{{user_id}}"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:32:58 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "421"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"status\": \"success\",\n \"type\": \"user\",\n \"method\": \"update\",\n \"id\": 6,\n \"output\": {\n \"id\": 6,\n \"username\": \"adminupdated\",\n \"password\": \"$2a$14$fAUBFWOYtEjj/rhVkGop/Os9OPwCzNOw0ZW7naSSyAs4J7KQeZFCe\",\n \"email\": \"info@email.com\",\n \"api_key\": \"c9a5d9cba5a0062812be9d080a54080397b41058\",\n \"api_secret\": \"e81a58e019c8ce88f3272057ba67c7ab52b4a988\",\n \"admin\": true,\n \"created_at\": \"2018-12-10T11:30:17.654832-08:00\",\n \"updated_at\": \"2018-12-10T11:30:18.699416-08:00\"\n }\n}"
}
]
2018-09-12 21:29:47 +00:00
} ,
{
"name" : "Delete User" ,
2018-11-17 17:14:14 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "bd8c3425-a97f-4f8c-b849-71b65dd543ee" ,
"exec" : [
"pm.test(\"Delete User\", function () {" ,
" var jsonData = pm.response.json();" ,
2018-12-10 19:43:07 +00:00
" var id = pm.globals.get(\"user_id\");" ,
2018-11-17 17:14:14 +00:00
" pm.expect(jsonData.status).to.eql(\"success\");" ,
" pm.expect(jsonData.type).to.eql(\"user\");" ,
2018-12-10 19:43:07 +00:00
" pm.expect(jsonData.id).to.eql(id);" ,
2018-11-17 17:14:14 +00:00
" pm.expect(jsonData.method).to.eql(\"delete\");" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
2018-09-12 21:29:47 +00:00
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "DELETE" ,
"header" : [ ] ,
2018-12-10 06:29:12 +00:00
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
2018-09-12 21:29:47 +00:00
"url" : {
2018-12-10 19:43:07 +00:00
"raw" : "{{endpoint}}/api/users/{{user_id}}" ,
2018-09-12 21:29:47 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"users" ,
2018-12-10 19:43:07 +00:00
"{{user_id}}"
2018-09-12 21:29:47 +00:00
]
}
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "Delete User" ,
"originalRequest" : {
"method" : "DELETE" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/users/{{user_id}}" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"users" ,
"{{user_id}}"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:33:06 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "421"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"status\": \"success\",\n \"type\": \"user\",\n \"method\": \"delete\",\n \"id\": 6,\n \"output\": {\n \"id\": 6,\n \"username\": \"adminupdated\",\n \"password\": \"$2a$14$fAUBFWOYtEjj/rhVkGop/Os9OPwCzNOw0ZW7naSSyAs4J7KQeZFCe\",\n \"email\": \"info@email.com\",\n \"api_key\": \"c9a5d9cba5a0062812be9d080a54080397b41058\",\n \"api_secret\": \"e81a58e019c8ce88f3272057ba67c7ab52b4a988\",\n \"admin\": true,\n \"created_at\": \"2018-12-10T11:30:17.654832-08:00\",\n \"updated_at\": \"2018-12-10T11:32:58.602809-08:00\"\n }\n}"
}
]
2018-09-12 21:29:47 +00:00
}
] ,
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"event" : [
{
"listen" : "prerequest" ,
"script" : {
"id" : "9720db1a-bc4c-4e05-94ea-2782aaafb793" ,
"type" : "text/javascript" ,
"exec" : [
""
]
}
} ,
{
"listen" : "test" ,
"script" : {
"id" : "c667ae2d-41f3-4dea-ab62-3b544e2bc8f9" ,
"type" : "text/javascript" ,
"exec" : [
""
]
}
}
]
2018-11-06 09:03:21 +00:00
} ,
{
"name" : "Notifiers" ,
"item" : [
2018-11-17 17:14:14 +00:00
{
"name" : "All Notifiers" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "e9105618-6db8-4a57-ae7f-782989842f4a" ,
"exec" : [
"pm.test(\"View All Notifiers\", function () {" ,
" var jsonData = pm.response.json();" ,
2018-12-10 07:00:33 +00:00
" pm.expect(jsonData.length).to.eql(9);" ,
2018-11-17 17:14:14 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "e351393306ea245de5f9588cbe8627c74db007c6" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/notifiers" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"notifiers"
]
}
} ,
"response" : [ ]
} ,
2018-11-06 09:03:21 +00:00
{
"name" : "View Notifier" ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
2018-11-17 17:14:14 +00:00
"value" : "e351393306ea245de5f9588cbe8627c74db007c6" ,
2018-11-06 09:03:21 +00:00
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/notifier/mobile" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"notifier" ,
"mobile"
]
}
} ,
"response" : [ ]
} ,
{
"name" : "Update Notifier" ,
2018-11-17 17:14:14 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "d714d71d-4d6a-4b2e-a6ea-16c34dec3041" ,
"exec" : [
"pm.test(\"Update Notifier\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.output.method).to.eql(\"mobile\");" ,
" pm.expect(jsonData.output.enabled).to.eql(true);" ,
" pm.expect(jsonData.output.limits).to.eql(55);" ,
" pm.expect(jsonData.output.removeable).to.eql(false);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
2018-11-06 09:03:21 +00:00
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
2018-11-17 17:14:14 +00:00
"value" : "e351393306ea245de5f9588cbe8627c74db007c6" ,
2018-11-06 09:03:21 +00:00
"type" : "string"
}
]
} ,
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"value" : "application/json" ,
"type" : "text"
}
] ,
"body" : {
"mode" : "raw" ,
2018-11-17 17:14:14 +00:00
"raw" : "{\n \"method\": \"mobile\",\n \"host\": \"\",\n \"port\": 0,\n \"username\": \"\",\n \"var1\": \"ExponentPushToken[ToBadIWillError123456]\",\n \"var2\": \"\",\n \"api_key\": \"\",\n \"api_secret\": \"\",\n \"enabled\": true,\n \"limits\": 55\n}"
2018-11-06 09:03:21 +00:00
} ,
"url" : {
"raw" : "{{endpoint}}/api/notifier/mobile" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"notifier" ,
"mobile"
]
}
} ,
"response" : [ ]
}
] ,
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
2018-11-17 17:14:14 +00:00
"value" : "e351393306ea245de5f9588cbe8627c74db007c6" ,
2018-11-06 09:03:21 +00:00
"type" : "string"
}
]
}
2018-11-17 17:14:14 +00:00
} ,
{
"name" : "Messages" ,
"item" : [
{
"name" : "All Messages" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "3c484d1b-6e77-4084-b844-3ca77dc50108" ,
"exec" : [
"pm.test(\"View All Messages\", function () {" ,
" var jsonData = pm.response.json();" ,
2018-12-10 19:43:07 +00:00
" pm.expect(jsonData.length).to.be.at.least(2);" ,
2018-11-17 17:14:14 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"method" : "GET" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/messages" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"messages"
]
}
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "All Messages" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/messages" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"messages"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:33:17 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "1169"
}
] ,
"cookie" : [ ] ,
"body" : "[\n {\n \"id\": 1,\n \"title\": \"Routine Downtime\",\n \"description\": \"This is an example a upcoming message for a service!\",\n \"start_on\": \"2018-12-10T11:30:42.259843-08:00\",\n \"end_on\": \"2018-12-10T13:15:42.259844-08:00\",\n \"service\": 1,\n \"notify_users\": null,\n \"notify_method\": \"\",\n \"notify_before\": null,\n \"notify_before_scale\": \"\",\n \"created_at\": \"2018-12-10T11:15:42.259845-08:00\",\n \"updated_at\": \"2018-12-10T11:15:42.260024-08:00\"\n },\n {\n \"id\": 2,\n \"title\": \"Server Reboot\",\n \"description\": \"This is another example a upcoming message for a service!\",\n \"start_on\": \"2018-12-10T11:30:42.261412-08:00\",\n \"end_on\": \"2018-12-10T13:15:42.261413-08:00\",\n \"service\": 3,\n \"notify_users\": null,\n \"notify_method\": \"\",\n \"notify_before\": null,\n \"notify_before_scale\": \"\",\n \"created_at\": \"2018-12-10T11:15:42.261414-08:00\",\n \"updated_at\": \"2018-12-10T11:15:42.261494-08:00\"\n },\n {\n \"id\": 4,\n \"title\": \"API Message\",\n \"description\": \"This is an example a upcoming message for a service!\",\n \"start_on\": \"2022-11-17T03:28:16.323797-08:00\",\n \"end_on\": \"2022-11-17T05:13:16.323798-08:00\",\n \"service\": 1,\n \"notify_users\": true,\n \"notify_method\": \"email\",\n \"notify_before\": 6,\n \"notify_before_scale\": \"hour\",\n \"created_at\": \"2018-12-10T11:16:42.658695-08:00\",\n \"updated_at\": \"2018-12-10T11:16:42.658771-08:00\"\n }\n]"
}
]
2018-11-17 17:14:14 +00:00
} ,
{
"name" : "Create Message" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "12caf74a-61d7-4f6e-89b5-fca2f65464c4" ,
"exec" : [
"pm.test(\"Create Message\", function () {" ,
" var jsonData = pm.response.json();" ,
2018-11-25 03:56:09 +00:00
" var object = jsonData.output;" ,
" pm.expect(object.title).to.eql(\"API Message\");" ,
" pm.expect(object.description).to.eql(\"This is an example a upcoming message for a service!\");" ,
" pm.expect(object.service).to.eql(1);" ,
" pm.expect(object.notify_before).to.eql(6);" ,
" pm.expect(object.notify_before_scale).to.eql(\"hour\");" ,
2018-12-10 19:43:07 +00:00
" pm.globals.set(\"message_id\", object.id);" ,
2018-11-17 17:14:14 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"value" : "application/json" ,
"type" : "text"
}
] ,
"body" : {
"mode" : "raw" ,
2018-11-25 03:56:09 +00:00
"raw" : "{\n \"title\": \"API Message\",\n \"description\": \"This is an example a upcoming message for a service!\",\n \"start_on\": \"2022-11-17T03:28:16.323797-08:00\",\n \"end_on\": \"2022-11-17T05:13:16.323798-08:00\",\n \"service\": 1,\n \"notify_users\": true,\n \"notify_method\": \"email\",\n \"notify_before\": 6,\n \"notify_before_scale\": \"hour\"\n}"
2018-11-17 17:14:14 +00:00
} ,
"url" : {
"raw" : "{{endpoint}}/api/messages" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"messages"
]
}
} ,
2018-12-10 19:43:07 +00:00
"response" : [
2018-11-17 17:14:14 +00:00
{
2018-12-10 19:43:07 +00:00
"name" : "Create Message" ,
"originalRequest" : {
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"value" : "application/json" ,
"type" : "text"
}
2018-11-17 17:14:14 +00:00
] ,
2018-12-10 19:43:07 +00:00
"body" : {
"mode" : "raw" ,
"raw" : "{\n \"title\": \"API Message\",\n \"description\": \"This is an example a upcoming message for a service!\",\n \"start_on\": \"2022-11-17T03:28:16.323797-08:00\",\n \"end_on\": \"2022-11-17T05:13:16.323798-08:00\",\n \"service\": 1,\n \"notify_users\": true,\n \"notify_method\": \"email\",\n \"notify_before\": 6,\n \"notify_before_scale\": \"hour\"\n}"
} ,
"url" : {
"raw" : "{{endpoint}}/api/messages" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"messages"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:33:25 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "456"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"status\": \"success\",\n \"type\": \"message\",\n \"method\": \"create\",\n \"id\": 8,\n \"output\": {\n \"id\": 8,\n \"title\": \"API Message\",\n \"description\": \"This is an example a upcoming message for a service!\",\n \"start_on\": \"2022-11-17T03:28:16.323797-08:00\",\n \"end_on\": \"2022-11-17T05:13:16.323798-08:00\",\n \"service\": 1,\n \"notify_users\": true,\n \"notify_method\": \"email\",\n \"notify_before\": 6,\n \"notify_before_scale\": \"hour\",\n \"created_at\": \"2018-12-10T19:33:25.875858Z\",\n \"updated_at\": \"2018-12-10T11:33:25.875947-08:00\"\n }\n}"
}
]
} ,
{
"name" : "View Message" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "c30cc333-53f4-4e9a-9c32-958c905ec163" ,
"exec" : [
"pm.test(\"View Message\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.title).to.eql(\"API Message\");" ,
" pm.expect(jsonData.service).to.eql(1);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"method" : "GET" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/messages/{{message_id}}" ,
"host" : [
2018-11-17 17:14:14 +00:00
"{{endpoint}}"
] ,
"path" : [
"api" ,
"messages" ,
2018-12-10 19:43:07 +00:00
"{{message_id}}"
2018-11-17 17:14:14 +00:00
]
}
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "View Message" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/messages/{{message_id}}" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"messages" ,
"{{message_id}}"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:33:33 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "389"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"id\": 8,\n \"title\": \"API Message\",\n \"description\": \"This is an example a upcoming message for a service!\",\n \"start_on\": \"2022-11-17T03:28:16.323797-08:00\",\n \"end_on\": \"2022-11-17T05:13:16.323798-08:00\",\n \"service\": 1,\n \"notify_users\": true,\n \"notify_method\": \"email\",\n \"notify_before\": 6,\n \"notify_before_scale\": \"hour\",\n \"created_at\": \"2018-12-10T11:33:25.875858-08:00\",\n \"updated_at\": \"2018-12-10T11:33:25.875947-08:00\"\n}"
}
]
2018-11-17 17:14:14 +00:00
} ,
{
"name" : "Update Message" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2018-11-25 03:56:09 +00:00
"id" : "e9dd78cc-0f38-4516-bf82-38dd3451b2e7" ,
2018-11-17 17:14:14 +00:00
"exec" : [
"pm.test(\"Update Message\", function () {" ,
" var jsonData = pm.response.json();" ,
2018-11-25 03:56:09 +00:00
" var object = jsonData.output;" ,
" pm.expect(object.title).to.eql(\"Updated Message\");" ,
" pm.expect(object.description).to.eql(\"This message was updated\");" ,
" pm.expect(object.service).to.eql(1);" ,
" pm.expect(object.notify_before).to.eql(3);" ,
" pm.expect(object.notify_before_scale).to.eql(\"hour\");" ,
2018-11-17 17:14:14 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"value" : "application/json" ,
"type" : "text"
}
] ,
"body" : {
"mode" : "raw" ,
2018-11-25 03:56:09 +00:00
"raw" : "{\n \"title\": \"Updated Message\",\n \"description\": \"This message was updated\",\n \"start_on\": \"2022-11-17T03:28:16.323797-08:00\",\n \"end_on\": \"2022-11-17T05:13:16.323798-08:00\",\n \"service\": 1,\n \"notify_users\": true,\n \"notify_method\": \"email\",\n \"notify_before\": 3,\n \"notify_before_scale\": \"hour\"\n}"
2018-11-17 17:14:14 +00:00
} ,
"url" : {
2018-12-10 19:43:07 +00:00
"raw" : "{{endpoint}}/api/messages/{{message_id}}" ,
2018-11-17 17:14:14 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"messages" ,
2018-12-10 19:43:07 +00:00
"{{message_id}}"
2018-11-17 17:14:14 +00:00
]
}
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "Update Message" ,
"originalRequest" : {
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"value" : "application/json" ,
"type" : "text"
}
] ,
"body" : {
"mode" : "raw" ,
"raw" : "{\n \"title\": \"Updated Message\",\n \"description\": \"This message was updated\",\n \"start_on\": \"2022-11-17T03:28:16.323797-08:00\",\n \"end_on\": \"2022-11-17T05:13:16.323798-08:00\",\n \"service\": 1,\n \"notify_users\": true,\n \"notify_method\": \"email\",\n \"notify_before\": 3,\n \"notify_before_scale\": \"hour\"\n}"
} ,
"url" : {
"raw" : "{{endpoint}}/api/messages/{{message_id}}" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"messages" ,
"{{message_id}}"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:33:39 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "437"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"status\": \"success\",\n \"type\": \"message\",\n \"method\": \"update\",\n \"id\": 8,\n \"output\": {\n \"id\": 8,\n \"title\": \"Updated Message\",\n \"description\": \"This message was updated\",\n \"start_on\": \"2022-11-17T03:28:16.323797-08:00\",\n \"end_on\": \"2022-11-17T05:13:16.323798-08:00\",\n \"service\": 1,\n \"notify_users\": true,\n \"notify_method\": \"email\",\n \"notify_before\": 3,\n \"notify_before_scale\": \"hour\",\n \"created_at\": \"2018-12-10T11:33:25.875858-08:00\",\n \"updated_at\": \"2018-12-10T11:33:25.875947-08:00\"\n }\n}"
}
]
2018-11-17 17:14:14 +00:00
} ,
{
"name" : "Delete Message" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "6cb2527f-41c2-4feb-9573-1e4d59efa116" ,
"exec" : [
"pm.test(\"Delete Message\", function () {" ,
" var jsonData = pm.response.json();" ,
2018-12-10 19:43:07 +00:00
" var id = pm.globals.get(\"message_id\");" ,
2018-11-17 17:14:14 +00:00
" pm.expect(jsonData.status).to.eql(\"success\");" ,
" pm.expect(jsonData.method).to.eql(\"delete\");" ,
" pm.expect(jsonData.type).to.eql(\"message\");" ,
2018-12-10 19:43:07 +00:00
" pm.expect(jsonData.id).to.eql(id);" ,
2018-11-17 17:14:14 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"method" : "DELETE" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
2018-12-10 19:43:07 +00:00
"raw" : "{{endpoint}}/api/messages/{{message_id}}" ,
2018-11-17 17:14:14 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"messages" ,
2018-12-10 19:43:07 +00:00
"{{message_id}}"
2018-11-17 17:14:14 +00:00
]
}
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "Delete Message" ,
"originalRequest" : {
"method" : "DELETE" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/messages/{{message_id}}" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"messages" ,
"{{message_id}}"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:33:47 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "437"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"status\": \"success\",\n \"type\": \"message\",\n \"method\": \"delete\",\n \"id\": 8,\n \"output\": {\n \"id\": 8,\n \"title\": \"Updated Message\",\n \"description\": \"This message was updated\",\n \"start_on\": \"2022-11-17T03:28:16.323797-08:00\",\n \"end_on\": \"2022-11-17T05:13:16.323798-08:00\",\n \"service\": 1,\n \"notify_users\": true,\n \"notify_method\": \"email\",\n \"notify_before\": 3,\n \"notify_before_scale\": \"hour\",\n \"created_at\": \"2018-12-10T11:33:25.875858-08:00\",\n \"updated_at\": \"2018-12-10T11:33:39.797941-08:00\"\n }\n}"
}
]
2018-11-17 17:14:14 +00:00
}
]
2018-11-21 03:39:40 +00:00
} ,
{
"name" : "Checkins" ,
"item" : [
2018-11-21 04:29:21 +00:00
{
"name" : "Create Checkin" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "af07a95b-1bf5-42c7-bd3f-a32f3ab2a264" ,
"exec" : [
"pm.test(\"Create Checkin\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.status).to.eql(\"success\");" ,
" pm.expect(jsonData.type).to.eql(\"checkin\");" ,
" pm.expect(jsonData.output.name).to.eql(\"Server Checkin\");" ,
" pm.expect(jsonData.output.grace).to.eql(60);" ,
" pm.expect(jsonData.output.interval).to.eql(900);" ,
" var id = jsonData.output.api_key;" ,
" pm.globals.set(\"checkin_id\", id);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"value" : "application/json" ,
"type" : "text"
}
] ,
"body" : {
"mode" : "raw" ,
2018-12-10 06:29:12 +00:00
"raw" : "{\n \"service_id\": 2,\n \"name\": \"Server Checkin\",\n \"interval\": 900,\n \"grace\": 60\n}"
2018-11-21 04:29:21 +00:00
} ,
"url" : {
"raw" : "{{endpoint}}/api/checkin" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"checkin"
]
}
} ,
"response" : [
{
"name" : "Create Checkin" ,
"originalRequest" : {
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"value" : "application/json" ,
"type" : "text"
}
] ,
"body" : {
"mode" : "raw" ,
2018-12-10 19:43:07 +00:00
"raw" : "{\n \"service_id\": 2,\n \"name\": \"Server Checkin\",\n \"interval\": 900,\n \"grace\": 60\n}"
2018-11-21 04:29:21 +00:00
} ,
"url" : {
"raw" : "{{endpoint}}/api/checkin" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"checkin"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2018-12-10 19:43:07 +00:00
"value" : "Mon, 10 Dec 2018 19:34:10 GMT"
2018-11-21 04:29:21 +00:00
} ,
{
"key" : "Content-Length" ,
2018-12-10 19:43:07 +00:00
"value" : "330"
2018-11-21 04:29:21 +00:00
}
] ,
"cookie" : [ ] ,
2018-12-10 19:43:07 +00:00
"body" : "{\n \"status\": \"success\",\n \"type\": \"checkin\",\n \"method\": \"create\",\n \"id\": 5,\n \"output\": {\n \"id\": 5,\n \"service_id\": 2,\n \"name\": \"Server Checkin\",\n \"interval\": 900,\n \"grace\": 60,\n \"api_key\": \"1emn9ha\",\n \"created_at\": \"2018-12-10T19:34:10.991372Z\",\n \"updated_at\": \"2018-12-10T19:34:10.991372Z\",\n \"failing\": false,\n \"last_hit\": \"0001-01-01T00:00:00Z\",\n \"hits\": null,\n \"failures\": null\n }\n}"
2018-11-21 04:29:21 +00:00
}
]
} ,
2018-11-21 03:39:40 +00:00
{
2018-12-10 19:43:07 +00:00
"name" : "View All Checkin's" ,
2018-11-21 03:39:40 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2018-12-10 19:43:07 +00:00
"id" : "54bded63-de27-4839-8783-25874c35c3ea" ,
2018-11-21 03:39:40 +00:00
"exec" : [
2018-12-10 19:43:07 +00:00
"pm.test(\"View All Checkins\", function () {" ,
2018-11-21 03:39:40 +00:00
" var jsonData = pm.response.json();" ,
2018-12-10 19:43:07 +00:00
" var first = jsonData[0];" ,
" var id = pm.globals.get(\"checkin_id\");" ,
" pm.expect(first.name).to.eql(\"Server Checkin\");" ,
" pm.expect(first.api_key).to.eql(id);" ,
" pm.expect(first.grace).to.eql(60);" ,
" pm.expect(first.interval).to.eql(900);" ,
2018-11-21 03:39:40 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"method" : "GET" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
2018-12-10 19:43:07 +00:00
"raw" : "{{endpoint}}/api/checkins" ,
2018-11-21 03:39:40 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
2018-12-10 19:43:07 +00:00
"api" ,
"checkins"
2018-11-21 03:39:40 +00:00
]
}
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "View All Checkin's" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/checkins" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"checkins"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:34:16 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "268"
}
] ,
"cookie" : [ ] ,
"body" : "[\n {\n \"id\": 5,\n \"service_id\": 2,\n \"name\": \"Server Checkin\",\n \"interval\": 900,\n \"grace\": 60,\n \"api_key\": \"1emn9ha\",\n \"created_at\": \"2018-12-10T11:34:10.991372-08:00\",\n \"updated_at\": \"2018-12-10T11:34:10.991372-08:00\",\n \"failing\": false,\n \"last_hit\": \"0001-01-01T00:00:00Z\",\n \"hits\": [],\n \"failures\": null\n }\n]"
}
]
2018-11-21 03:39:40 +00:00
} ,
{
2018-12-10 19:43:07 +00:00
"name" : "Run Checkin" ,
2018-11-21 03:39:40 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2018-12-10 19:43:07 +00:00
"id" : "652a1c5b-5379-43c2-9cd8-ebd8f8dad0f6" ,
2018-11-21 03:39:40 +00:00
"exec" : [
2018-12-10 19:43:07 +00:00
"pm.test(\"Hit the Checkin API Endpoint\", function () {" ,
2018-11-21 03:39:40 +00:00
" var jsonData = pm.response.json();" ,
2018-12-10 19:43:07 +00:00
" pm.expect(jsonData.status).to.eql(\"success\");" ,
" pm.expect(jsonData.type).to.eql(\"checkin_hit\");" ,
" pm.expect(jsonData.method).to.eql(\"update\");" ,
2018-11-21 03:39:40 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"method" : "GET" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
2018-12-10 19:43:07 +00:00
"raw" : "{{endpoint}}/checkin/{{checkin_id}}" ,
2018-11-21 03:39:40 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"checkin" ,
2018-11-21 04:29:21 +00:00
"{{checkin_id}}"
2018-11-21 03:39:40 +00:00
]
}
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "Run Checkin" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/checkin/{{checkin_id}}" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"checkin" ,
"{{checkin_id}}"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:34:23 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "147"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"status\": \"success\",\n \"type\": \"checkin_hit\",\n \"method\": \"update\",\n \"id\": 5,\n \"output\": {\n \"id\": 5,\n \"from\": \"127.0.0.1\",\n \"created_at\": \"2018-12-10T19:34:23.442087Z\"\n }\n}"
}
]
2018-11-21 03:39:40 +00:00
} ,
{
2018-12-10 19:43:07 +00:00
"name" : "View Checkin" ,
2018-11-21 04:29:21 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2018-12-10 19:43:07 +00:00
"id" : "93ff6b86-368b-406f-9d75-07338714ebca" ,
2018-11-21 04:29:21 +00:00
"exec" : [
2018-12-10 19:43:07 +00:00
"pm.test(\"View Checkin\", function () {" ,
2018-11-21 04:29:21 +00:00
" var jsonData = pm.response.json();" ,
" var id = pm.globals.get(\"checkin_id\");" ,
2018-12-10 19:43:07 +00:00
" pm.expect(jsonData.name).to.eql(\"Server Checkin\");" ,
" pm.expect(jsonData.api_key).to.eql(id);" ,
" pm.expect(jsonData.grace).to.eql(60);" ,
" pm.expect(jsonData.interval).to.eql(900);" ,
2018-11-21 04:29:21 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
2018-11-21 03:39:40 +00:00
"request" : {
"method" : "GET" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
2018-12-10 19:43:07 +00:00
"raw" : "{{endpoint}}/api/checkin/{{checkin_id}}" ,
2018-11-21 03:39:40 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2018-12-10 19:43:07 +00:00
"checkin" ,
"{{checkin_id}}"
2018-11-21 03:39:40 +00:00
]
}
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "View Checkin" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/checkin/{{checkin_id}}" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"checkin" ,
"{{checkin_id}}"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:34:29 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "338"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"id\": 5,\n \"service_id\": 2,\n \"name\": \"Server Checkin\",\n \"interval\": 900,\n \"grace\": 60,\n \"api_key\": \"1emn9ha\",\n \"created_at\": \"2018-12-10T19:34:10.991372Z\",\n \"updated_at\": \"2018-12-10T19:34:10.991372Z\",\n \"failing\": false,\n \"last_hit\": \"2018-12-10T11:34:23.443663-08:00\",\n \"hits\": [\n {\n \"id\": 5,\n \"from\": \"127.0.0.1\",\n \"created_at\": \"2018-12-10T19:34:23.442087Z\"\n }\n ],\n \"failures\": null\n}"
}
]
2018-11-21 03:39:40 +00:00
} ,
{
2018-11-21 04:29:21 +00:00
"name" : "Delete Checkin" ,
"event" : [
2018-11-21 03:39:40 +00:00
{
2018-11-21 04:29:21 +00:00
"listen" : "test" ,
"script" : {
"id" : "d3fdc6b9-d8ca-4634-a735-af8db0f31cef" ,
"exec" : [
"pm.test(\"Delete Checkin\", function () {" ,
" var jsonData = pm.response.json();" ,
" var id = pm.globals.get(\"checkin_id\");" ,
" pm.expect(jsonData.status).to.eql(\"success\");" ,
" pm.expect(jsonData.type).to.eql(\"checkin\");" ,
" pm.expect(jsonData.method).to.eql(\"delete\");" ,
" pm.expect(jsonData.output.api_key).to.eql(id);" ,
"});"
2018-11-21 03:39:40 +00:00
] ,
2018-11-21 04:29:21 +00:00
"type" : "text/javascript"
}
2018-11-21 03:39:40 +00:00
}
2018-11-21 04:29:21 +00:00
] ,
2018-11-21 03:39:40 +00:00
"request" : {
"method" : "DELETE" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
2018-11-21 04:29:21 +00:00
"raw" : "{{endpoint}}/api/checkin/{{checkin_id}}" ,
2018-11-21 03:39:40 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"checkin" ,
2018-11-21 04:29:21 +00:00
"{{checkin_id}}"
2018-11-21 03:39:40 +00:00
]
}
} ,
2018-12-10 19:43:07 +00:00
"response" : [
{
"name" : "Delete Checkin" ,
"originalRequest" : {
"method" : "DELETE" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/checkin/{{checkin_id}}" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"checkin" ,
"{{checkin_id}}"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Mon, 10 Dec 2018 19:34:35 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "410"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"status\": \"success\",\n \"type\": \"checkin\",\n \"method\": \"delete\",\n \"id\": 5,\n \"output\": {\n \"id\": 5,\n \"service_id\": 2,\n \"name\": \"Server Checkin\",\n \"interval\": 900,\n \"grace\": 60,\n \"api_key\": \"1emn9ha\",\n \"created_at\": \"2018-12-10T19:34:10.991372Z\",\n \"updated_at\": \"2018-12-10T19:34:10.991372Z\",\n \"failing\": false,\n \"last_hit\": \"2018-12-10T11:34:23.443663-08:00\",\n \"hits\": [\n {\n \"id\": 5,\n \"from\": \"127.0.0.1\",\n \"created_at\": \"2018-12-10T19:34:23.442087Z\"\n }\n ],\n \"failures\": null\n }\n}"
}
]
2018-11-21 03:39:40 +00:00
}
]
2018-09-12 21:29:47 +00:00
}
]
}