2020-03-13 04:06:06 +00:00
{
"info" : {
2020-05-18 20:50:09 +00:00
"_postman_id" : "3c6a7841-0b39-4878-a3a6-1c76832b7679" ,
2020-03-13 04:06:06 +00:00
"name" : "Statping" ,
2020-05-18 20:50:09 +00:00
"description" : "The Statping API allows you to programmatically access data on your Statping server.\n\nThe easiest way to get started with the API is by running your own Docker or local instance of the Statping server.\n\n<img width=\"100%\" src=\"https://img.cjx.io/statuptokenbalance.gif\">\n\n# Authentication\n\nAn API Key is required to be sent as part of every request to the Statping API, by using the `Authorization` and the API Secret Key as a header.\n\n> If you do not have an API Secret Key, you can find it on the Settings page.\n\nYou can Authenticate by implementing the following...\n- Using the `Authorization` header with API Secret Key\n- Setting `GO_ENV` to `test` to bypass all authentication\n- Adding `?api=<keyhere>` URL Query along with the API Secret Key\n- Being logged into Statping as an admin (using JWT sessions/cookies)\n\n> Authentication will create a cookie named `statping_auth`.\n\n# Environment Variables\nStatping includes many environment variables that can give you more control over your instance. Please view the [Environment Variables Wiki](https://github.com/statping/statping/wiki/Environment-Variables) page to view a complete list. Below are a couple important ones...\n- `STATPING_DIR` - Statping's working directory. By default, this will be set to the current working directory. This path will contain the `config.yml` file, `logs`, and `assets` folder. \n- `SASS` - Absolute path to the `sass` executable. By default it will attempt to find `sass` in your `$PATH`. \n\n# Demo\nYou can checkout the Statping Demo instance at [https://demo.statping.com](https://demo.statping.com). All features are available for you to experiment with. The API Secret Key is `demoapisecret123`. Since this instance is public, it will be reset with sample data **every 90 minutes**.\n" ,
2020-03-13 04:06:06 +00:00
"schema" : "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
} ,
"item" : [
2020-04-16 09:57:00 +00:00
{
2020-05-02 02:40:14 +00:00
"name" : "Setup" ,
2020-04-16 09:57:00 +00:00
"item" : [
{
"name" : "Statping Setup" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "29b5dc8d-60c1-4f70-853d-49114af6b254" ,
2020-04-16 09:57:00 +00:00
"exec" : [
2020-05-02 02:40:14 +00:00
"var tm = Math.round(new Date().getTime()/1000);" ,
"pm.globals.set(\"start_time\", tm-259200);" ,
"pm.globals.set(\"end_time\", tm);" ,
"" ,
2020-04-16 09:57:00 +00:00
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
"pm.test(\"Check Core API Route\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.config.connection).to.eql(\"sqlite3\");" ,
"});"
] ,
"type" : "text/javascript"
}
2020-05-18 20:50:09 +00:00
} ,
{
"listen" : "prerequest" ,
"script" : {
"id" : "e5e9ea08-21d1-48d6-b019-9b4f93e813e5" ,
"exec" : [
""
] ,
"type" : "text/javascript"
}
2020-04-16 09:57:00 +00:00
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
2020-05-02 02:40:14 +00:00
"type" : "text" ,
"value" : "application/x-www-form-urlencoded"
2020-04-16 09:57:00 +00:00
}
] ,
"body" : {
"mode" : "urlencoded" ,
"urlencoded" : [
{
"key" : "db_host" ,
"value" : "localhost" ,
"type" : "text"
} ,
{
"key" : "db_user" ,
2020-05-18 20:50:09 +00:00
"value" : "{{db_user}}" ,
2020-04-16 09:57:00 +00:00
"type" : "text"
} ,
{
"key" : "db_password" ,
2020-05-18 20:50:09 +00:00
"value" : "{{db_password}}" ,
2020-04-16 09:57:00 +00:00
"type" : "text"
} ,
{
"key" : "db_database" ,
2020-05-18 20:50:09 +00:00
"value" : "{{db_database}}" ,
2020-04-16 09:57:00 +00:00
"type" : "text"
} ,
{
"key" : "db_connection" ,
2020-05-18 20:50:09 +00:00
"value" : "{{db_connection}}" ,
2020-04-16 09:57:00 +00:00
"type" : "text"
} ,
{
"key" : "db_port" ,
2020-05-18 20:50:09 +00:00
"value" : "{{db_port}}" ,
2020-04-16 09:57:00 +00:00
"type" : "text"
} ,
{
"key" : "project" ,
"value" : "Statping Monitoring Sample Data" ,
"type" : "text"
} ,
{
"key" : "description" ,
"value" : "View All Example Services" ,
"type" : "text"
} ,
{
"key" : "username" ,
"value" : "admin" ,
"type" : "text"
} ,
{
"key" : "password" ,
"value" : "admin" ,
"type" : "text"
} ,
{
"key" : "domain" ,
"value" : "http://localhost:8080" ,
"type" : "text"
} ,
{
"key" : "email" ,
"value" : "info@domain.com" ,
"type" : "text"
} ,
{
"key" : "sample_data" ,
"value" : "true" ,
"type" : "text"
}
] ,
"options" : {
"urlencoded" : { }
}
} ,
"url" : {
"raw" : "{{endpoint}}/api/setup" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"setup"
]
} ,
2020-05-02 02:40:14 +00:00
"description" : "This endpoint will setup the database, users, sample data, and all other elements for a brand new installation of Statping. By default, the admin login is `admin` `admin`, if you don't include a username/password.\n\n###### If the server has already been setup, this endpoint will return an error.\n```json\n{\n \"error\": \"Statping has already been setup\"\n}\n```\n\n### Database Fields\n- `db_connection` - Database connection type. (sqlite, mysql, postgres)\n- `db_user` - Username for database\n- `db_password` - Password for database\n- `db_database` - Database name for Statping\n- `db_port` - Port number for the database\n- `db_host` - Hostname or IP for the running database server"
2020-04-16 09:57:00 +00:00
} ,
"response" : [ ]
2020-05-02 02:40:14 +00:00
}
] ,
"description" : "If your Statping instance is not setup yet, then you can set it up by going to `http://localhost:8080/setup` or by using this API endpoint. Once your instance has already been setup successfully, this endpoint will return an error. \n\n<img src=\"https://img.cjx.io/statping-setup.png\">" ,
"event" : [
{
"listen" : "prerequest" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "ee74f82f-761a-46ae-a183-044b3d17c416" ,
2020-05-02 02:40:14 +00:00
"type" : "text/javascript" ,
"exec" : [
""
]
}
2020-04-16 09:57:00 +00:00
} ,
2020-05-02 02:40:14 +00:00
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "99e1ad44-98bc-431c-bec6-d5b4ea3b94ac" ,
2020-05-02 02:40:14 +00:00
"type" : "text/javascript" ,
"exec" : [
""
]
}
}
] ,
"protocolProfileBehavior" : { }
} ,
{
"name" : "Miscellaneous" ,
"item" : [
2020-04-16 09:57:00 +00:00
{
"name" : "Statping Details" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "fb5b5fcf-86a0-4d22-9f4c-cc6955eb414a" ,
2020-04-16 09:57:00 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
"pm.test(\"Check Core API Route\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.name).to.eql(\"Statping Monitoring Sample Data\");" ,
" pm.expect(jsonData.using_cdn).to.eql(false);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api"
]
} ,
"description" : "The root API endpoint to view basic Statping configuration including Name, URL, database type, and other useful fields."
} ,
2020-05-02 02:40:14 +00:00
"response" : [
{
"name" : "Statping Details" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Length" ,
"value" : "398"
} ,
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Sat, 02 May 2020 01:06:09 GMT"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"admin\": false,\n \"allow_reports\": false,\n \"created_at\": \"2020-05-02T01:00:07.885973685Z\",\n \"description\": \"This data is only used to testing\",\n \"domain\": \"http://localhost:8080\",\n \"footer\": null,\n \"logged_in\": false,\n \"migration_id\": 1588381207,\n \"name\": \"Statping Sample Data\",\n \"setup\": true,\n \"started_on\": \"2020-05-02T01:00:14.255837864Z\",\n \"updated_at\": \"2020-05-02T01:00:12.731269305Z\",\n \"using_cdn\": false,\n \"version\": \"0.90.34\"\n}"
}
]
} ,
2020-05-18 20:50:09 +00:00
{
"name" : "Logs" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "a694b786-796e-4d54-87fc-1848525bba65" ,
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api/logs" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"logs"
]
} ,
"description" : "This endpoint will return a list of the last 1,000 logs."
} ,
"response" : [
{
"name" : "Statping Details" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Length" ,
"value" : "398"
} ,
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Sat, 02 May 2020 01:06:09 GMT"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"admin\": false,\n \"allow_reports\": false,\n \"created_at\": \"2020-05-02T01:00:07.885973685Z\",\n \"description\": \"This data is only used to testing\",\n \"domain\": \"http://localhost:8080\",\n \"footer\": null,\n \"logged_in\": false,\n \"migration_id\": 1588381207,\n \"name\": \"Statping Sample Data\",\n \"setup\": true,\n \"started_on\": \"2020-05-02T01:00:14.255837864Z\",\n \"updated_at\": \"2020-05-02T01:00:12.731269305Z\",\n \"using_cdn\": false,\n \"version\": \"0.90.34\"\n}"
}
]
} ,
{
"name" : "Logs Last Line" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "21501cae-bea0-4b6a-87cc-32a7f6da0771" ,
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api/logs" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"logs"
]
} ,
"description" : "This endpoint will return the last line in the logs."
} ,
"response" : [
{
"name" : "Statping Details" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Length" ,
"value" : "398"
} ,
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Sat, 02 May 2020 01:06:09 GMT"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"admin\": false,\n \"allow_reports\": false,\n \"created_at\": \"2020-05-02T01:00:07.885973685Z\",\n \"description\": \"This data is only used to testing\",\n \"domain\": \"http://localhost:8080\",\n \"footer\": null,\n \"logged_in\": false,\n \"migration_id\": 1588381207,\n \"name\": \"Statping Sample Data\",\n \"setup\": true,\n \"started_on\": \"2020-05-02T01:00:14.255837864Z\",\n \"updated_at\": \"2020-05-02T01:00:12.731269305Z\",\n \"using_cdn\": false,\n \"version\": \"0.90.34\"\n}"
}
]
} ,
2020-05-02 02:40:14 +00:00
{
"name" : "Health Check" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "1259b7bb-a330-4716-ae7c-386f96224a14" ,
2020-05-02 02:40:14 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
"pm.test(\"Check Health\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.online).to.eql(true);" ,
" pm.expect(jsonData.setup).to.eql(true);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "noauth"
} ,
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/health" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"health"
]
} ,
"description" : "Check the status of your Statping instance. If everything is healthy, it will return a status code of 200 with the following JSON response."
} ,
"response" : [
{
"name" : "Statping Health Check" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/health" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"health"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Length" ,
"value" : "42"
} ,
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Sat, 02 May 2020 01:03:29 GMT"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"online\": true,\n \"services\": 6,\n \"setup\": true\n}"
}
]
2020-04-16 09:57:00 +00:00
} ,
{
2020-05-02 02:40:14 +00:00
"name" : "Prometheus Metrics" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "04a41c9d-0659-44f8-9efb-d04fff1af6e3" ,
2020-05-02 02:40:14 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/metrics" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"metrics"
]
} ,
"description" : "Point your Prometheus endpoint to `/metrics`, it will include most data from all elements including golang processes. View more information by checking out the [Prometheus Wiki](https://github.com/statping/statping/wiki/Prometheus-Exporter)."
} ,
"response" : [
{
"name" : "Prometheus Metrics" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/metrics" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"metrics"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "plain" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "text/plain; charset=utf-8"
} ,
{
"key" : "Date" ,
"value" : "Sat, 02 May 2020 01:05:53 GMT"
} ,
{
"key" : "Transfer-Encoding" ,
"value" : "chunked"
}
] ,
"cookie" : [ ] ,
"body" : "# Statping Prometheus Exporter\n\n# Statping Totals\nstatping_total_failures 1617\nstatping_total_services 6\nstatping_seconds_online 347.8779\n\n# Service #1 'Google':\nstatping_service_failures{id=\"1\" name=\"Google\"} 404\nstatping_service_latency{id=\"1\" name=\"Google\"} 115217\nstatping_service_online{id=\"1\" name=\"Google\"} 1\nstatping_service_status_code{id=\"1\" name=\"Google\"} 200\nstatping_service_response_length{id=\"1\" name=\"Google\"} 14366\nstatping_service_ping_time{id=\"1\" name=\"Google\"} 13604\nstatping_service_last_latency{id=\"1\" name=\"Google\"} 115217\nstatping_service_last_lookup{id=\"1\" name=\"Google\"} 13604\nstatping_service_last_check{id=\"1\" name=\"Google\"} 9074\n\n# Service #2 'Statping Github':\nstatping_service_failures{id=\"2\" name=\"Statping Github\"} 407\nstatping_service_latency{id=\"2\" name=\"Statping Github\"} 121795\nstatping_service_online{id=\"2\" name=\"Statping Github\"} 1\nstatping_service_status_code{id=\"2\" name=\"Statping Github\"} 200\nstatping_service_response_length{id=\"2\" name=\"Statping Github\"} 154781\nstatping_service_ping_time{id=\"2\" name=\"Statping Github\"} 14089\nstatping_service_last_latency{id=\"2\" name=\"Statping Github\"} 121795\nstatping_service_last_lookup{id=\"2\" name=\"Statping Github\"} 14089\nstatping_service_last_check{id=\"2\" name=\"Statping Github\"} 8799\n\n# Service #3 'JSON Users Test':\nstatping_service_failures{id=\"3\" name=\"JSON Users Test\"} 403\nstatping_service_latency{id=\"3\" name=\"JSON Users Test\"} 43900\nstatping_service_online{id=\"3\" name=\"JSON Users Test\"} 1\nstatping_service_status_code{id=\"3\" name=\"JSON Users Test\"} 200\nstatping_service_response_length{id=\"3\" name=\"JSON Users Test\"} 5645\nstatping_service_ping_time{id=\"3\" name=\"JSON Users Test\"} 11100\nstatping_service_last_latency{id=\"3\" name=\"JSON Users Test\"} 43900\nstatping_service_last_lookup{id=\"3\" name=\"JSON Users Test\"} 11100\nstatping_service_last_check{id=\"3\" name=\"JSON Users Test\"} 38637\n\n# Service #4 'JSON API Tester':\nstatping_service_failures{id=\"4\" name=\"JSON API Tester\"} 403\nstatping_service_latency{id=\"4\" name=\"JSON API Tester\"} 875234\nstatping_service_online{id=\"4\" name=\"JSON API Tester\"} 1\nstatping_service_status_code{id=\"4\" name=\"JSON API Tester\"} 201\nstatping_service_response_length{id=\"4\" name=\"JSON API Tester\"} 74\nstatping_service_ping_time{id=\"4\" name=\"JSON API Tester\"} 11204\nstatping_service_last_latency{id=\"4\" name=\"JSON API Tester\"} 875234\nstatping_service_last_lookup{id=\"4\" name=\"JSON API Tester\"} 11204\nstatping_service_last_check{id=\"4\" name=\"JSON API Tester\"} 7556\n\n# Service #5 'Google DNS':\nstatping_service_failures{id=\"5\" name=\"Google DNS\"} 0\nstatping_service_latency{id=\"5\" name=\"Google DNS\"} 779\nstatping_service_online{id=\"5\" name=\"Google DNS\"} 1\nstatping_service_status_code{id=\"5\" name=\"Google DNS\"} 0\nstatping_service_response_length{id=\"5\" name=\"Google DNS\"} 0\nstatping_service_ping_time{id=\"5\" name=\"Google DNS\"} 4\nstatping_service_last_latency{id=\"5\" name=\"Google DNS\"} 779\nstatping_service_last_lookup{id=\"5\" name=\"Google DNS\"} 4\nstatping_service_last_check{id=\"5\" name=\"Google DNS\"} 18187\n\n# Service #6 'Private Service':\nstatping_service_failures{id=\"6\" name=\"Private Service\"} 0\nstatping_service_latency{id=\"6\" name=\"Private Service\"} 28960\nstatping_service_online{id=\"6\" name=\"Private Service\"} 1\nstatping_service_status_code{id=\"6\" name=\"Private Service\"} 200\nstatping_service_response_length{id=\"6\" name=\"Private Service\"} 43\nstatping_service_ping_time{id=\"6\" name=\"Private Service\"} 11312\nstatping_service_last_latency{id=\"6\" name=\"Private Service\"} 28960\nstatping_service_last_lookup{id=\"6\" name=\"Private Service\"} 11312\nstatping_service_last_check{id=\"6\" name=\"Private Service\" } 9416 \ n \ n # H T T P M e t r i c s \ n s t a t p i n g _ h t t p _ e r r o r s 0 \ n s t a t p i n g _ h t t p _ r e q u e s t s 0 \ n s t a t p i n g _ h t t p _ b y t e s 0 \ n s t a t p i n g _ h t t p _ r e q u e s t _ m i l l i s e c o n d s 0 \ n \ n # G o l a n g M e t r i c s \ n s t a t p i n g _ g o _ h e a p
}
]
} ,
{
"name" : "Clear Cache" ,
2020-04-16 09:57:00 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "dbabc164-5030-441d-90f7-b29c7fe794df" ,
2020-04-16 09:57:00 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api/clear_cache" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"clear_cache"
]
} ,
"description" : "This endpoint will clear all the cache files in your Statping instance. This includes chart data and service views."
} ,
2020-05-02 02:40:14 +00:00
"response" : [
{
"name" : "Clear Cache" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api/clear_cache" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"clear_cache"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Length" ,
"value" : "21"
} ,
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Sat, 02 May 2020 01:06:43 GMT"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"status\": \"success\"\n}"
}
]
} ,
{
"name" : "List Cache" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "992ce59d-3cce-43f1-9c3d-895c55a3e0a1" ,
2020-05-02 02:40:14 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api/cache" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"cache"
]
} ,
"description" : "This endpoint will return all cached API endpoints."
} ,
"response" : [
{
"name" : "List Cache" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api/cache" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"cache"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Length" ,
"value" : "1631"
} ,
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Sat, 02 May 2020 01:06:32 GMT"
}
] ,
"cookie" : [ ] ,
"body" : "[\n {\n \"url\": \"/api/services/1/failure_data?start=1585789587&end=1588381587&group=24h&fill=true\",\n \"expiration\": \"2020-05-02T01:06:57.511702322Z\",\n \"size\": 1541\n },\n {\n \"url\": \"/api/services/1/hits_data?start=1588127787&end=1588381587&group=5m&fill=false\",\n \"expiration\": \"2020-05-02T01:06:57.808458203Z\",\n \"size\": 45223\n },\n {\n \"url\": \"/api/services/2/hits_data?start=1588127787&end=1588381587&group=5m&fill=false\",\n \"expiration\": \"2020-05-02T01:06:57.873815975Z\",\n \"size\": 45224\n },\n {\n \"url\": \"/api/services/3/hits_data?start=1588127787&end=1588381587&group=5m&fill=false\",\n \"expiration\": \"2020-05-02T01:06:57.909984136Z\",\n \"size\": 45088\n },\n {\n \"url\": \"/api/services/2/failure_data?start=1585789587&end=1588381587&group=24h&fill=true\",\n \"expiration\": \"2020-05-02T01:06:57.48592429Z\",\n \"size\": 1538\n },\n {\n \"url\": \"/api/services/4/failure_data?start=1585789587&end=1588381587&group=24h&fill=true\",\n \"expiration\": \"2020-05-02T01:06:57.493425593Z\",\n \"size\": 1538\n },\n {\n \"url\": \"/api/services/3/failure_data?start=1585789587&end=1588381587&group=24h&fill=true\",\n \"expiration\": \"2020-05-02T01:06:57.493554858Z\",\n \"size\": 1538\n },\n {\n \"url\": \"/api/services/5/failure_data?start=1585789587&end=1588381587&group=24h&fill=true\",\n \"expiration\": \"2020-05-02T01:06:57.511424891Z\",\n \"size\": 1538\n },\n {\n \"url\": \"/api/services/5/hits_data?start=1588127788&end=1588381588&group=5m&fill=false\",\n \"expiration\": \"2020-05-02T01:06:58.377413844Z\",\n \"size\": 45193\n },\n {\n \"url\": \"/api/services/4/hits_data?start=1588127788&end=1588381588&group=5m&fill=false\",\n \"expiration\": \"2020-05-02T01:06:58.380229692Z\",\n \"size\": 45198\n }\n]"
}
]
} ,
{
"name" : "Shields.io Badge" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "8ee8bf21-4243-4f15-8a03-2189224360c7" ,
2020-05-02 02:40:14 +00:00
"exec" : [
""
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "noauth"
} ,
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "https://img.shields.io/badge/dynamic/json?color=blue&label=Statping Uptime 24/hr&query=$.online_24_hours&url=https://demo.statping.com/api/services/1&suffix=%" ,
"protocol" : "https" ,
"host" : [
"img" ,
"shields" ,
"io"
] ,
"path" : [
"badge" ,
"dynamic" ,
"json"
] ,
"query" : [
{
"key" : "color" ,
"value" : "blue"
} ,
{
"key" : "label" ,
"value" : "Statping Uptime 24/hr"
} ,
{
"key" : "query" ,
"value" : "$.online_24_hours"
} ,
{
"key" : "url" ,
"value" : "https://demo.statping.com/api/services/1"
} ,
{
"key" : "suffix" ,
"value" : "%"
}
]
} ,
"description" : "You can create custom badges with dynamic information by using [Shields.io](https://shields.io/) and parsing JSON fields with [JSONPath](http://jsonpath.com/). \n\n## Examples\n\n#### Service Uptime Percent\n<img src=\"https://img.shields.io/badge/dynamic/json?color=blue&label=%20Statping%20Uptime&query=%24.online_24_hours&url=https%3A%2F%2Fdemo.statping.com%2Fapi%2Fservices%2F2&suffix=%\">\n\n- URL: [https://demo.statping.com/api/services/2](https://demo.statping.com/api/services/2)\n- JSON Path: `$.online_24_hours`\n- Suffix: `%`\n\n```\nhttps://img.shields.io/badge/dynamic/json?color=blue&label=%20Statping%20Uptime&query=%24.online_24_hours&url=https%3A%2F%2Fdemo.statping.com%2Fapi%2Fservices%2F2&suffix=%\n```\n\n#### Count Services\n<img src=\"https://img.shields.io/badge/dynamic/json?color=purple&label=Demo%20Site&query=%24.services&url=https://demo.statping.com/health&suffix=%20services\">\n\n- URL: [https://demo.statping.com/health](https://demo.statping.com/health)\n- JSON Path: `$.services`\n- Suffix: ` services`\n\n```\nhttps://img.shields.io/badge/dynamic/json?color=purple&label=Demo%20Site&query=%24.services&url=https://demo.statping.com/health&suffix=%20services\n```"
} ,
2020-04-16 09:57:00 +00:00
"response" : [ ]
}
] ,
"description" : "This is for Statping's miscellaneous API endpoints that aren't a part of another category." ,
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"event" : [
{
"listen" : "prerequest" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "00ffb460-8bfc-4221-af12-b155a34c11fc" ,
2020-04-16 09:57:00 +00:00
"type" : "text/javascript" ,
"exec" : [
""
]
}
} ,
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "ffe44bf8-4bf3-4175-bb4b-3c3910c674c3" ,
2020-04-16 09:57:00 +00:00
"type" : "text/javascript" ,
"exec" : [
""
]
}
}
2020-05-18 20:50:09 +00:00
] ,
"protocolProfileBehavior" : { }
2020-04-16 09:57:00 +00:00
} ,
2020-03-13 04:06:06 +00:00
{
"name" : "Services" ,
"item" : [
{
"name" : "All Services" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "e89a245a-8ee6-4f3b-8cbc-5d7c3bbf687a" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
"pm.test(\"View All Services\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.length).to.eql(5);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api/services" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services"
]
} ,
"description" : "View an array of all Services added to your Statping instance."
} ,
2020-05-02 02:40:14 +00:00
"response" : [
{
"name" : "All Services" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"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" : "Sat, 02 May 2020 01:07:00 GMT"
} ,
{
"key" : "Transfer-Encoding" ,
"value" : "chunked"
}
] ,
"cookie" : [ ] ,
"body" : "[\n {\n \"avg_response\": 1234129,\n \"check_interval\": 10,\n \"created_at\": \"2020-02-02T01:00:08.103271859Z\",\n \"failures_24_hours\": 321,\n \"group_id\": 1,\n \"id\": 1,\n \"last_error\": \"2020-05-08T18:20:08.881632603Z\",\n \"last_success\": \"2020-05-02T01:06:54.035553551Z\",\n \"latency\": 119927,\n \"name\": \"Google\",\n \"online\": true,\n \"online_24_hours\": 95.35,\n \"online_7_days\": 95.35,\n \"order_id\": 1,\n \"permalink\": \"google\",\n \"ping_time\": 11034,\n \"public\": true,\n \"stats\": {\n \"failures\": 404,\n \"hits\": 8683,\n \"first_hit\": \"2020-04-29T01:00:10.245169916Z\"\n },\n \"status_code\": 200,\n \"updated_at\": \"2020-05-02T01:00:08.103367884Z\"\n },\n {\n \"avg_response\": 1158576,\n \"check_interval\": 30,\n \"created_at\": \"2020-02-02T01:00:08.103271859Z\",\n \"failures_24_hours\": 408,\n \"group_id\": 0,\n \"id\": 2,\n \"last_error\": \"2020-05-02T01:06:44.254597647Z\",\n \"last_success\": \"2020-05-02T01:06:14.289921794Z\",\n \"latency\": 88378,\n \"name\": \"Statping Github\",\n \"online\": false,\n \"online_24_hours\": 95.28,\n \"online_7_days\": 95.28,\n \"order_id\": 2,\n \"permalink\": \"statping_github\",\n \"ping_time\": 11554,\n \"public\": true,\n \"stats\": {\n \"failures\": 408,\n \"hits\": 8651,\n \"first_hit\": \"2020-04-29T01:00:10.587232314Z\"\n },\n \"status_code\": 406,\n \"updated_at\": \"2020-05-02T01:00:08.161946425Z\"\n },\n {\n \"avg_response\": 977729,\n \"check_interval\": 60,\n \"created_at\": \"2020-02-02T01:00:08.103271859Z\",\n \"failures_24_hours\": 403,\n \"group_id\": 2,\n \"id\": 3,\n \"last_error\": \"2020-05-28T06:10:08.881632603Z\",\n \"last_success\": \"2020-05-02T01:06:14.457520734Z\",\n \"latency\": 41615,\n \"name\": \"JSON Users Test\",\n \"online\": true,\n \"online_24_hours\": 95.34,\n \"online_7_days\": 95.34,\n \"order_id\": 3,\n \"permalink\": null,\n \"ping_time\": 11150,\n \"public\": true,\n \"stats\": {\n \"failures\": 403,\n \"hits\": 8649,\n \"first_hit\": \"2020-04-29T01:00:10.929333549Z\"\n },\n \"status_code\": 200,\n \"updated_at\": \"2020-05-02T01:00:08.212206993Z\"\n },\n {\n \"avg_response\": 1301894,\n \"check_interval\": 30,\n \"created_at\": \"2020-02-02T01:00:08.103271859Z\",\n \"failures_24_hours\": 403,\n \"group_id\": 2,\n \"id\": 4,\n \"last_error\": \"2020-06-07T00:05:08.881632603Z\",\n \"last_success\": \"2020-05-02T01:06:45.53496799Z\",\n \"latency\": 869091,\n \"name\": \"JSON API Tester\",\n \"online\": true,\n \"online_24_hours\": 95.34,\n \"online_7_days\": 95.34,\n \"order_id\": 4,\n \"permalink\": null,\n \"ping_time\": 10980,\n \"public\": true,\n \"stats\": {\n \"failures\": 403,\n \"hits\": 8656,\n \"first_hit\": \"2020-04-29T01:00:11.279703666Z\"\n },\n \"status_code\": 201,\n \"updated_at\": \"2020-05-02T01:00:08.270923495Z\"\n },\n {\n \"avg_response\": 1182385,\n \"check_interval\": 20,\n \"created_at\": \"2020-02-02T01:00:08.103271859Z\",\n \"failures_24_hours\": 0,\n \"group_id\": 1,\n \"id\": 5,\n \"last_error\": \"0001-01-01T00:00:00Z\",\n \"last_success\": \"2020-05-02T01:06:54.905566976Z\",\n \"latency\": 591,\n \"name\": \"Google DNS\",\n \"online\": true,\n \"online_24_hours\": 100,\n \"online_7_days\": 100,\n \"order_id\": 5,\n \" p e r m a l
}
]
2020-03-13 04:06:06 +00:00
} ,
{
"name" : "View Service" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "7c3e8784-0494-4957-ac45-b09c26580b40" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
"pm.test(\"View Service\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.name).to.eql(\"Google\");" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"value" : "application/json" ,
"type" : "text"
}
] ,
"url" : {
"raw" : "{{endpoint}}/api/services/1" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"1"
]
} ,
"description" : "View a specific service, this will include the service's failures and checkins."
} ,
"response" : [
{
"name" : "View Service" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"value" : "application/json" ,
"type" : "text"
}
] ,
"url" : {
"raw" : "{{endpoint}}/api/services/1" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"1"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
2020-05-02 02:40:14 +00:00
{
"key" : "Content-Length" ,
"value" : "534"
} ,
2020-03-13 04:06:06 +00:00
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-02 02:40:14 +00:00
"value" : "Sat, 02 May 2020 01:07:16 GMT"
2020-03-13 04:06:06 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-02 02:40:14 +00:00
"body" : "{\n \"avg_response\": 1233870,\n \"check_interval\": 10,\n \"created_at\": \"2020-02-02T01:00:08.103271859Z\",\n \"failures_24_hours\": 321,\n \"group_id\": 1,\n \"id\": 1,\n \"last_error\": \"2020-05-08T18:20:08.881632603Z\",\n \"last_success\": \"2020-05-02T01:07:14.027666715Z\",\n \"latency\": 111427,\n \"name\": \"Google\",\n \"online\": true,\n \"online_24_hours\": 95.35,\n \"online_7_days\": 95.35,\n \"order_id\": 1,\n \"permalink\": \"google\",\n \"ping_time\": 11580,\n \"public\": true,\n \"stats\": {\n \"failures\": 404,\n \"hits\": 8685,\n \"first_hit\": \"2020-04-29T01:00:10.245169916Z\"\n },\n \"status_code\": 200,\n \"updated_at\": \"2020-05-02T01:00:08.103367884Z\"\n}"
2020-03-13 04:06:06 +00:00
}
]
} ,
{
"name" : "View Service Chart Data" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "860fa275-aed7-481d-967f-11b481df49e0" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});"
] ,
"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"
}
] ,
"url" : {
2020-05-02 02:40:14 +00:00
"raw" : "{{endpoint}}/api/services/1/hits_data?start={{start_time}}&end={{end_time}}&group=1h" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"1" ,
"hits_data"
] ,
"query" : [
{
"key" : "start" ,
2020-05-02 02:40:14 +00:00
"value" : "{{start_time}}" ,
2020-03-13 04:06:06 +00:00
"description" : "Starting from time (unix timestamp)"
} ,
{
"key" : "end" ,
2020-05-02 02:40:14 +00:00
"value" : "{{end_time}}" ,
2020-03-13 04:06:06 +00:00
"description" : "End on time (unix timestamp)"
} ,
{
"key" : "group" ,
2020-05-02 02:40:14 +00:00
"value" : "1h" ,
2020-03-13 04:06:06 +00:00
"description" : "Increment grouping (minute, hour, day)"
}
]
} ,
2020-05-02 02:40:14 +00:00
"description" : "View the chart data for the service's latency. The response returns an array of objects as `timeframe` for timestamp, and `amount` for value in ascending order.\n\n## Grouping Data\nYou can group the chart data by using the `group` parameter. For example, if you want to group hits in 12 hours, you could use `12h`. You can also group by minutes like `15m` for 15 minutes."
2020-03-13 04:06:06 +00:00
} ,
2020-05-02 02:40:14 +00:00
"response" : [
{
"name" : "View Service Chart Data" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"type" : "text" ,
"value" : "application/json"
}
] ,
"url" : {
"raw" : "{{endpoint}}/api/services/1/hits_data?start=0&end=99999999999&group=1h" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"1" ,
"hits_data"
] ,
"query" : [
{
"key" : "start" ,
"value" : "0" ,
"description" : "Starting from time (unix timestamp)"
} ,
{
"key" : "end" ,
"value" : "99999999999" ,
"description" : "End on time (unix timestamp)"
} ,
{
"key" : "group" ,
"value" : "1h" ,
"description" : "Increment grouping (minute, hour, day)"
}
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Access-Control-Allow-Origin" ,
"value" : "*"
} ,
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Fri, 01 May 2020 23:35:21 GMT"
} ,
{
"key" : "Transfer-Encoding" ,
"value" : "chunked"
}
] ,
"cookie" : [ ] ,
"body" : "[\n {\n \"timeframe\": \"2020-04-28T23:00:00Z\",\n \"amount\": 2821357\n },\n {\n \"timeframe\": \"2020-04-29T00:00:00Z\",\n \"amount\": 3948440\n },\n {\n \"timeframe\": \"2020-04-29T01:00:00Z\",\n \"amount\": 2561839\n },\n {\n \"timeframe\": \"2020-04-29T02:00:00Z\",\n \"amount\": 298890\n },\n {\n \"timeframe\": \"2020-04-29T03:00:00Z\",\n \"amount\": 595086\n },\n {\n \"timeframe\": \"2020-04-29T04:00:00Z\",\n \"amount\": 3353651\n },\n {\n \"timeframe\": \"2020-04-29T05:00:00Z\",\n \"amount\": 3816639\n },\n {\n \"timeframe\": \"2020-04-29T06:00:00Z\",\n \"amount\": 2479045\n },\n {\n \"timeframe\": \"2020-04-29T07:00:00Z\",\n \"amount\": 730765\n },\n {\n \"timeframe\": \"2020-04-29T08:00:00Z\",\n \"amount\": 742941\n },\n {\n \"timeframe\": \"2020-04-29T09:00:00Z\",\n \"amount\": 299063\n },\n {\n \"timeframe\": \"2020-04-29T10:00:00Z\",\n \"amount\": 136331\n },\n {\n \"timeframe\": \"2020-04-29T11:00:00Z\",\n \"amount\": 319792\n },\n {\n \"timeframe\": \"2020-04-29T12:00:00Z\",\n \"amount\": 1146633\n },\n {\n \"timeframe\": \"2020-04-29T13:00:00Z\",\n \"amount\": 186369\n },\n {\n \"timeframe\": \"2020-04-29T14:00:00Z\",\n \"amount\": 751189\n },\n {\n \"timeframe\": \"2020-04-29T15:00:00Z\",\n \"amount\": 299781\n },\n {\n \"timeframe\": \"2020-04-29T16:00:00Z\",\n \"amount\": 725325\n },\n {\n \"timeframe\": \"2020-04-29T17:00:00Z\",\n \"amount\": 786672\n },\n {\n \"timeframe\": \"2020-04-29T18:00:00Z\",\n \"amount\": 809931\n },\n {\n \"timeframe\": \"2020-04-29T19:00:00Z\",\n \"amount\": 758894\n },\n {\n \"timeframe\": \"2020-04-29T20:00:00Z\",\n \"amount\": 1612743\n },\n {\n \"timeframe\": \"2020-04-29T21:00:00Z\",\n \"amount\": 1918771\n },\n {\n \"timeframe\": \"2020-04-29T22:00:00Z\",\n \"amount\": 1959122\n },\n {\n \"timeframe\": \"2020-04-29T23:00:00Z\",\n \"amount\": 703709\n },\n {\n \"timeframe\": \"2020-04-30T00:00:00Z\",\n \"amount\": 348894\n },\n {\n \"timeframe\": \"2020-04-30T01:00:00Z\",\n \"amount\": 247846\n },\n {\n \"timeframe\": \"2020-04-30T02:00:00Z\",\n \"amount\": 876778\n },\n {\n \"timeframe\": \"2020-04-30T03:00:00Z\",\n \"amount\": 516935\n },\n {\n \"timeframe\": \"2020-04-30T04:00:00Z\",\n \"amount\": 148509\n },\n {\n \"timeframe\": \"2020-04-30T05:00:00Z\",\n \"amount\": 248569\n },\n {\n \"timeframe\": \"2020-04-30T06:00:00Z\",\n \"amount\": 177620\n },\n {\n \"timeframe\": \"2020-04-30T07:00:00Z\",\n \"amount\": 670146\n },\n {\n \"timeframe\": \"2020-04-30T08:00:00Z\",\n \"amount\": 168823\n },\n {\n \"timeframe\": \"2020-04-30T09:00:00Z\",\n \"amount\": 756748\n },\n {\n \"timeframe\": \"2020-04-30T10:00:00Z\",\n \"amount\": 730129\n },\n {\n \"timeframe\": \"2020-04-30T11:00:00Z\",\n \"amount\": 389544\n },\n {\n \"timeframe\": \"2020-04-30T12:00:00Z\",\n \"amount\": 133279\n },\n {\n \"timeframe\": \"2020-04-30T13:00:00Z\",\n \"amount\": 1257221\n },\n {\n \"timeframe\": \"2020-04-30T14:00:00Z\",\n \"amount\": 1095851\n },\n {\n \"timeframe\": \"2020-04-30T15:00:00Z\",\n \"amount\": 1086126\n },\n {\n \"timeframe\": \"2020-04-30T16:00:00Z\",\n \"amount\": 532353\n },\n {\n \"timeframe\": \"2020-04-30T17:00:00Z\",\n \"amount\": 1321025\n },\n {\n \"timeframe\": \"2020-04-30T18:00:00Z\" , \ n
}
]
2020-03-13 04:06:06 +00:00
} ,
{
"name" : "View Service Ping Data" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "d89562d5-6742-447a-ae95-1ad044123f70" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});"
] ,
"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"
}
] ,
"url" : {
2020-05-02 02:40:14 +00:00
"raw" : "{{endpoint}}/api/services/1/ping_data?start={{start_time}}&end={{end_time}}&group=12h" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"1" ,
2020-04-16 09:57:00 +00:00
"ping_data"
2020-03-13 04:06:06 +00:00
] ,
"query" : [
{
"key" : "start" ,
2020-05-02 02:40:14 +00:00
"value" : "{{start_time}}" ,
2020-03-13 04:06:06 +00:00
"description" : "Starting from time (unix timestamp)"
} ,
{
"key" : "end" ,
2020-05-02 02:40:14 +00:00
"value" : "{{end_time}}" ,
2020-03-13 04:06:06 +00:00
"description" : "End on time (unix timestamp)"
} ,
{
"key" : "group" ,
2020-04-16 09:57:00 +00:00
"value" : "12h" ,
2020-03-13 04:06:06 +00:00
"description" : "Increment grouping (minute, hour, day)"
}
]
} ,
2020-05-02 02:40:14 +00:00
"description" : "View the chart data for the service's ping response time. The response returns an array of objects as `timeframe` for timestamp, and `amount` for value in ascending order.\n\n## Grouping Data\nYou can group the chart data by using the `group` parameter. For example, if you want to group hits in 12 hours, you could use `12h`. You can also group by minutes like `15m` for 15 minutes."
2020-03-13 04:06:06 +00:00
} ,
2020-05-02 02:40:14 +00:00
"response" : [
{
"name" : "View Service Ping Data" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"type" : "text" ,
"value" : "application/json"
}
] ,
"url" : {
"raw" : "{{endpoint}}/api/services/1/ping_data?start=0&end=999999999999&group=12h" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"1" ,
"ping_data"
] ,
"query" : [
{
"key" : "start" ,
"value" : "0" ,
"description" : "Starting from time (unix timestamp)"
} ,
{
"key" : "end" ,
"value" : "999999999999" ,
"description" : "End on time (unix timestamp)"
} ,
{
"key" : "group" ,
"value" : "12h" ,
"description" : "Increment grouping (minute, hour, day)"
}
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Access-Control-Allow-Origin" ,
"value" : "*"
} ,
{
"key" : "Content-Length" ,
"value" : "374"
} ,
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Fri, 01 May 2020 23:36:34 GMT"
}
] ,
"cookie" : [ ] ,
"body" : "[\n {\n \"timeframe\": \"2020-04-28T12:00:00Z\",\n \"amount\": 1410678\n },\n {\n \"timeframe\": \"2020-04-29T00:00:00Z\",\n \"amount\": 803436\n },\n {\n \"timeframe\": \"2020-04-29T12:00:00Z\",\n \"amount\": 485797\n },\n {\n \"timeframe\": \"2020-04-30T00:00:00Z\",\n \"amount\": 220022\n },\n {\n \"timeframe\": \"2020-04-30T12:00:00Z\",\n \"amount\": 378263\n },\n {\n \"timeframe\": \"2020-05-01T00:00:00Z\",\n \"amount\": 444698\n },\n {\n \"timeframe\": \"2020-05-01T12:00:00Z\",\n \"amount\": 285061\n }\n]"
}
]
2020-03-13 04:06:06 +00:00
} ,
{
"name" : "View Service Failure Data" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "e5af74ef-3ae5-45ef-ac0c-30ec1ed006c3" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});"
] ,
"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"
}
] ,
"url" : {
2020-05-02 02:40:14 +00:00
"raw" : "{{endpoint}}/api/services/1/failure_data?start={{start_time}}&end={{end_time}}&group=12h" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"1" ,
"failure_data"
] ,
"query" : [
{
"key" : "start" ,
2020-05-02 02:40:14 +00:00
"value" : "{{start_time}}" ,
"description" : "Starting from time (unix timestamp)"
2020-03-13 04:06:06 +00:00
} ,
{
"key" : "end" ,
2020-05-02 02:40:14 +00:00
"value" : "{{end_time}}" ,
"description" : "End on time (unix timestamp)"
2020-03-13 04:06:06 +00:00
} ,
{
"key" : "group" ,
2020-05-02 02:40:14 +00:00
"value" : "12h" ,
"description" : "Increment grouping (minute, hour, day)"
2020-03-13 04:06:06 +00:00
}
]
} ,
2020-05-02 02:40:14 +00:00
"description" : "View the data service failures in a heatmap. The response returns an array of objects as `timeframe` for timestamp, and `amount` for value in ascending order.\n\n## Grouping Data\nYou can group the chart data by using the `group` parameter. For example, if you want to group hits in 12 hours, you could use `12h`. You can also group by minutes like `15m` for 15 minutes."
2020-03-13 04:06:06 +00:00
} ,
2020-05-02 02:40:14 +00:00
"response" : [
{
"name" : "View Service Failure Data" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"type" : "text" ,
"value" : "application/json"
}
] ,
"url" : {
"raw" : "{{endpoint}}/api/services/1/failure_data?start=0&end=999999999999&group=12h" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"1" ,
"failure_data"
] ,
"query" : [
{
"key" : "start" ,
"value" : "0" ,
"description" : "Starting from time (unix timestamp)"
} ,
{
"key" : "end" ,
"value" : "999999999999" ,
"description" : "End on time (unix timestamp)"
} ,
{
"key" : "group" ,
"value" : "12h" ,
"description" : "Increment grouping (minute, hour, day)"
}
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Access-Control-Allow-Origin" ,
"value" : "*"
} ,
{
"key" : "Content-Length" ,
"value" : "344"
} ,
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Fri, 01 May 2020 23:39:38 GMT"
}
] ,
"cookie" : [ ] ,
"body" : "[\n {\n \"timeframe\": \"2020-04-28T12:00:00Z\",\n \"amount\": 2\n },\n {\n \"timeframe\": \"2020-04-29T00:00:00Z\",\n \"amount\": 21\n },\n {\n \"timeframe\": \"2020-04-29T12:00:00Z\",\n \"amount\": 20\n },\n {\n \"timeframe\": \"2020-04-30T00:00:00Z\",\n \"amount\": 21\n },\n {\n \"timeframe\": \"2020-04-30T12:00:00Z\",\n \"amount\": 20\n },\n {\n \"timeframe\": \"2020-05-01T00:00:00Z\",\n \"amount\": 21\n },\n {\n \"timeframe\": \"2020-05-01T12:00:00Z\",\n \"amount\": 29\n }\n]"
}
]
2020-03-13 04:06:06 +00:00
} ,
{
"name" : "View Service Failures" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "b21c7e93-24a7-4c0a-90fa-89d3e34f0029" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});"
] ,
"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"
}
] ,
"url" : {
2020-05-02 02:40:14 +00:00
"raw" : "{{endpoint}}/api/services/1/failures?start={{start_time}}&end={{end_time}}" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"1" ,
"failures"
2020-04-16 09:57:00 +00:00
] ,
"query" : [
{
"key" : "start" ,
2020-05-02 02:40:14 +00:00
"value" : "{{start_time}}" ,
"description" : "Starting from time (unix timestamp)"
2020-04-16 09:57:00 +00:00
} ,
{
"key" : "end" ,
2020-05-02 02:40:14 +00:00
"value" : "{{end_time}}" ,
"description" : "End on time (unix timestamp)"
2020-04-16 09:57:00 +00:00
}
]
} ,
"description" : "Returns an array of failures for this service. It includes the error message, http status code, and the ping response time."
} ,
"response" : [ ]
} ,
2020-03-13 04:06:06 +00:00
{
"name" : "View Service Hits" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "c6f024c5-f81d-4aca-92e8-b93bf9ac9068" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
"pm.test(\"Service Successful Hits\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.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"
}
] ,
"url" : {
2020-05-02 02:40:14 +00:00
"raw" : "{{endpoint}}/api/services/1/hits?start={{start_time}}&end={{end_time}}" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"1" ,
"hits"
2020-04-16 09:57:00 +00:00
] ,
"query" : [
{
"key" : "start" ,
2020-05-02 02:40:14 +00:00
"value" : "{{start_time}}" ,
"description" : "Starting from time (unix timestamp)"
2020-04-16 09:57:00 +00:00
} ,
{
"key" : "end" ,
2020-05-02 02:40:14 +00:00
"value" : "{{end_time}}" ,
"description" : "End on time (unix timestamp)"
2020-04-16 09:57:00 +00:00
}
2020-03-13 04:06:06 +00:00
]
} ,
"description" : "Returns on array of all the successful hits for this service."
} ,
"response" : [ ]
} ,
{
"name" : "Reorder Services" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "cf487420-5c74-4572-b512-29fe6de72761" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});"
] ,
"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" ,
2020-04-16 09:57:00 +00:00
"raw" : "[{\"service\":1,\"order\":1},{\"service\":2,\"order\":3},{\"service\":3,\"order\":4},{\"service\":4,\"order\":5}]" ,
"options" : {
"raw" : { }
}
2020-03-13 04:06:06 +00:00
} ,
"url" : {
2020-04-16 09:57:00 +00:00
"raw" : "{{endpoint}}/api/reorder/services" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-04-16 09:57:00 +00:00
"reorder" ,
"services"
2020-03-13 04:06:06 +00:00
]
} ,
"description" : "Reorder services in a specific order for the index page."
} ,
"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]"
}
]
} ,
{
"name" : "Create Service" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "7f96b2ec-11e5-44ab-b353-c2b4fa034f80" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
"pm.test(\"Create Service\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.output.name).to.eql(\"New Service\");" ,
" pm.expect(jsonData.output.domain).to.eql(\"https://statping.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);" ,
" pm.globals.set(\"service_id\", jsonData.output.id);" ,
"});"
] ,
"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" ,
"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"
]
} ,
"description" : "Create a new service and begin monitoring."
} ,
"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}"
}
]
} ,
{
"name" : "Update Service" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "8f497902-ca10-45cb-bb98-96db1604b276" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
"pm.test(\"Update Service\", function () {" ,
" var jsonData = pm.response.json();" ,
2020-04-16 09:57:00 +00:00
" pm.expect(jsonData.output.name).to.eql(\"Brand New Service\");" ,
" pm.expect(jsonData.output.domain).to.eql(\"https://google.net\");" ,
2020-03-13 04:06:06 +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);" ,
"});"
] ,
"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" ,
2020-04-16 09:57:00 +00:00
"raw" : "{\n \"name\": \"Brand New Service\",\n \"domain\": \"https://google.net\",\n \"expected\": \"heyyyy\",\n \"expected_status\": 200,\n \"check_interval\": 20,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 10,\n \"order_id\": 0\n}" ,
"options" : {
"raw" : { }
}
2020-03-13 04:06:06 +00:00
} ,
"url" : {
"raw" : "{{endpoint}}/api/services/{{service_id}}" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"{{service_id}}"
]
} ,
"description" : "Update a service with new values and begin monitoring."
} ,
"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}"
}
]
} ,
2020-04-16 09:57:00 +00:00
{
"name" : "Delete Service Failures" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "ea18e56c-382d-42c4-9bc7-477da1d760fe" ,
2020-04-16 09:57:00 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "DELETE" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/services/{{service_id}}/failures" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"{{service_id}}" ,
"failures"
]
} ,
"description" : "Delete all the service failures."
} ,
"response" : [ ]
} ,
2020-03-13 04:06:06 +00:00
{
"name" : "Delete Service" ,
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "c8b61f71-2f28-42a5-9ca1-e80038767fbe" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
"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"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "DELETE" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
2020-05-18 20:50:09 +00:00
"raw" : "" ,
"options" : {
"raw" : { }
}
2020-03-13 04:06:06 +00:00
} ,
"url" : {
"raw" : "{{endpoint}}/api/services/{{service_id}}" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"services" ,
"{{service_id}}"
]
} ,
"description" : "Delete a service and stops monitoring."
} ,
"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}"
}
]
}
] ,
"description" : "With the Statping API, you can add, remove, edit all your services fields from the API directly. This includes viewing Service chart data for latency/up-time, and even viewing a log of failures. " ,
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"event" : [
{
"listen" : "prerequest" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "2d965d82-4d9e-4c37-a3d2-286c75ae00de" ,
2020-03-13 04:06:06 +00:00
"type" : "text/javascript" ,
"exec" : [
""
]
}
} ,
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "f3cd55c0-923e-43fa-ab6b-e26df9f20e0a" ,
2020-03-13 04:06:06 +00:00
"type" : "text/javascript" ,
"exec" : [
""
]
}
}
2020-05-18 20:50:09 +00:00
] ,
"protocolProfileBehavior" : { }
2020-03-13 04:06:06 +00:00
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Incidents" ,
2020-03-13 04:06:06 +00:00
"item" : [
{
2020-05-18 20:50:09 +00:00
"name" : "View Service Incidents" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "575ede33-53ac-4e8b-9dbf-3560409b6d1f" ,
2020-03-13 04:06:06 +00:00
"exec" : [
2020-05-18 20:50:09 +00:00
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
2020-03-13 04:06:06 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
2020-05-18 20:50:09 +00:00
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"type" : "text" ,
"value" : "application/json"
}
] ,
2020-03-13 04:06:06 +00:00
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/services/1/incidents" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"services" ,
"1" ,
"incidents"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "View all incidents for a single service."
2020-03-13 04:06:06 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "View Service Incidents" ,
2020-03-13 04:06:06 +00:00
"originalRequest" : {
"method" : "GET" ,
2020-05-18 20:50:09 +00:00
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"type" : "text" ,
"value" : "application/json"
}
] ,
2020-03-13 04:06:06 +00:00
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/services/1/incidents" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"services" ,
"1" ,
"incidents"
2020-03-13 04:06:06 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Mon, 04 May 2020 03:13:44 GMT"
2020-03-13 04:06:06 +00:00
} ,
{
"key" : "Content-Length" ,
2020-05-18 20:50:09 +00:00
"value" : "136"
} ,
{
"key" : "Connection" ,
"value" : "close"
2020-03-13 04:06:06 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : "[\n {\n \"id\": 1,\n \"title\": \"Service Downtime\",\n \"service\": 1,\n \"created_at\": \"2020-05-04T03:11:51.752374Z\",\n \"updated_at\": \"2020-05-04T03:11:51.752374Z\"\n }\n]"
2020-03-13 04:06:06 +00:00
}
]
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Create Incident" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "6252ebad-26a9-481d-a233-e097306fc598" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
2020-05-18 20:50:09 +00:00
"pm.test(\"Incidents JSON\", function () {" ,
2020-03-13 04:06:06 +00:00
" var jsonData = pm.response.json();" ,
2020-05-18 20:50:09 +00:00
" pm.expect(jsonData.status).to.eql(\"success\");" ,
" pm.expect(jsonData.method).to.eql(\"create\");" ,
2020-03-13 04:06:06 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
2020-05-18 20:50:09 +00:00
"method" : "POST" ,
2020-03-13 04:06:06 +00:00
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"type" : "text" ,
"value" : "application/json"
}
] ,
2020-05-18 20:50:09 +00:00
"body" : {
"mode" : "raw" ,
"raw" : "{\n\t\"title\": \"Service Downtime\",\n\t\"description\": \"\"\n}" ,
"options" : {
"raw" : {
"language" : "json"
}
}
} ,
2020-03-13 04:06:06 +00:00
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/services/1/incidents" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"services" ,
"1" ,
"incidents"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "Create an incident for a service."
2020-03-13 04:06:06 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "Create Incident" ,
2020-03-13 04:06:06 +00:00
"originalRequest" : {
2020-05-18 20:50:09 +00:00
"method" : "POST" ,
2020-03-13 04:06:06 +00:00
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"type" : "text" ,
"value" : "application/json"
}
] ,
2020-05-18 20:50:09 +00:00
"body" : {
"mode" : "raw" ,
"raw" : "{\n\t\"title\": \"Service Downtime\",\n\t\"description\": \"\",\n\t\"service\": 1\n}" ,
"options" : {
"raw" : {
"language" : "json"
}
}
} ,
2020-03-13 04:06:06 +00:00
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/services/1/incidents" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"services" ,
"1" ,
"incidents"
2020-03-13 04:06:06 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Mon, 04 May 2020 03:11:51 GMT"
2020-03-13 04:06:06 +00:00
} ,
{
"key" : "Content-Length" ,
2020-05-18 20:50:09 +00:00
"value" : "207"
} ,
{
"key" : "Connection" ,
"value" : "close"
2020-03-13 04:06:06 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : "{\n \"status\": \"success\",\n \"type\": \"incident\",\n \"method\": \"create\",\n \"id\": 1,\n \"output\": {\n \"id\": 1,\n \"title\": \"Service Downtime\",\n \"service\": 1,\n \"created_at\": \"2020-05-04T03:11:51.752374Z\",\n \"updated_at\": \"2020-05-04T03:11:51.752374Z\"\n }\n}"
2020-03-13 04:06:06 +00:00
}
]
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Update Service Incident" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "42cd68de-5bd4-4d4e-b687-fa0bafc1d61a" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
2020-05-18 20:50:09 +00:00
"name" : "Content-Type" ,
"type" : "text" ,
2020-03-13 04:06:06 +00:00
"value" : "application/json"
}
] ,
"body" : {
"mode" : "raw" ,
2020-05-18 20:50:09 +00:00
"raw" : "{\n\t\"title\": \"Updated Downtime\",\n\t\"description\": \"This is an update for an incident\"\n}"
2020-03-13 04:06:06 +00:00
} ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/incidents/1" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"incidents" ,
"1"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "View all incidents for a single service."
} ,
"response" : [ ]
} ,
{
"name" : "Delete Incident" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "c6735dbe-86e8-4b42-9b04-6fc1fea949df" ,
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "DELETE" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"type" : "text" ,
"value" : "application/json"
}
] ,
"url" : {
"raw" : "{{endpoint}}/api/incidents/1" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"incidents" ,
"1"
]
} ,
"description" : "View all incidents for a single service."
2020-03-13 04:06:06 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "Delete Incident" ,
2020-03-13 04:06:06 +00:00
"originalRequest" : {
2020-05-18 20:50:09 +00:00
"method" : "DELETE" ,
2020-03-13 04:06:06 +00:00
"header" : [
{
"key" : "Content-Type" ,
2020-05-18 20:50:09 +00:00
"name" : "Content-Type" ,
"type" : "text" ,
2020-03-13 04:06:06 +00:00
"value" : "application/json"
}
] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/incidents/2" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"incidents" ,
"2"
2020-03-13 04:06:06 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Mon, 04 May 2020 03:31:48 GMT"
2020-03-13 04:06:06 +00:00
} ,
{
"key" : "Content-Length" ,
2020-05-18 20:50:09 +00:00
"value" : "207"
} ,
{
"key" : "Connection" ,
"value" : "close"
2020-03-13 04:06:06 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : "{\n \"status\": \"success\",\n \"type\": \"incident\",\n \"method\": \"delete\",\n \"id\": 2,\n \"output\": {\n \"id\": 2,\n \"title\": \"Service Downtime\",\n \"service\": 1,\n \"created_at\": \"2020-05-04T03:18:24.818629Z\",\n \"updated_at\": \"2020-05-04T03:18:24.818629Z\"\n }\n}"
2020-03-13 04:06:06 +00:00
}
]
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Incident Updates" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "e2e7d38f-efae-44d1-9361-cd301547feb3" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
2020-05-18 20:50:09 +00:00
"method" : "GET" ,
2020-03-13 04:06:06 +00:00
"header" : [
{
"key" : "Content-Type" ,
2020-05-18 20:50:09 +00:00
"name" : "Content-Type" ,
"type" : "text" ,
2020-03-13 04:06:06 +00:00
"value" : "application/json"
}
] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/incidents/2/updates" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"incidents" ,
"2" ,
"updates"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "View all incidents for a single service."
2020-03-13 04:06:06 +00:00
} ,
"response" : [ ]
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Create Incident Update" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "4478e35f-8da6-4f74-9100-0bb92ac6466e" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
2020-05-18 20:50:09 +00:00
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"type" : "text" ,
"value" : "application/json"
}
] ,
2020-03-13 04:06:06 +00:00
"body" : {
"mode" : "raw" ,
2020-05-18 20:50:09 +00:00
"raw" : "{\n\t\"message\": \"Website is loading very slowly, looking into this.\",\n\t\"type\": \"Investigating\"\n}"
2020-03-13 04:06:06 +00:00
} ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/incidents/2/updates" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"incidents" ,
"2" ,
"updates"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "View all incidents for a single service."
2020-03-13 04:06:06 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "Create Incident Update" ,
2020-03-13 04:06:06 +00:00
"originalRequest" : {
2020-05-18 20:50:09 +00:00
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"type" : "text" ,
"value" : "application/json"
}
] ,
2020-03-13 04:06:06 +00:00
"body" : {
"mode" : "raw" ,
2020-05-18 20:50:09 +00:00
"raw" : "{\n\t\"message\": \"Website is loading very slowly, looking into this.\",\n\t\"type\": \"Investigating\"\n}"
2020-03-13 04:06:06 +00:00
} ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/incidents/2/updates" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"incidents" ,
"2" ,
"updates"
2020-03-13 04:06:06 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Mon, 04 May 2020 03:20:05 GMT"
2020-03-13 04:06:06 +00:00
} ,
{
"key" : "Content-Length" ,
2020-05-18 20:50:09 +00:00
"value" : "261"
} ,
{
"key" : "Connection" ,
"value" : "close"
2020-03-13 04:06:06 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : "{\n \"status\": \"success\",\n \"type\": \"incident_update\",\n \"method\": \"create\",\n \"id\": 1,\n \"output\": {\n \"id\": 1,\n \"message\": \"Website is loading very slowly, looking into this.\",\n \"type\": \"Investigating\",\n \"created_at\": \"2020-05-04T03:20:05.102435Z\",\n \"updated_at\": \"2020-05-04T03:20:05.102435Z\"\n }\n}"
2020-03-13 04:06:06 +00:00
}
]
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Delete Incident Update" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "4578b229-5a85-4d3c-acdc-360ad50a35f2" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
2020-05-18 20:50:09 +00:00
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
2020-03-13 04:06:06 +00:00
} ,
2020-05-18 20:50:09 +00:00
"method" : "DELETE" ,
2020-03-13 04:06:06 +00:00
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"type" : "text" ,
2020-05-18 20:50:09 +00:00
"value" : "application/json"
2020-03-13 04:06:06 +00:00
}
] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/incidents/2/updates/1" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"incidents" ,
"2" ,
"updates" ,
"1"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "View all incidents for a single service."
2020-05-02 02:40:14 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "Delete Incident Update" ,
2020-05-02 02:40:14 +00:00
"originalRequest" : {
2020-05-18 20:50:09 +00:00
"method" : "DELETE" ,
2020-05-02 02:40:14 +00:00
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"type" : "text" ,
2020-05-18 20:50:09 +00:00
"value" : "application/json"
2020-05-02 02:40:14 +00:00
}
] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/incidents/2/updates/1" ,
2020-05-02 02:40:14 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"incidents" ,
"2" ,
"updates" ,
"1"
2020-05-02 02:40:14 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Mon, 04 May 2020 03:23:00 GMT"
2020-05-02 02:40:14 +00:00
} ,
{
2020-05-18 20:50:09 +00:00
"key" : "Content-Length" ,
"value" : "261"
} ,
{
"key" : "Connection" ,
"value" : "close"
2020-05-02 02:40:14 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : "{\n \"status\": \"success\",\n \"type\": \"incident_update\",\n \"method\": \"delete\",\n \"id\": 1,\n \"output\": {\n \"id\": 1,\n \"message\": \"Website is loading very slowly, looking into this.\",\n \"type\": \"Investigating\",\n \"created_at\": \"2020-05-04T03:20:05.102435Z\",\n \"updated_at\": \"2020-05-04T03:20:05.102435Z\"\n }\n}"
2020-05-02 02:40:14 +00:00
}
]
2020-05-18 20:50:09 +00:00
}
] ,
"protocolProfileBehavior" : { }
} ,
{
"name" : "Groups" ,
"item" : [
2020-05-02 02:40:14 +00:00
{
2020-05-18 20:50:09 +00:00
"name" : "All Groups" ,
2020-05-02 02:40:14 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "e83ac60d-3683-441e-a78b-d15b6c2b704d" ,
2020-05-02 02:40:14 +00:00
"exec" : [
2020-05-18 20:50:09 +00:00
"pm.test(\"View All Groups\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.length).to.eql(2);" ,
"});"
2020-03-13 04:06:06 +00:00
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [ ] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/groups" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"groups"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "View an array of all Groups added to your Statping instance."
2020-03-13 04:06:06 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "All Groups" ,
2020-03-13 04:06:06 +00:00
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/groups" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"groups"
2020-03-13 04:06:06 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Thu, 03 Jan 2019 21:48:40 GMT"
2020-03-13 04:06:06 +00:00
} ,
{
"key" : "Content-Length" ,
2020-05-18 20:50:09 +00:00
"value" : "301"
2020-03-13 04:06:06 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : "[\n {\n \"id\": 1,\n \"name\": \"Main Services\",\n \"public\": true,\n \"created_at\": \"2019-01-03T13:48:23.488553261-08:00\",\n \"updated_at\": \"2019-01-03T13:48:23.488614502-08:00\"\n },\n {\n \"id\": 2,\n \"name\": \"Linked Services\",\n \"public\": false,\n \"created_at\": \"2019-01-03T13:48:23.489693923-08:00\",\n \"updated_at\": \"2019-01-03T13:48:23.489719447-08:00\"\n }\n]"
2020-03-13 04:06:06 +00:00
}
]
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "View Group" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "d2bba501-9674-4143-a51d-33721eb4785f" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
2020-05-18 20:50:09 +00:00
"pm.test(\"View Group\", function () {" ,
2020-03-13 04:06:06 +00:00
" var jsonData = pm.response.json();" ,
2020-05-18 20:50:09 +00:00
" pm.expect(jsonData.name).to.eql(\"Main Services\");" ,
2020-03-13 04:06:06 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
2020-05-18 20:50:09 +00:00
"method" : "GET" ,
2020-03-13 04:06:06 +00:00
"header" : [
{
"key" : "Content-Type" ,
2020-05-18 20:50:09 +00:00
"name" : "Content-Type" ,
"type" : "text" ,
2020-03-13 04:06:06 +00:00
"value" : "application/json"
}
] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/groups/1" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"groups" ,
"1"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "View a specific group"
2020-03-13 04:06:06 +00:00
} ,
2020-05-02 02:40:14 +00:00
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "View Group" ,
2020-05-02 02:40:14 +00:00
"originalRequest" : {
2020-05-18 20:50:09 +00:00
"method" : "GET" ,
2020-05-02 02:40:14 +00:00
"header" : [
{
"key" : "Content-Type" ,
2020-05-18 20:50:09 +00:00
"name" : "Content-Type" ,
"type" : "text" ,
2020-05-02 02:40:14 +00:00
"value" : "application/json"
}
] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/groups/1" ,
2020-05-02 02:40:14 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"groups" ,
"1"
2020-05-02 02:40:14 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Thu, 03 Jan 2019 21:48:58 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "148"
2020-05-02 02:40:14 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : "{\n \"id\": 1,\n \"name\": \"Main Services\",\n \"public\": true,\n \"created_at\": \"2019-01-03T13:48:23.488553261-08:00\",\n \"updated_at\": \"2019-01-03T13:48:23.488614502-08:00\"\n}"
2020-05-02 02:40:14 +00:00
}
]
2020-03-13 04:06:06 +00:00
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Create Group" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "6ea60d3a-b601-41a8-8b5e-734f3946d34c" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
2020-05-18 20:50:09 +00:00
"pm.test(\"Create Group\", function () {" ,
2020-03-13 04:06:06 +00:00
" var jsonData = pm.response.json();" ,
2020-05-18 20:50:09 +00:00
" pm.expect(jsonData.output.name).to.eql(\"New Group\");" ,
" pm.globals.set(\"group_id\", jsonData.output.id);" ,
2020-03-13 04:06:06 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
2020-05-18 20:50:09 +00:00
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
}
] ,
"body" : {
"mode" : "raw" ,
"raw" : "{\n \"name\": \"New Group\",\n \"public\": true\n}"
} ,
2020-03-13 04:06:06 +00:00
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/groups" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"groups"
2020-03-13 04:06:06 +00:00
]
2020-05-18 20:50:09 +00:00
} ,
"description" : "Create a new Group to organize services."
2020-03-13 04:06:06 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "Create Group" ,
2020-03-13 04:06:06 +00:00
"originalRequest" : {
2020-05-18 20:50:09 +00:00
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
}
] ,
"body" : {
"mode" : "raw" ,
"raw" : "{\n \"name\": \"New Group\",\n \"public\": true\n}"
} ,
2020-03-13 04:06:06 +00:00
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/groups" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"groups"
2020-03-13 04:06:06 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Thu, 03 Jan 2019 21:49:25 GMT"
2020-03-13 04:06:06 +00:00
} ,
{
"key" : "Content-Length" ,
2020-05-18 20:50:09 +00:00
"value" : "214"
2020-03-13 04:06:06 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : "{\n \"status\": \"success\",\n \"type\": \"group\",\n \"method\": \"create\",\n \"id\": 3,\n \"output\": {\n \"id\": 3,\n \"name\": \"New Group\",\n \"public\": true,\n \"created_at\": \"2019-01-03T13:49:25.947069211-08:00\",\n \"updated_at\": \"2019-01-03T13:49:25.947120276-08:00\"\n }\n}"
2020-03-13 04:06:06 +00:00
}
]
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Reorder Groups" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "4efd65bf-6e56-4600-91af-36cb82ffb125" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});"
] ,
"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" ,
2020-05-18 20:50:09 +00:00
"raw" : "[{\"group\":1,\"order\":1},{\"group\":2,\"order\":2}]" ,
"options" : {
"raw" : { }
}
2020-03-13 04:06:06 +00:00
} ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/reorder/groups" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"reorder" ,
"groups"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "Reorder services in a specific order for the index page."
2020-03-13 04:06:06 +00:00
} ,
2020-05-18 20:50:09 +00:00
"response" : [ ]
2020-03-13 04:06:06 +00:00
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Delete Group" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "ec903995-c37b-436a-b554-c9e4ee5ff52a" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
2020-05-18 20:50:09 +00:00
"pm.test(\"Delete Service\", function () {" ,
2020-03-13 04:06:06 +00:00
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.status).to.eql(\"success\");" ,
2020-05-18 20:50:09 +00:00
" pm.expect(jsonData.type).to.eql(\"group\");" ,
2020-03-13 04:06:06 +00:00
" pm.expect(jsonData.method).to.eql(\"delete\");" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "DELETE" ,
"header" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
2020-03-13 04:06:06 +00:00
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/groups/{{group_id}}" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"groups" ,
"{{group_id}}"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "Delete a group and removes all services attached to this group."
2020-03-13 04:06:06 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "Delete Group" ,
2020-03-13 04:06:06 +00:00
"originalRequest" : {
"method" : "DELETE" ,
"header" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
2020-03-13 04:06:06 +00:00
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/groups/{{group_id}}" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"groups" ,
"{{group_id}}"
2020-03-13 04:06:06 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Thu, 03 Jan 2019 21:49:49 GMT"
2020-03-13 04:06:06 +00:00
} ,
{
"key" : "Content-Length" ,
2020-05-18 20:50:09 +00:00
"value" : "214"
2020-03-13 04:06:06 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : "{\n \"status\": \"success\",\n \"type\": \"group\",\n \"method\": \"delete\",\n \"id\": 3,\n \"output\": {\n \"id\": 3,\n \"name\": \"New Group\",\n \"public\": true,\n \"created_at\": \"2019-01-03T13:49:25.947069211-08:00\",\n \"updated_at\": \"2019-01-03T13:49:25.947120276-08:00\"\n }\n}"
2020-03-13 04:06:06 +00:00
}
]
}
] ,
2020-05-18 20:50:09 +00:00
"description" : "Statping allows you to group multiple services with a unique name for better viewablity. You can reorder the groups to make your status page a little more organized if you have tons of services.\n\n# Group Fields\n- `name` - **(required)** Group name to contain multiple services\n- `public` - Allow non-users to view this group and services inside it (default false)" ,
2020-03-13 04:06:06 +00:00
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"event" : [
{
"listen" : "prerequest" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "abe8dbf2-9e63-49b5-b5d3-7a50217c87a3" ,
2020-03-13 04:06:06 +00:00
"type" : "text/javascript" ,
"exec" : [
""
]
}
} ,
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "de397a38-c190-4928-92f0-393ab85e5342" ,
2020-03-13 04:06:06 +00:00
"type" : "text/javascript" ,
"exec" : [
""
]
}
}
2020-05-02 02:40:14 +00:00
] ,
"protocolProfileBehavior" : { }
2020-03-13 04:06:06 +00:00
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Users" ,
2020-03-13 04:06:06 +00:00
"item" : [
{
2020-05-18 20:50:09 +00:00
"name" : "Login" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "eaec5a14-dd31-4e9c-9e30-8999591514c3" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
2020-05-18 20:50:09 +00:00
"pm.test(\"Check Login JWT Token\", function () {" ,
2020-03-13 04:06:06 +00:00
" var jsonData = pm.response.json();" ,
2020-05-18 20:50:09 +00:00
" pm.expect(jsonData).to.have.property('token');" ,
2020-03-13 04:06:06 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
2020-05-18 20:50:09 +00:00
"type" : "noauth"
} ,
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"type" : "text" ,
"value" : "application/x-www-form-urlencoded"
}
] ,
"body" : {
"mode" : "urlencoded" ,
"urlencoded" : [
2020-03-13 04:06:06 +00:00
{
2020-05-18 20:50:09 +00:00
"key" : "username" ,
"value" : "admin" ,
"type" : "text"
} ,
{
"key" : "password" ,
"value" : "admin" ,
"type" : "text"
2020-03-13 04:06:06 +00:00
}
2020-05-18 20:50:09 +00:00
] ,
"options" : {
"urlencoded" : { }
}
2020-03-13 04:06:06 +00:00
} ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/login" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"login"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "This endpoint will login a user and set a JWT token for future requests."
2020-03-13 04:06:06 +00:00
} ,
2020-05-02 02:40:14 +00:00
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "Login" ,
2020-05-02 02:40:14 +00:00
"originalRequest" : {
2020-05-18 20:50:09 +00:00
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"type" : "text" ,
"value" : "application/x-www-form-urlencoded"
}
] ,
"body" : {
"mode" : "urlencoded" ,
"urlencoded" : [
{
"key" : "username" ,
"value" : "admin" ,
"type" : "text"
} ,
{
"key" : "password" ,
"value" : "admin" ,
"type" : "text"
}
] ,
"options" : {
"urlencoded" : { }
}
} ,
2020-05-02 02:40:14 +00:00
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/login" ,
2020-05-02 02:40:14 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"login"
2020-05-02 02:40:14 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
2020-05-18 20:50:09 +00:00
{
"key" : "Content-Length" ,
"value" : "174"
} ,
2020-05-02 02:40:14 +00:00
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Sat, 02 May 2020 00:56:17 GMT"
2020-05-02 02:40:14 +00:00
} ,
{
2020-05-18 20:50:09 +00:00
"key" : "Set-Cookie" ,
"value" : "statping_auth=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiYWRtaW4iOnRydWUsImV4cCI6MTU4ODY0MDE3N30.tf399_LfAphSGlKMtgphg6qpPrn-_w92XfCrK5FwbZY; Expires=Tue, 05 May 2020 00:56:17 GMT"
2020-05-02 02:40:14 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : "{\n \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiYWRtaW4iOnRydWUsImV4cCI6MTU4ODY0MDE3N30.tf399_LfAphSGlKMtgphg6qpPrn-_w92XfCrK5FwbZY\",\n \"admin\": true\n}"
2020-05-02 02:40:14 +00:00
}
]
2020-03-13 04:06:06 +00:00
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Logout" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "f858d94a-6534-452b-9197-99c64d7b4009" ,
"exec" : [
""
] ,
"type" : "text/javascript"
}
}
] ,
"protocolProfileBehavior" : {
"disableBodyPruning" : true
} ,
"request" : {
"auth" : {
"type" : "noauth"
} ,
"method" : "GET" ,
"header" : [ ] ,
"body" : {
"mode" : "urlencoded" ,
"urlencoded" : [ ] ,
"options" : {
"urlencoded" : { }
}
} ,
"url" : {
"raw" : "{{endpoint}}/api/logout" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"logout"
]
} ,
"description" : "This endpoint will logout a user and redirect to the index page."
} ,
"response" : [ ]
} ,
{
"name" : "View All Users" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "20b79651-9175-4a30-98f3-4666ebf9ab05" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
2020-05-02 02:40:14 +00:00
"});" ,
"" ,
2020-05-18 20:50:09 +00:00
"pm.test(\"View All Users\", function () {" ,
2020-05-02 02:40:14 +00:00
" var jsonData = pm.response.json();" ,
2020-05-18 20:50:09 +00:00
" 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\");" ,
2020-03-13 04:06:06 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
2020-05-02 02:40:14 +00:00
"value" : "{{api_key}}" ,
2020-03-13 04:06:06 +00:00
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [ ] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/users" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"users"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "View all users on your Statping instance."
2020-03-13 04:06:06 +00:00
} ,
2020-05-02 02:40:14 +00:00
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "View All Users" ,
2020-05-02 02:40:14 +00:00
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/users" ,
2020-05-02 02:40:14 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"users"
2020-05-02 02:40:14 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Mon, 10 Dec 2018 19:32:23 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "701"
2020-05-02 02:40:14 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"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]"
2020-05-02 02:40:14 +00:00
}
]
2020-03-13 04:06:06 +00:00
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Create User" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "fd7e8b36-70c2-4060-bb50-5d87e663dea3" ,
2020-03-13 04:06:06 +00:00
"exec" : [
2020-05-02 02:40:14 +00:00
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
2020-05-18 20:50:09 +00:00
"pm.test(\"Create User\", function () {" ,
2020-03-13 04:06:06 +00:00
" var jsonData = pm.response.json();" ,
2020-04-16 09:57:00 +00:00
" pm.expect(jsonData.status).to.eql(\"success\");" ,
2020-05-18 20:50:09 +00:00
" pm.expect(jsonData.type).to.eql(\"user\");" ,
" pm.expect(jsonData.method).to.eql(\"create\");" ,
" pm.globals.set(\"user_id\", jsonData.output.id);" ,
2020-03-13 04:06:06 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
2020-05-02 02:40:14 +00:00
"value" : "{{api_key}}" ,
2020-03-13 04:06:06 +00:00
"type" : "string"
}
]
} ,
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
2020-05-18 20:50:09 +00:00
"value" : "application/json"
2020-03-13 04:06:06 +00:00
}
] ,
"body" : {
"mode" : "raw" ,
2020-05-18 20:50:09 +00:00
"raw" : "{\n \"username\": \"adminuser2\",\n \"email\": \"info@adminemail.com\",\n \"password\": \"passsword123\",\n \"admin\": true\n}"
2020-03-13 04:06:06 +00:00
} ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/users" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"users"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "Create a new Statping user"
2020-03-13 04:06:06 +00:00
} ,
2020-05-02 02:40:14 +00:00
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "Create User" ,
2020-05-02 02:40:14 +00:00
"originalRequest" : {
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
2020-05-18 20:50:09 +00:00
"value" : "application/json"
2020-05-02 02:40:14 +00:00
}
] ,
"body" : {
"mode" : "raw" ,
2020-05-18 20:50:09 +00:00
"raw" : "{\n \"username\": \"adminuser2\",\n \"email\": \"info@adminemail.com\",\n \"password\": \"passsword123\",\n \"admin\": true\n}"
2020-05-02 02:40:14 +00:00
} ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/users" ,
2020-05-02 02:40:14 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"users"
2020-05-02 02:40:14 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Length" ,
2020-05-18 20:50:09 +00:00
"value" : "468"
2020-05-02 02:40:14 +00:00
} ,
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Sat, 02 May 2020 01:08:07 GMT"
2020-05-02 02:40:14 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : "{\n \"status\": \"success\",\n \"type\": \"user\",\n \"method\": \"create\",\n \"id\": 2,\n \"output\": {\n \"id\": 2,\n \"username\": \"adminuser2\",\n \"password\": \"$2a$14$gIGeiN8bLYTGtkTwhSDS7us5gGXJ3tpcxMEY9ynX.VnpCKDFVG3nO\",\n \"email\": \"info@adminemail.com\",\n \"api_key\": \"acbed53aec11c0a0a555eaae6ce73501c059215bf4bb6ae4b0fc0eb2765780a1\",\n \"api_secret\": \"3699ae08cb15ee85b6529f6895bd104a3be00f823b1aa3c810a6582676d55ba7\",\n \"admin\": true,\n \"created_at\": \"2020-05-02T01:08:06.971716991Z\",\n \"updated_at\": \"2020-05-02T01:08:06.971716991Z\"\n }\n}"
2020-05-02 02:40:14 +00:00
}
]
2020-03-13 04:06:06 +00:00
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "View User" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "925d3cea-fa59-42db-9d4e-154021cfbd37" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
2020-05-18 20:50:09 +00:00
"pm.test(\"View User\", function () {" ,
2020-03-13 04:06:06 +00:00
" var jsonData = pm.response.json();" ,
2020-05-18 20:50:09 +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\");" ,
" pm.expect(jsonData.admin).to.eql(true);" ,
2020-03-13 04:06:06 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
2020-05-02 02:40:14 +00:00
"auth" : {
2020-05-18 20:50:09 +00:00
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
2020-05-02 02:40:14 +00:00
} ,
2020-03-13 04:06:06 +00:00
"method" : "GET" ,
"header" : [ ] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/users/{{user_id}}" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"users" ,
"{{user_id}}"
2020-03-13 04:06:06 +00:00
]
2020-05-18 20:50:09 +00:00
}
2020-03-13 04:06:06 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "View User" ,
2020-03-13 04:06:06 +00:00
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/users/{{user_id}}" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"users" ,
"{{user_id}}"
2020-03-13 04:06:06 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Mon, 10 Dec 2018 19:32:50 GMT"
2020-03-13 04:06:06 +00:00
} ,
{
"key" : "Content-Length" ,
2020-05-18 20:50:09 +00:00
"value" : "281"
2020-03-13 04:06:06 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"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}"
2020-03-13 04:06:06 +00:00
}
]
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Update User" ,
2020-03-13 04:06:06 +00:00
"event" : [
2020-05-18 20:50:09 +00:00
{
"listen" : "prerequest" ,
"script" : {
"id" : "2802ca86-12c2-41ce-947d-e086fcb7c753" ,
"exec" : [
""
] ,
"type" : "text/javascript"
}
} ,
2020-03-13 04:06:06 +00:00
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "19f750c7-1df2-4a03-b0f0-b487d80d4917" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
2020-05-18 20:50:09 +00:00
"pm.test(\"Update User\", function () {" ,
2020-03-13 04:06:06 +00:00
" var jsonData = pm.response.json();" ,
2020-05-18 20:50:09 +00:00
" pm.expect(jsonData.status).to.eql(\"success\");" ,
2020-03-13 04:06:06 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
2020-05-18 20:50:09 +00:00
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
2020-03-13 04:06:06 +00:00
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
2020-05-18 20:50:09 +00:00
"value" : "application/json"
2020-03-13 04:06:06 +00:00
}
] ,
"body" : {
"mode" : "raw" ,
2020-05-18 20:50:09 +00:00
"raw" : "{\n \"username\": \"adminupdated\",\n \"email\": \"info@email.com\",\n \"password\": \"password12345\",\n \"admin\": true\n}"
2020-03-13 04:06:06 +00:00
} ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/users/{{user_id}}" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"users" ,
"{{user_id}}"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "Update a user's information including username, email, password, and if they are an admin or not."
2020-03-13 04:06:06 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "Update User" ,
2020-03-13 04:06:06 +00:00
"originalRequest" : {
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
2020-05-18 20:50:09 +00:00
"value" : "application/json"
2020-03-13 04:06:06 +00:00
}
] ,
"body" : {
"mode" : "raw" ,
2020-05-18 20:50:09 +00:00
"raw" : "{\n \"username\": \"adminupdated\",\n \"email\": \"info@email.com\",\n \"password\": \"password12345\",\n \"admin\": true\n}"
2020-03-13 04:06:06 +00:00
} ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/users/{{user_id}}" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"users" ,
"{{user_id}}"
2020-03-13 04:06:06 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Mon, 10 Dec 2018 19:32:58 GMT"
2020-03-13 04:06:06 +00:00
} ,
{
"key" : "Content-Length" ,
2020-05-18 20:50:09 +00:00
"value" : "421"
2020-03-13 04:06:06 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"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}"
2020-03-13 04:06:06 +00:00
}
]
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Delete User" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "d94974c7-7c6f-4298-8ab7-6bd7a789020f" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
2020-05-18 20:50:09 +00:00
"pm.test(\"Delete User\", function () {" ,
2020-03-13 04:06:06 +00:00
" var jsonData = pm.response.json();" ,
2020-05-18 20:50:09 +00:00
" var id = pm.globals.get(\"user_id\");" ,
" pm.expect(jsonData.status).to.eql(\"success\");" ,
" pm.expect(jsonData.type).to.eql(\"user\");" ,
" pm.expect(jsonData.id).to.eql(id);" ,
" pm.expect(jsonData.method).to.eql(\"delete\");" ,
2020-03-13 04:06:06 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
2020-05-18 20:50:09 +00:00
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "DELETE" ,
2020-03-13 04:06:06 +00:00
"header" : [ ] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/users/{{user_id}}" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"users" ,
"{{user_id}}"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "Delete a specific user from the database."
2020-03-13 04:06:06 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "Delete User" ,
2020-03-13 04:06:06 +00:00
"originalRequest" : {
2020-05-18 20:50:09 +00:00
"method" : "DELETE" ,
2020-03-13 04:06:06 +00:00
"header" : [ ] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/users/{{user_id}}" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"users" ,
"{{user_id}}"
2020-03-13 04:06:06 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Mon, 10 Dec 2018 19:33:06 GMT"
2020-03-13 04:06:06 +00:00
} ,
{
"key" : "Content-Length" ,
2020-05-18 20:50:09 +00:00
"value" : "421"
2020-03-13 04:06:06 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"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}"
2020-03-13 04:06:06 +00:00
}
]
2020-05-18 20:50:09 +00:00
}
] ,
"description" : "You can create new users with different permissions to allow for read only API access, and super admin abilities. \n\n# User Fields\n- `username` - **(required)** Unique username for the user to sign in as\n- `email` - **(required)** Unique email address for this user\n- `password` - **(required)** User password in plain text (will be encrypted)\n- `admin` - Set user as admin (default false)" ,
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"event" : [
{
"listen" : "prerequest" ,
"script" : {
"id" : "8cef4ad5-1c96-46e8-8fc9-9e9e044730dc" ,
"type" : "text/javascript" ,
"exec" : [
""
]
}
2020-03-13 04:06:06 +00:00
} ,
{
2020-05-18 20:50:09 +00:00
"listen" : "test" ,
"script" : {
"id" : "872da99f-a57d-4a54-bd5e-18b5529c715f" ,
"type" : "text/javascript" ,
"exec" : [
""
]
}
}
] ,
"protocolProfileBehavior" : { }
} ,
{
"name" : "Notifiers" ,
"item" : [
{
"name" : "All Notifiers" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "9f3e4a3e-a690-4dcb-897f-fdfa8503d79f" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
2020-05-18 20:50:09 +00:00
"pm.test(\"View All Notifiers\", function () {" ,
2020-03-13 04:06:06 +00:00
" var jsonData = pm.response.json();" ,
2020-05-18 20:50:09 +00:00
" pm.expect(jsonData.length).to.eql(10);" ,
2020-03-13 04:06:06 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
2020-05-18 20:50:09 +00:00
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
2020-03-13 04:06:06 +00:00
} ,
2020-05-18 20:50:09 +00:00
"method" : "GET" ,
"header" : [ ] ,
2020-03-13 04:06:06 +00:00
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/notifiers" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"notifiers"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "View an array of all the Notifiers including all details about the notifier."
2020-03-13 04:06:06 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "All Notifiers" ,
2020-03-13 04:06:06 +00:00
"originalRequest" : {
2020-05-18 20:50:09 +00:00
"method" : "GET" ,
"header" : [ ] ,
2020-03-13 04:06:06 +00:00
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/notifiers" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"notifiers"
2020-03-13 04:06:06 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Sat, 02 May 2020 01:08:49 GMT"
2020-03-13 04:06:06 +00:00
} ,
{
2020-05-18 20:50:09 +00:00
"key" : "Transfer-Encoding" ,
"value" : "chunked"
2020-03-13 04:06:06 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : "[\n {\n \"id\": 1,\n \"method\": \"slack\",\n \"host\": \"https://webhooksurl.slack.com/***\",\n \"enabled\": false,\n \"limits\": 60,\n \"removable\": false,\n \"created_at\": \"2020-05-02T01:00:13.404253878Z\",\n \"updated_at\": \"2020-05-02T01:00:13.404253878Z\",\n \"title\": \"slack\",\n \"description\": \"Send notifications to your slack channel when a service is offline. Insert your Incoming webhook URL for your channel to receive notifications. Based on the <a href=\\\"https://api.slack.com/incoming-webhooks\\\">Slack API</a>.\",\n \"author\": \"Hunter Long\",\n \"author_url\": \"https://github.com/hunterlong\",\n \"icon\": \"fab fa-slack\",\n \"delay\": \"10000000000\",\n \"form\": [\n {\n \"type\": \"text\",\n \"title\": \"Incoming Webhook Url\",\n \"placeholder\": \"Insert your Slack Webhook URL here.\",\n \"field\": \"Host\",\n \"small_text\": \"Incoming Webhook URL from <a href=\\\"https://api.slack.com/apps\\\" target=\\\"_blank\\\">Slack Apps</a>\",\n \"required\": true,\n \"hidden\": false,\n \"list\": false,\n \"switch\": false\n }\n ]\n },\n {\n \"id\": 2,\n \"method\": \"command\",\n \"host\": \"/bin/bash\",\n \"enabled\": false,\n \"limits\": 60,\n \"removable\": false,\n \"created_at\": \"2020-05-02T01:00:13.495166024Z\",\n \"updated_at\": \"2020-05-02T01:00:13.495166024Z\",\n \"title\": \"Command\",\n \"description\": \"Shell Command allows you to run a customized shell/bash Command on the local machine it's running on.\",\n \"author\": \"Hunter Long\",\n \"author_url\": \"https://github.com/hunterlong\",\n \"icon\": \"fas fa-terminal\",\n \"delay\": \"1000000000\",\n \"form\": [\n {\n \"type\": \"text\",\n \"title\": \"Shell or Bash\",\n \"placeholder\": \"/usr/bin/curl\",\n \"field\": \"host\",\n \"small_text\": \"You can use '/bin/sh', '/bin/bash', '/usr/bin/curl' or an absolute path for an application.\",\n \"required\": false,\n \"hidden\": false,\n \"list\": false,\n \"switch\": false\n },\n {\n \"type\": \"text\",\n \"title\": \"Command to Run on OnSuccess\",\n \"placeholder\": \"http://localhost:8080/health\",\n \"field\": \"var1\",\n \"small_text\": \"This Command will run when a service is receiving a Successful event.\",\n \"required\": false,\n \"hidden\": false,\n \"list\": false,\n \"switch\": false\n },\n {\n \"type\": \"text\",\n \"title\": \"Command to Run on OnFailure\",\n \"placeholder\": \"http://localhost:8080/health\",\n \"field\": \"var2\",\n \"small_text\": \"This Command will run when a service is receiving a Failing event.\",\n \"required\": false,\n \"hidden\": false,\n \"list\": false,\n \"switch\": false\n }\n ]\n },\n {\n \"id\": 3,\n \"method\": \"discord\",\n \"host\": \"https://discordapp.com/api/webhooks/****/*****\",\n \"enabled\": false,\n \"limits\": 60,\n \"removable\": false,\n \"created_at\": \"2020-05-02T01:00:13.578783367Z\",\n \"updated_at\": \"2020-05-02T01:00:13.578783367Z\",\n \"title\": \"discord\",\n \"description\": \"Send notifications to your discord channel using discord webhooks. Insert your discord channel Webhook URL to receive notifications. Based on the <a href=\\\" h t t p s : //discordapp.com/developers/docs/resou
2020-03-13 04:06:06 +00:00
}
]
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "View Notifier" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "7a42a113-8bdb-47dd-a914-36bc2aa65aba" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
2020-05-18 20:50:09 +00:00
"pm.test(\"Notifier Fields\", function () {" ,
2020-03-13 04:06:06 +00:00
" var jsonData = pm.response.json();" ,
2020-05-18 20:50:09 +00:00
" pm.expect(jsonData.method).to.eql(\"slack\");" ,
" pm.expect(jsonData.enabled).to.eql(false);" ,
2020-03-13 04:06:06 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
2020-05-18 20:50:09 +00:00
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
2020-03-13 04:06:06 +00:00
} ,
2020-05-18 20:50:09 +00:00
"method" : "GET" ,
"header" : [ ] ,
2020-03-13 04:06:06 +00:00
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/notifier/slack" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"notifier" ,
"slack"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "View a specific notifier and it's details."
2020-03-13 04:06:06 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "View Notifier" ,
2020-03-13 04:06:06 +00:00
"originalRequest" : {
2020-05-18 20:50:09 +00:00
"method" : "GET" ,
2020-03-13 04:06:06 +00:00
"header" : [ ] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/notifier/slack" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"notifier" ,
"slack"
2020-03-13 04:06:06 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
2020-05-18 20:50:09 +00:00
{
"key" : "Content-Length" ,
"value" : "297"
} ,
2020-03-13 04:06:06 +00:00
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Sat, 02 May 2020 01:09:06 GMT"
2020-03-13 04:06:06 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : "{\n \"id\": 1,\n \"method\": \"slack\",\n \"host\": \"https://webhooksurl.slack.com/***\",\n \"enabled\": false,\n \"limits\": 60,\n \"removable\": false,\n \"created_at\": \"2020-05-02T01:09:06.326407831Z\",\n \"updated_at\": \"2020-05-02T01:09:06.326408155Z\",\n \"title\": \"\",\n \"description\": \"\",\n \"author\": \"\",\n \"author_url\": \"\",\n \"icon\": \"\",\n \"delay\": \"0\",\n \"form\": null\n}"
2020-03-13 04:06:06 +00:00
}
]
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Update Notifier" ,
2020-04-16 09:57:00 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "2a8a1a62-57ea-4a7a-9f0a-713ac548c151" ,
2020-04-16 09:57:00 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
2020-05-18 20:50:09 +00:00
"pm.test(\"Update Notifier\", function () {" ,
2020-04-16 09:57:00 +00:00
" var jsonData = pm.response.json();" ,
2020-05-18 20:50:09 +00:00
" pm.expect(jsonData.status).to.eql(\"success\");" ,
" pm.expect(jsonData.output).to.eql(\"slack\");" ,
" pm.expect(jsonData.method).to.eql(\"update\");" ,
2020-04-16 09:57:00 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
2020-05-18 20:50:09 +00:00
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"value" : "application/json" ,
"type" : "text"
}
] ,
"body" : {
"mode" : "raw" ,
"raw" : "{\n \"method\": \"slack\",\n \"host\": \"https://hooks.slack.com/services/EXAMPLEIDHERE/BV33WKP0C/MtKw3Kc8BFylTv4pohKqHtXX\",\n \"enabled\": true,\n \"limits\": 55\n}" ,
"options" : {
"raw" : { }
}
} ,
2020-04-16 09:57:00 +00:00
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/notifier/slack" ,
2020-04-16 09:57:00 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"notifier" ,
"slack"
2020-04-16 09:57:00 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "Update a notifier to change it's values."
2020-04-16 09:57:00 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "Update Notifier" ,
2020-04-16 09:57:00 +00:00
"originalRequest" : {
2020-05-18 20:50:09 +00:00
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"value" : "application/json" ,
"type" : "text"
}
] ,
"body" : {
"mode" : "raw" ,
"raw" : "{\n \"method\": \"slack\",\n \"host\": \"https://hooks.slack.com/services/EXAMPLEIDHERE/BV33WKP0C/MtKw3Kc8BFylTv4pohKqHtXX\",\n \"enabled\": true,\n \"limits\": 55\n}"
} ,
2020-04-16 09:57:00 +00:00
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/notifier/slack" ,
2020-04-16 09:57:00 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"notifier" ,
"slack"
2020-04-16 09:57:00 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
2020-05-18 20:50:09 +00:00
{
"key" : "Content-Length" ,
"value" : "72"
} ,
2020-04-16 09:57:00 +00:00
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Sat, 02 May 2020 01:09:45 GMT"
2020-04-16 09:57:00 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : "{\n \"status\": \"success\",\n \"type\": \"string\",\n \"method\": \"update\",\n \"output\": \"slack\"\n}"
2020-04-16 09:57:00 +00:00
}
]
} ,
2020-03-13 04:06:06 +00:00
{
2020-05-18 20:50:09 +00:00
"name" : "Test Notifier" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "198374af-ccbc-4e2e-8af2-df58622379d4" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
2020-05-18 20:50:09 +00:00
"pm.test(\"Test Notifier\", function () {" ,
2020-03-13 04:06:06 +00:00
" var jsonData = pm.response.json();" ,
2020-05-18 20:50:09 +00:00
" pm.expect(jsonData.success).to.eql(false);" ,
2020-03-13 04:06:06 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
2020-04-16 09:57:00 +00:00
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
2020-03-13 04:06:06 +00:00
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
2020-05-18 20:50:09 +00:00
"type" : "text" ,
"value" : "application/json"
2020-03-13 04:06:06 +00:00
}
] ,
"body" : {
"mode" : "raw" ,
2020-05-18 20:50:09 +00:00
"raw" : "{\n \"method\": \"slack\",\n \"host\": \"https://hooks.slack.com/services/EXAMPLEIDHERE/BV33WKP0C/MtKw3Kc8BFylTv4pohKqHtXX\",\n \"enabled\": true,\n \"limits\": 55\n}" ,
"options" : {
"raw" : { }
}
2020-03-13 04:06:06 +00:00
} ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/notifier/slack/test" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"notifier" ,
"slack" ,
"test"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "Update a notifier to change it's values."
2020-03-13 04:06:06 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "Test Notifier" ,
2020-03-13 04:06:06 +00:00
"originalRequest" : {
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
2020-05-18 20:50:09 +00:00
"type" : "text" ,
"value" : "application/json"
2020-03-13 04:06:06 +00:00
}
] ,
"body" : {
"mode" : "raw" ,
2020-05-18 20:50:09 +00:00
"raw" : "{\n \"method\": \"slack\",\n \"host\": \"https://hooks.slack.com/services/EXAMPLEIDHERE/BV33WKP0C/MtKw3Kc8BFylTv4pohKqHtXX\",\n \"enabled\": true,\n \"limits\": 55\n}" ,
"options" : {
"raw" : { }
}
2020-03-13 04:06:06 +00:00
} ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/notifier/slack/test" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"notifier" ,
"slack" ,
"test"
2020-03-13 04:06:06 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Mon, 04 May 2020 03:25:07 GMT"
2020-03-13 04:06:06 +00:00
} ,
{
2020-05-18 20:50:09 +00:00
"key" : "Connection" ,
"value" : "close"
} ,
{
"key" : "Transfer-Encoding" ,
"value" : "chunked"
2020-03-13 04:06:06 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : " { \ n \ " s u c c e s s \ " : f a l s e , \ n \ " r e s p o n s e \ " : \ " < ! D O C T Y P E h t m l > < h t m l l a n g = \ \ \ " e n - U S \ \ \ " c l a s s = \ \ \ " \ \ \ " > < h e a d > < s c r i p t t y p e = \ \ \ " t e x t / j a v a s c r i p t \ \ \ " s r c = \ \ \ " h t t p s : //a.slack-edge.com/bv1-8-8cacda2/webpack.manifest.d77c617fb8f0095d9c13.min.js\\\" onload=\\\"window._cdn ? _cdn.ok(this, arguments) : null\\\" onerror=\\\"window._cdn ? _cdn.failed(this, arguments) : null\\\" crossorigin=\\\"anonymous\\\"></script><script>window.ts_endpoint_url = \\\"https:\\\\/\\\\/slack.com\\\\/beacon\\\\/timing\\\";(function(e) {\\n\\tvar n=Date.now?Date.now():+new Date,r=e.performance||{},t=[],a={},i=function(e,n){for(var r=0,a=t.length,i=[];a>r;r++)t[r][e]==n&&i.push(t[r]);return i},o=function(e,n){for(var r,a=t.length;a--;)r=t[a],r.entryType!=e||void 0!==n&&r.name!=n||t.splice(a,1)};r.now||(r.now=r.webkitNow||r.mozNow||r.msNow||function(){return(Date.now?Date.now():+new Date)-n}),r.mark||(r.mark=r.webkitMark||function(e){var n={name:e,entryType:\\\"mark\\\",startTime:r.now(),duration:0};t.push(n),a[e]=n}),r.measure||(r.measure=r.webkitMeasure||function(e,n,r){n=a[n].startTime,r=a[r].startTime,t.push({name:e,entryType:\\\"measure\\\",startTime:n,duration:r-n})}),r.getEntriesByType||(r.getEntriesByType=r.webkitGetEntriesByType||function(e){return i(\\\"entryType\\\",e)}),r.getEntriesByName||(r.getEntriesByName=r.webkitGetEntriesByName||function(e){return i(\\\"name\\\",e)}),r.clearMarks||(r.clearMarks=r.webkitClearMarks||function(e){o(\\\"mark\\\",e)}),r.clearMeasures||(r.clearMeasures=r.webkitClearMeasures||function(e){o(\\\"measure\\\",e)}),e.performance=r,\\\"function\\\"==typeof define&&(define.amd||define.ajs)&&define(\\\"performance\\\",[],function(){return r}) // eslint-disable-line\\n})(window);</script><script>\\n\\n(function () {\\n\\t\\n\\twindow.TSMark = function (mark_label) {\\n\\t\\tif (!window.performance || !window.performance.mark) return;\\n\\t\\tperformance.mark(mark_label);\\n\\t};\\n\\twindow.TSMark('start_load');\\n\\n\\t\\n\\twindow.TSMeasureAndBeacon = function (measure_label, start_mark_label) {\\n\\t\\tif (!window.performance || !window.performance.mark || !window.performance.measure) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\tperformance.mark(start_mark_label + '_end');\\n\\n\\t\\ttry {\\n\\t\\t\\tperformance.measure(measure_label, start_mark_label, start_mark_label + '_end');\\n\\t\\t\\twindow.TSBeacon(measure_label, performance.getEntriesByName(measure_label)[0].duration);\\n\\t\\t} catch (e) {\\n\\t\\t\\t\\n\\t\\t}\\n\\t};\\n\\n\\t\\n\\tif ('sendBeacon' in navigator) {\\n\\t\\twindow.TSBeacon = function (label, value) {\\n\\t\\t\\tvar endpoint_url = window.ts_endpoint_url || 'https://slack.com/beacon/timing';\\n\\t\\t\\tnavigator.sendBeacon(\\n\\t\\t\\t\\tendpoint_url + '?data=' + encodeURIComponent(label + ':' + value),\\n\\t\\t\\t\\t''\\n\\t\\t\\t);\\n\\t\\t};\\n\\t} else {\\n\\t\\twindow.TSBeacon = function (label, value) {\\n\\t\\t\\tvar endpoint_url = window.ts_endpoint_url || 'https://slack.com/beacon/timing';\\n\\t\\t\\tnew Image().src = endpoint_url + '?data=' + encodeURIComponent(label + ':' + value);\\n\\t\\t};\\n\\t}\\n})();\\n</script><script>window.TSMark('step_load');</script><noscript><meta http-equiv=\\\"refresh\\\" content=\\\"0; URL=/***?nojsmode=1\\\"></noscript><script type=\\\"text/javascript\\\">var safe_hosts = ['app.optimizely.com', 'tinyspeck.dev.slack.com'];\\n\\nif (self !== top && safe_hosts.indexOf(top.location.host) === -1) {\\n\\twindow.document.write(\\n\\t\\t'\\\\u003Cstyle>body * {display:none !important;}\\\\u003C/style>\\\\u003Ca href=\\\"#\\\" onclick=' +\\n\\t\\t\\t'\\\"top.location.href=window.location.href\\\" style=\\\"display:block !important;padding:10px\\\">Go to Slack.com\\\\u003C/a>'\\n\\t);\\n}\\n\\n(function() {\\n\\tvar timer;\\n\\tif (self !== top && safe_hosts.indexOf(top.location.host) === -1) {\\n\\t\\ttimer = window.setInterval(function() {\\n\\t\\t\\tif (window) {\\n\\t\\t\\t\\ttry {\\n\\t\\t\\t\\t\\tvar pageEl = document.getElementById('page');\\n\\t\\t\\t\\t\\tvar clientEl = document.getElementById('client-ui');\\n\\t\\t\\t\\t\\tvar sectionE
2020-03-13 04:06:06 +00:00
}
]
2020-05-18 20:50:09 +00:00
}
] ,
"description" : "Statping contains multiple notifiers that will send you a notification whenever a service become offline, or online. You can create your own 3rd party notifier by reading more on the [Notifiers Wiki](https://github.com/statping/statping/wiki/Notifiers) on the Github repo." ,
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"event" : [
{
"listen" : "prerequest" ,
"script" : {
"id" : "8f3b2e75-ce23-4294-b5bb-05b1248b9ef3" ,
"type" : "text/javascript" ,
"exec" : [
""
]
}
} ,
{
"listen" : "test" ,
"script" : {
"id" : "06653dbc-888b-4016-8964-82d25e0273e3" ,
"type" : "text/javascript" ,
"exec" : [
""
]
}
}
] ,
"protocolProfileBehavior" : { }
} ,
{
"name" : "Messages" ,
"item" : [
{
"name" : "All Messages" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "b2374cab-1ce8-4f9e-a2fa-f92477936cd4" ,
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
"pm.test(\"View All Messages\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.length).to.be.at.least(2);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "noauth"
} ,
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api/messages" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"messages"
]
} ,
"description" : "View an array of all messages inserted into the database."
} ,
"response" : [
{
"name" : "All Messages" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"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]"
}
]
} ,
{
"name" : "Create Message" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "66307d95-1833-4786-a29a-40fc05153d09" ,
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
"pm.test(\"Create Message\", function () {" ,
" var jsonData = pm.response.json();" ,
" 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\");" ,
" pm.globals.set(\"message_id\", object.id);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"value" : "application/json" ,
"type" : "text"
}
] ,
"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"
]
} ,
"description" : "Create a new message show show on index page, or on a service."
} ,
"response" : [
{
"name" : "Create Message" ,
"originalRequest" : {
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"value" : "application/json" ,
"type" : "text"
}
] ,
"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" : "7e17e9cb-6750-411a-8a9a-335ece3b3cda" ,
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
"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" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api/messages/{{message_id}}" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"messages" ,
"{{message_id}}"
]
} ,
"description" : "View a specific message and it's details."
} ,
"response" : [
{
"name" : "View Message" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"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}"
}
]
} ,
{
"name" : "Update Message" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "c89210ce-dfce-4acf-8bf5-f601f53d353e" ,
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
"pm.test(\"Update Message\", function () {" ,
" var jsonData = pm.response.json();" ,
" 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\");" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"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}" ,
"options" : {
"raw" : { }
}
} ,
"url" : {
"raw" : "{{endpoint}}/api/messages/{{message_id}}" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"messages" ,
"{{message_id}}"
]
} ,
"description" : "Update a specific message with new details."
} ,
"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}"
}
]
} ,
{
"name" : "Delete Message" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "61a55ba9-d524-4509-a93f-679b5574182a" ,
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
"pm.test(\"Delete Message\", function () {" ,
" var jsonData = pm.response.json();" ,
" var id = pm.globals.get(\"message_id\");" ,
" pm.expect(jsonData.status).to.eql(\"success\");" ,
" pm.expect(jsonData.method).to.eql(\"delete\");" ,
" pm.expect(jsonData.type).to.eql(\"message\");" ,
" pm.expect(jsonData.id).to.eql(id);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"method" : "DELETE" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
"url" : {
"raw" : "{{endpoint}}/api/messages/{{message_id}}" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"messages" ,
"{{message_id}}"
]
} ,
"description" : "Delete a specific message from the database."
} ,
"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}"
}
]
}
] ,
"description" : "Messages allows you to create an alert for a service for a scheduled downtime, or a simple message letting users know a service might be having internal issues. \n\n\n# Message Fields\n- `title` - **(required)** Group name to contain multiple services\n- `description` - **(required)** More detailed description of message\n- `service` - Service ID to affiliate message, global message if empty\n- `start_on` - Timestamp to make this message visible on frontend\n- `end_on` - Timestamp to remove this message on frontend" ,
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"event" : [
{
"listen" : "prerequest" ,
"script" : {
"id" : "b2160e12-ca83-4454-be33-7eac6f32e16b" ,
"type" : "text/javascript" ,
"exec" : [
""
]
}
} ,
{
"listen" : "test" ,
"script" : {
"id" : "a140fc05-3ec2-40dc-a5c5-93d055242995" ,
"type" : "text/javascript" ,
"exec" : [
""
]
}
}
] ,
"protocolProfileBehavior" : { }
} ,
{
"name" : "Checkins" ,
"item" : [
{
"name" : "View All Checkin's" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "e94a6ff9-bbea-4947-9360-6302a29bdddd" ,
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
"pm.test(\"View All Checkins\", function () {" ,
" var jsonData = pm.response.json();" ,
" var first = jsonData[0];" ,
" var id = pm.globals.get(\"checkin_id\");" ,
" pm.expect(first.name).to.eql(\"Demo Checkin 1\");" ,
" pm.expect(first.grace).to.eql(300);" ,
" pm.expect(first.interval).to.eql(300);" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api/checkins" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"checkins"
]
} ,
"description" : "View an array of all the Checkin's inserted into the system."
} ,
"response" : [
{
"name" : "View All Checkin's" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"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]"
}
]
} ,
{
"name" : "Create Checkin" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "4d656189-d860-43d5-b9b9-d526c6d52338" ,
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
"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" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"value" : "application/json" ,
"type" : "text"
}
] ,
"body" : {
"mode" : "raw" ,
"raw" : "{\n \"service_id\": 2,\n \"name\": \"Server Checkin\",\n \"interval\": 900,\n \"grace\": 60\n}" ,
"options" : {
"raw" : { }
}
} ,
"url" : {
"raw" : "{{endpoint}}/api/checkins" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"checkins"
]
} ,
"description" : "Create a new Checkin."
} ,
"response" : [
{
"name" : "Create Checkin" ,
"originalRequest" : {
"method" : "POST" ,
"header" : [
{
"key" : "Content-Type" ,
"name" : "Content-Type" ,
"value" : "application/json" ,
"type" : "text"
}
] ,
"body" : {
"mode" : "raw" ,
"raw" : "{\n \"service_id\": 2,\n \"name\": \"Server Checkin\",\n \"interval\": 900,\n \"grace\": 60\n}"
} ,
"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" ,
"value" : "Mon, 10 Dec 2018 19:34:10 GMT"
} ,
{
"key" : "Content-Length" ,
"value" : "330"
}
] ,
"cookie" : [ ] ,
"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}"
}
]
} ,
{
"name" : "Run Checkin" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "cb89fcee-0ae4-4496-a159-c214238965ab" ,
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
"pm.test(\"Hit the Checkin API Endpoint\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.status).to.eql(\"success\");" ,
" pm.expect(jsonData.method).to.eql(\"update\");" ,
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/checkin/{{checkin_id}}" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"checkin" ,
"{{checkin_id}}"
]
} ,
"description" : "Initiate the Checkin request to your Statping instance. This request will come from your service and will trigger a failure if your service does not hit this URL in the routine interval set.\n\n- `checkin_id` is the ID for the checkin"
} ,
"response" : [
{
"name" : "Run Checkin" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"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}"
}
]
} ,
{
"name" : "View Checkin" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "25998408-3f55-4d42-ac4f-b6163c1fc0a5" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
2020-05-18 20:50:09 +00:00
"pm.test(\"View Checkin\", function () {" ,
2020-03-13 04:06:06 +00:00
" var jsonData = pm.response.json();" ,
2020-05-18 20:50:09 +00:00
" var id = pm.globals.get(\"checkin_id\");" ,
" 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);" ,
2020-03-13 04:06:06 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"method" : "GET" ,
"header" : [ ] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/checkins/{{checkin_id}}" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
2020-05-18 20:50:09 +00:00
"api" ,
"checkins" ,
2020-04-16 09:57:00 +00:00
"{{checkin_id}}"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "View a specific checkin and it's details."
2020-03-13 04:06:06 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "View Checkin" ,
2020-03-13 04:06:06 +00:00
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/checkin/{{checkin_id}}" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
2020-05-18 20:50:09 +00:00
"api" ,
2020-03-13 04:06:06 +00:00
"checkin" ,
"{{checkin_id}}"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Mon, 10 Dec 2018 19:34:29 GMT"
2020-03-13 04:06:06 +00:00
} ,
{
"key" : "Content-Length" ,
2020-05-18 20:50:09 +00:00
"value" : "338"
2020-03-13 04:06:06 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"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}"
2020-03-13 04:06:06 +00:00
}
]
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Delete Checkin" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "0ddca6d9-b1f9-49db-be8d-75fcab4cab0d" ,
2020-03-13 04:06:06 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
"});" ,
"" ,
2020-05-18 20:50:09 +00:00
"pm.test(\"Delete Checkin\", function () {" ,
2020-03-13 04:06:06 +00:00
" var jsonData = pm.response.json();" ,
" var id = pm.globals.get(\"checkin_id\");" ,
2020-05-18 20:50:09 +00:00
" 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);" ,
2020-03-13 04:06:06 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
2020-05-18 20:50:09 +00:00
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "DELETE" ,
2020-03-13 04:06:06 +00:00
"header" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : {
"mode" : "raw" ,
"raw" : "" ,
"options" : {
"raw" : { }
}
} ,
2020-03-13 04:06:06 +00:00
"url" : {
2020-04-16 09:57:00 +00:00
"raw" : "{{endpoint}}/api/checkins/{{checkin_id}}" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-04-16 09:57:00 +00:00
"checkins" ,
2020-03-13 04:06:06 +00:00
"{{checkin_id}}"
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "Delete a checkin from database and stop failures from service not hitting the checkin URL."
2020-03-13 04:06:06 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "Delete Checkin" ,
2020-03-13 04:06:06 +00:00
"originalRequest" : {
2020-05-18 20:50:09 +00:00
"method" : "DELETE" ,
2020-03-13 04:06:06 +00:00
"header" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : {
"mode" : "raw" ,
"raw" : ""
} ,
2020-03-13 04:06:06 +00:00
"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" ,
2020-05-18 20:50:09 +00:00
"value" : "Mon, 10 Dec 2018 19:34:35 GMT"
2020-03-13 04:06:06 +00:00
} ,
{
"key" : "Content-Length" ,
2020-05-18 20:50:09 +00:00
"value" : "410"
2020-03-13 04:06:06 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"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}"
2020-03-13 04:06:06 +00:00
}
]
2020-05-18 20:50:09 +00:00
}
] ,
"description" : "A Checkin is when a service communicates to your Statping instance rather than Statping attempting to hit your service. Checkin's have a scheduled interval that waits for your service to notify Statping, if your service does not hit the Checkin URL during the interval you set, it will result in a service failing notification." ,
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"event" : [
{
"listen" : "prerequest" ,
"script" : {
"id" : "d880b73c-1edd-40d7-aac5-6ef0d2e2704b" ,
"type" : "text/javascript" ,
"exec" : [
""
]
}
} ,
{
"listen" : "test" ,
"script" : {
"id" : "adf70343-e8f3-4162-8eeb-6fb71784ef57" ,
"type" : "text/javascript" ,
"exec" : [
""
]
}
}
] ,
"protocolProfileBehavior" : { }
} ,
{
"name" : "Theme" ,
"item" : [
{
"name" : "Create Assets" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "11f52299-58b7-4a57-9842-252e2d8e139e" ,
"exec" : [
""
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api/theme/create" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"theme" ,
"create"
]
} ,
"description" : "This endpoint will create the `assets` folder and dump all css, js, and image assets into that folder. If assets have already been created, it will return an error.\n\n```json\n{\n \"error\": \"assets have already been created\"\n}\n```"
} ,
"response" : [ ]
} ,
{
"name" : "Get SASS Files" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "8dace46e-1e0d-4d7c-90f0-c5a29cd2f0c0" ,
"exec" : [
""
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api/theme" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"theme"
]
} ,
"description" : "This endpoint will return the path where the assets are stored, and the raw data for each sass files. \n- base.scss\n- variables.scss\n- mobile.scss"
} ,
"response" : [ ]
} ,
{
"name" : "Update Theme" ,
"event" : [
{
"listen" : "test" ,
"script" : {
"id" : "b18f4b1d-3019-4b96-8203-d1876deab89f" ,
"exec" : [
""
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "POST" ,
"header" : [ ] ,
"body" : {
"mode" : "raw" ,
"raw" : "{\n \"base\": \"\",\n \"variables\": \"\",\n \"mobile\": \"\"\n}" ,
"options" : {
"raw" : {
"language" : "json"
}
}
} ,
"url" : {
"raw" : "{{endpoint}}/api/theme" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
"theme"
]
} ,
"description" : "This endpoint will update the sass files and compile sass into css."
} ,
"response" : [ ]
2020-03-13 04:06:06 +00:00
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Delete Assets" ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "5e59d318-3e11-44be-9d78-85398d35e9be" ,
2020-03-13 04:06:06 +00:00
"exec" : [
2020-05-18 20:50:09 +00:00
""
2020-03-13 04:06:06 +00:00
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
2020-04-16 09:57:00 +00:00
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
2020-03-13 04:06:06 +00:00
"method" : "DELETE" ,
"header" : [ ] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/theme" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"theme"
2020-03-13 04:06:06 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "This endpoint will delete the `assets` folder."
2020-03-13 04:06:06 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "Delete Assets" ,
2020-03-13 04:06:06 +00:00
"originalRequest" : {
"method" : "DELETE" ,
"header" : [ ] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/theme" ,
2020-03-13 04:06:06 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"theme"
2020-03-13 04:06:06 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
2020-05-18 20:50:09 +00:00
{
"key" : "Content-Length" ,
"value" : "79"
} ,
2020-03-13 04:06:06 +00:00
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Sat, 02 May 2020 01:15:10 GMT"
2020-03-13 04:06:06 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : "{\n \"status\": \"success\",\n \"type\": \"string\",\n \"method\": \"deleted\",\n \"output\": \"/app/assets\"\n}"
2020-03-13 04:06:06 +00:00
}
]
}
] ,
2020-05-18 20:50:09 +00:00
"description" : "You can edit the SASS files to create a custom theme for your Statping Instance. For you to use themes, you must have [sass](https://sass-lang.com/) installed on your location system. \n\n> You will need to have `sass` installed and available in your `$PATH`. \n\n## Asset Files\n- `variables.scss` - SASS variables \n- `base.scss` - Main theme for Statping\n- `mobile.scss` - Custom mobile designs using viewports" ,
2020-05-02 02:40:14 +00:00
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
2020-03-13 04:06:06 +00:00
"event" : [
{
"listen" : "prerequest" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "8512f9f2-50af-4c7c-90af-4feb43908ac9" ,
2020-03-13 04:06:06 +00:00
"type" : "text/javascript" ,
"exec" : [
""
]
}
} ,
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "f28d8c39-84fa-4e20-9bd9-e8f8a0158919" ,
2020-03-13 04:06:06 +00:00
"type" : "text/javascript" ,
"exec" : [
""
]
}
}
2020-05-02 02:40:14 +00:00
] ,
"protocolProfileBehavior" : { }
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "oAuth" ,
2020-05-02 02:40:14 +00:00
"item" : [
{
2020-05-18 20:50:09 +00:00
"name" : "Set Keys" ,
2020-05-02 02:40:14 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "3b2cf616-7e7d-4e11-beee-7027e0ed6dd2" ,
2020-05-02 02:40:14 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
2020-05-18 20:50:09 +00:00
"});" ,
"" ,
"pm.test(\"update check\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.status).to.eql(\"success\");" ,
" pm.expect(jsonData.method).to.eql(\"update\");" ,
2020-05-02 02:40:14 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
2020-05-18 20:50:09 +00:00
"method" : "POST" ,
2020-05-02 02:40:14 +00:00
"header" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : {
"mode" : "raw" ,
"raw" : "{\n \"gh_client_id\": \"githubid\",\n \"gh_client_secret\": \"githubsecret\",\n \"google_client_id\": \"googleid\",\n \"google_client_secret\": \"googlesecret\",\n \"oauth_domains\": \"gmail.com,yahoo.com,socialeck.com\",\n \"oauth_providers\": \"local,slack,google,github\",\n \"slack_client_id\": \"936045034737.1044972172659\",\n \"slack_client_secret\": \"05dd514efb382971e538a5561981e54a\",\n \"slack_team\": \"dev\"\n}" ,
"options" : {
"raw" : {
"language" : "json"
}
}
} ,
2020-05-02 02:40:14 +00:00
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/oauth" ,
2020-05-02 02:40:14 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"oauth"
2020-05-02 02:40:14 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "This endpoint will return the last line in the logs."
2020-05-02 02:40:14 +00:00
} ,
2020-05-18 20:50:09 +00:00
"response" : [
{
"name" : "Statping Details" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api"
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Length" ,
"value" : "398"
} ,
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Sat, 02 May 2020 01:06:09 GMT"
}
] ,
"cookie" : [ ] ,
"body" : "{\n \"admin\": false,\n \"allow_reports\": false,\n \"created_at\": \"2020-05-02T01:00:07.885973685Z\",\n \"description\": \"This data is only used to testing\",\n \"domain\": \"http://localhost:8080\",\n \"footer\": null,\n \"logged_in\": false,\n \"migration_id\": 1588381207,\n \"name\": \"Statping Sample Data\",\n \"setup\": true,\n \"started_on\": \"2020-05-02T01:00:14.255837864Z\",\n \"updated_at\": \"2020-05-02T01:00:12.731269305Z\",\n \"using_cdn\": false,\n \"version\": \"0.90.34\"\n}"
}
]
2020-05-02 02:40:14 +00:00
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Get Keys" ,
2020-05-02 02:40:14 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "a3dd164d-56dc-43c9-80ae-ad42ced9542f" ,
2020-05-02 02:40:14 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
" pm.response.to.have.status(200);" ,
2020-05-18 20:50:09 +00:00
"});" ,
"" ,
"" ,
"pm.test(\"correct values\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.gh_client_id).to.eql(\"githubid\");" ,
" pm.expect(jsonData.gh_client_secret).to.eql(\"githubsecret\");" ,
2020-05-02 02:40:14 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
"request" : {
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"method" : "GET" ,
"header" : [ ] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api/oauth" ,
2020-05-02 02:40:14 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api" ,
2020-05-18 20:50:09 +00:00
"oauth"
2020-05-02 02:40:14 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "This endpoint will return the last line in the logs."
2020-05-02 02:40:14 +00:00
} ,
2020-05-18 20:50:09 +00:00
"response" : [
2020-05-02 02:40:14 +00:00
{
2020-05-18 20:50:09 +00:00
"name" : "Statping Details" ,
"originalRequest" : {
"method" : "GET" ,
"header" : [ ] ,
"url" : {
"raw" : "{{endpoint}}/api" ,
"host" : [
"{{endpoint}}"
] ,
"path" : [
"api"
]
2020-05-02 02:40:14 +00:00
}
2020-05-18 20:50:09 +00:00
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Length" ,
"value" : "398"
} ,
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
"value" : "Sat, 02 May 2020 01:06:09 GMT"
2020-05-02 02:40:14 +00:00
}
] ,
2020-05-18 20:50:09 +00:00
"cookie" : [ ] ,
"body" : "{\n \"admin\": false,\n \"allow_reports\": false,\n \"created_at\": \"2020-05-02T01:00:07.885973685Z\",\n \"description\": \"This data is only used to testing\",\n \"domain\": \"http://localhost:8080\",\n \"footer\": null,\n \"logged_in\": false,\n \"migration_id\": 1588381207,\n \"name\": \"Statping Sample Data\",\n \"setup\": true,\n \"started_on\": \"2020-05-02T01:00:14.255837864Z\",\n \"updated_at\": \"2020-05-02T01:00:12.731269305Z\",\n \"using_cdn\": false,\n \"version\": \"0.90.34\"\n}"
}
]
2020-05-02 02:40:14 +00:00
} ,
{
2020-05-18 20:50:09 +00:00
"name" : "Authenticate token" ,
2020-05-02 02:40:14 +00:00
"event" : [
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "2d5f11de-4041-4667-b094-4e1934195649" ,
2020-05-02 02:40:14 +00:00
"exec" : [
"pm.test(\"Response is ok\", function () {" ,
2020-05-18 20:50:09 +00:00
" pm.response.to.have.status(500);" ,
"});" ,
"" ,
"pm.test(\"missing values\", function () {" ,
" var jsonData = pm.response.json();" ,
" pm.expect(jsonData.error).to.eql(\"oauth2: server response missing access_token\");" ,
2020-05-02 02:40:14 +00:00
"});"
] ,
"type" : "text/javascript"
}
}
] ,
2020-05-18 20:50:09 +00:00
"protocolProfileBehavior" : {
"disableBodyPruning" : true
} ,
2020-05-02 02:40:14 +00:00
"request" : {
"auth" : {
2020-05-18 20:50:09 +00:00
"type" : "noauth"
} ,
"method" : "GET" ,
"header" : [ ] ,
"body" : {
"mode" : "formdata" ,
"formdata" : [
2020-05-02 02:40:14 +00:00
{
2020-05-18 20:50:09 +00:00
"key" : "code" ,
"value" : "936045034737.1125195726608.7440bec1a519b713bd3c39c4aaed46f5a4891878c1616d1a6ac2be3bc0cc9867" ,
"type" : "text"
} ,
{
"key" : "state" ,
"value" : "0" ,
"type" : "text"
2020-05-02 02:40:14 +00:00
}
]
} ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/oauth/slack" ,
2020-05-02 02:40:14 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
2020-05-18 20:50:09 +00:00
"oauth" ,
"slack"
2020-05-02 02:40:14 +00:00
]
} ,
2020-05-18 20:50:09 +00:00
"description" : "This endpoint will return the last line in the logs."
2020-05-02 02:40:14 +00:00
} ,
"response" : [
{
2020-05-18 20:50:09 +00:00
"name" : "Statping Details" ,
2020-05-02 02:40:14 +00:00
"originalRequest" : {
2020-05-18 20:50:09 +00:00
"method" : "GET" ,
2020-05-02 02:40:14 +00:00
"header" : [ ] ,
"url" : {
2020-05-18 20:50:09 +00:00
"raw" : "{{endpoint}}/api" ,
2020-05-02 02:40:14 +00:00
"host" : [
"{{endpoint}}"
] ,
"path" : [
2020-05-18 20:50:09 +00:00
"api"
2020-05-02 02:40:14 +00:00
]
}
} ,
"status" : "OK" ,
"code" : 200 ,
"_postman_previewlanguage" : "json" ,
"header" : [
{
"key" : "Content-Length" ,
2020-05-18 20:50:09 +00:00
"value" : "398"
2020-05-02 02:40:14 +00:00
} ,
{
"key" : "Content-Type" ,
"value" : "application/json"
} ,
{
"key" : "Date" ,
2020-05-18 20:50:09 +00:00
"value" : "Sat, 02 May 2020 01:06:09 GMT"
2020-05-02 02:40:14 +00:00
}
] ,
"cookie" : [ ] ,
2020-05-18 20:50:09 +00:00
"body" : "{\n \"admin\": false,\n \"allow_reports\": false,\n \"created_at\": \"2020-05-02T01:00:07.885973685Z\",\n \"description\": \"This data is only used to testing\",\n \"domain\": \"http://localhost:8080\",\n \"footer\": null,\n \"logged_in\": false,\n \"migration_id\": 1588381207,\n \"name\": \"Statping Sample Data\",\n \"setup\": true,\n \"started_on\": \"2020-05-02T01:00:14.255837864Z\",\n \"updated_at\": \"2020-05-02T01:00:12.731269305Z\",\n \"using_cdn\": false,\n \"version\": \"0.90.34\"\n}"
2020-05-02 02:40:14 +00:00
}
]
}
] ,
2020-05-18 20:50:09 +00:00
"description" : "You can allow other users to login through other services by using OAuth.\n\n- [Google OAuth](https://developers.google.com/identity/protocols/oauth2)\n- [Slack OAuth](https://api.slack.com/legacy/oauth)\n- [Github OAuth](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/)\n\n### Redirect URL\nEach OAuth service has a dedicated redirect URL: `/oauth/{provider}`. Replace `{provider}` with google, slack, or github depending on which service you're using." ,
2020-05-02 02:40:14 +00:00
"event" : [
{
"listen" : "prerequest" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "2792fd81-5e3a-434b-8f51-992bea3a2b49" ,
2020-05-02 02:40:14 +00:00
"type" : "text/javascript" ,
"exec" : [
""
]
}
} ,
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "467bdaac-344d-451e-a4b4-825aec80ceef" ,
2020-05-02 02:40:14 +00:00
"type" : "text/javascript" ,
"exec" : [
""
]
}
}
] ,
"protocolProfileBehavior" : { }
}
] ,
"auth" : {
"type" : "bearer" ,
"bearer" : [
{
"key" : "token" ,
"value" : "{{api_key}}" ,
"type" : "string"
}
]
} ,
"event" : [
{
"listen" : "prerequest" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "a88caffc-d042-4f68-9757-3b5b3e628737" ,
2020-05-02 02:40:14 +00:00
"type" : "text/javascript" ,
"exec" : [
""
]
}
} ,
{
"listen" : "test" ,
"script" : {
2020-05-18 20:50:09 +00:00
"id" : "dc71e455-8623-429d-890b-0cfc3bb9f8d1" ,
2020-05-02 02:40:14 +00:00
"type" : "text/javascript" ,
"exec" : [
""
]
}
2020-03-13 04:06:06 +00:00
}
2020-05-18 20:50:09 +00:00
] ,
"protocolProfileBehavior" : { }
2020-05-02 02:40:14 +00:00
}