{"info":{"_postman_id":"0f1ca1f3-f35d-4524-ad42-6d934732091e","name":"Potres2020 Middleware APIs","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"130981","collectionId":"0f1ca1f3-f35d-4524-ad42-6d934732091e","publishedId":"TW6wK9GV","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-01-28T02:11:08.000Z"},"item":[{"name":"/api/potres2020/utils/checkSha256","id":"f930ac1d-4f45-49a8-94e2-de27404f6c9f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n        \"payload\": \"{\\\"id\\\":915,\\\"parent_id\\\":null,\\\"form_id\\\":5,\\\"user_id\\\":null,\\\"message_id\\\":null,\\\"color\\\":\\\"5BAA00\\\",\\\"type\\\":\\\"report\\\",\\\"title\\\":\\\"Test taska\\\",\\\"slug\\\":\\\"test-taska-6002822d42f5b\\\",\\\"content\\\":\\\"Test taska v5\\\",\\\"author_email\\\":null,\\\"author_realname\\\":null,\\\"status\\\":\\\"published\\\",\\\"created\\\":1610777133,\\\"updated\\\":1610991434,\\\"locale\\\":\\\"en_us\\\",\\\"values\\\":{\\\"9219c2a8-f90b-48f0-b506-4bf81c6f185e\\\":[\\\"Zaklju\\\\u010dak v2\\\"],\\\"1328cf24-09de-44cd-b159-6242e6165530\\\":[\\\"Kon\\\"],\\\"6ecf7d8c-b455-454f-bff0-dd2b18a50675\\\":[\\\"12\\\"]},\\\"post_date\\\":{\\\"date\\\":\\\"2021-01-16 06:02:21.000000\\\",\\\"timezone_type\\\":3,\\\"timezone\\\":\\\"UTC\\\"},\\\"tags\\\":[\\\"12\\\"],\\\"published_to\\\":[],\\\"completed_stages\\\":[25],\\\"sets\\\":[\\\"2\\\",\\\"4\\\"],\\\"lock\\\":null,\\\"source\\\":null,\\\"contact_id\\\":null,\\\"data_source_message_id\\\":null,\\\"webhook_uuid\\\":\\\"565a564a-3f2d-42bb-8542-1b49f3235e31\\\",\\\"source_field_key\\\":null,\\\"destination_field_key\\\":null}\",\n        \"sha256Request\": \"QvFjrEeoPsoYcjslZLvbgozDbbi8jimTXVQASy4jJ9Y=\",\n        \"webhookUrl\": \"https://hook.integromat.com/vnoyua39jr8s6qqnjl3ai6kkbqf76e72\"\n}\n"},"url":"{{MIDDLEWARE_API_URL}}/api/potres2020/utils/checkSha256","description":"<p>More info here: <a href=\"https://github.com/potres2020/middleware-api#potres2020-checksha256\">https://github.com/potres2020/middleware-api#potres2020-checksha256</a></p>\n","urlObject":{"path":["api","potres2020","utils","checkSha256"],"host":["{{MIDDLEWARE_API_URL}}"],"query":[],"variable":[]}},"response":[{"id":"305afc5e-ef1f-4260-b3cc-0cb845bbb2f0","name":"/api/potres2020/utils/checkSha256 - webhook not defined","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n        \"sha256_request\": \"QvFjrEeoPsoYcjslZLvbgozDbbi8jimTXVQASy4jJ9Y=\",\n        \"webhook_url\": \"https://hook.integromat.com/vnoyua39jr8s6qqnjl3ai6kkbqf76e72\",\n        \"payload\": \"{\\\"id\\\":915,\\\"parent_id\\\":null,\\\"form_id\\\":5,\\\"user_id\\\":null,\\\"message_id\\\":null,\\\"color\\\":\\\"5BAA00\\\",\\\"type\\\":\\\"report\\\",\\\"title\\\":\\\"Test taska\\\",\\\"slug\\\":\\\"test-taska-6002822d42f5b\\\",\\\"content\\\":\\\"Test taska v5\\\",\\\"author_email\\\":null,\\\"author_realname\\\":null,\\\"status\\\":\\\"published\\\",\\\"created\\\":1610777133,\\\"updated\\\":1610991434,\\\"locale\\\":\\\"en_us\\\",\\\"values\\\":{\\\"9219c2a8-f90b-48f0-b506-4bf81c6f185e\\\":[\\\"Zaklju\\\\u010dak v2\\\"],\\\"1328cf24-09de-44cd-b159-6242e6165530\\\":[\\\"Kon\\\"],\\\"6ecf7d8c-b455-454f-bff0-dd2b18a50675\\\":[\\\"12\\\"]},\\\"post_date\\\":{\\\"date\\\":\\\"2021-01-16 06:02:21.000000\\\",\\\"timezone_type\\\":3,\\\"timezone\\\":\\\"UTC\\\"},\\\"tags\\\":[\\\"12\\\"],\\\"published_to\\\":[],\\\"completed_stages\\\":[25],\\\"sets\\\":[\\\"2\\\",\\\"4\\\"],\\\"lock\\\":null,\\\"source\\\":null,\\\"contact_id\\\":null,\\\"data_source_message_id\\\":null,\\\"webhook_uuid\\\":\\\"565a564a-3f2d-42bb-8542-1b49f3235e31\\\",\\\"source_field_key\\\":null,\\\"destination_field_key\\\":null}\"\n        \n    \n}\n"},"url":"https://middleware-api.potres2020.repl.co/api/potres2020/utils/checkSha256"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Length","value":"118"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 26 Jan 2021 18:31:14 GMT"},{"key":"Etag","value":"W/\"76-S6M5aWWI3uPQ1AZrfzyeRAhFI1k\""},{"key":"Expect-Ct","value":"max-age=2592000, report-uri=\"https://sentry.repl.it/api/10/security/?sentry_key=615192fd532445bfbbbe966cd7131791\""},{"key":"X-Powered-By","value":"Express"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"No shared_secret defined for for webhook url: https://hook.integromat.com/vnoyua39jr8s6qqnjl3ai6kkbqf76e72\"\n}"},{"id":"3ecab770-6841-488b-87a5-f79a2b44077c","name":"/api/potres2020/utils/checkSha256 - missing parameter","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n        \n        \"webhook_url\": \"https://hook.integromat.com/vnoyua39jr8s6qqnjl3ai6kkbqf76e72\",\n        \"payload\": \"{\\\"id\\\":915,\\\"parent_id\\\":null,\\\"form_id\\\":5,\\\"user_id\\\":null,\\\"message_id\\\":null,\\\"color\\\":\\\"5BAA00\\\",\\\"type\\\":\\\"report\\\",\\\"title\\\":\\\"Test taska\\\",\\\"slug\\\":\\\"test-taska-6002822d42f5b\\\",\\\"content\\\":\\\"Test taska v5\\\",\\\"author_email\\\":null,\\\"author_realname\\\":null,\\\"status\\\":\\\"published\\\",\\\"created\\\":1610777133,\\\"updated\\\":1610991434,\\\"locale\\\":\\\"en_us\\\",\\\"values\\\":{\\\"9219c2a8-f90b-48f0-b506-4bf81c6f185e\\\":[\\\"Zaklju\\\\u010dak v2\\\"],\\\"1328cf24-09de-44cd-b159-6242e6165530\\\":[\\\"Kon\\\"],\\\"6ecf7d8c-b455-454f-bff0-dd2b18a50675\\\":[\\\"12\\\"]},\\\"post_date\\\":{\\\"date\\\":\\\"2021-01-16 06:02:21.000000\\\",\\\"timezone_type\\\":3,\\\"timezone\\\":\\\"UTC\\\"},\\\"tags\\\":[\\\"12\\\"],\\\"published_to\\\":[],\\\"completed_stages\\\":[25],\\\"sets\\\":[\\\"2\\\",\\\"4\\\"],\\\"lock\\\":null,\\\"source\\\":null,\\\"contact_id\\\":null,\\\"data_source_message_id\\\":null,\\\"webhook_uuid\\\":\\\"565a564a-3f2d-42bb-8542-1b49f3235e31\\\",\\\"source_field_key\\\":null,\\\"destination_field_key\\\":null}\"\n        \n    \n}\n"},"url":"https://middleware-api.potres2020.repl.co/api/potres2020/utils/checkSha256"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Length","value":"47"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 26 Jan 2021 18:29:56 GMT"},{"key":"Etag","value":"W/\"2f-7SxBDHAQPN9fcpGXukoEKtCbX4o\""},{"key":"Expect-Ct","value":"max-age=2592000, report-uri=\"https://sentry.repl.it/api/10/security/?sentry_key=615192fd532445bfbbbe966cd7131791\""},{"key":"X-Powered-By","value":"Express"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Missing 'sha256_request' parameter!\"\n}"},{"id":"a53c14df-eba1-4a88-a668-63fbdcbe7b9d","name":"/api/potres2020/utils/checkSha256 - empty parameter","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n        \"sha256_request\": \"\",\n        \"webhook_url\": \"https://hook.integromat.com/vnoyua39jr8s6qqnjl3ai6kkbqf76e72\",\n        \"payload\": \"{\\\"id\\\":915,\\\"parent_id\\\":null,\\\"form_id\\\":5,\\\"user_id\\\":null,\\\"message_id\\\":null,\\\"color\\\":\\\"5BAA00\\\",\\\"type\\\":\\\"report\\\",\\\"title\\\":\\\"Test taska\\\",\\\"slug\\\":\\\"test-taska-6002822d42f5b\\\",\\\"content\\\":\\\"Test taska v5\\\",\\\"author_email\\\":null,\\\"author_realname\\\":null,\\\"status\\\":\\\"published\\\",\\\"created\\\":1610777133,\\\"updated\\\":1610991434,\\\"locale\\\":\\\"en_us\\\",\\\"values\\\":{\\\"9219c2a8-f90b-48f0-b506-4bf81c6f185e\\\":[\\\"Zaklju\\\\u010dak v2\\\"],\\\"1328cf24-09de-44cd-b159-6242e6165530\\\":[\\\"Kon\\\"],\\\"6ecf7d8c-b455-454f-bff0-dd2b18a50675\\\":[\\\"12\\\"]},\\\"post_date\\\":{\\\"date\\\":\\\"2021-01-16 06:02:21.000000\\\",\\\"timezone_type\\\":3,\\\"timezone\\\":\\\"UTC\\\"},\\\"tags\\\":[\\\"12\\\"],\\\"published_to\\\":[],\\\"completed_stages\\\":[25],\\\"sets\\\":[\\\"2\\\",\\\"4\\\"],\\\"lock\\\":null,\\\"source\\\":null,\\\"contact_id\\\":null,\\\"data_source_message_id\\\":null,\\\"webhook_uuid\\\":\\\"565a564a-3f2d-42bb-8542-1b49f3235e31\\\",\\\"source_field_key\\\":null,\\\"destination_field_key\\\":null}\"\n        \n    \n}\n"},"url":"https://middleware-api.potres2020.repl.co/api/potres2020/utils/checkSha256"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Length","value":"47"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 26 Jan 2021 18:30:23 GMT"},{"key":"Etag","value":"W/\"2f-9Z3fYK8blI1gS0HDMHXPqZPgK9U\""},{"key":"Expect-Ct","value":"max-age=2592000, report-uri=\"https://sentry.repl.it/api/10/security/?sentry_key=615192fd532445bfbbbe966cd7131791\""},{"key":"X-Powered-By","value":"Express"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\":\"'sha256_request' must not be empty!\"\n}"},{"id":"f8e173b3-f947-469d-8baf-77e29686d1eb","name":"/api/potres2020/utils/checkSha256","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n        \"sha256_request\": \"QvFjrEeoPsoYcjslZLvbgozDbbi8jimTXVQASy4jJ9Y=\",\n        \"webhook_url\": \"https://hook.integromat.com/vnoyua39jr8s6qqnjl3ai6kkbqf76e72\",\n        \"payload\": \"{\\\"id\\\":915,\\\"parent_id\\\":null,\\\"form_id\\\":5,\\\"user_id\\\":null,\\\"message_id\\\":null,\\\"color\\\":\\\"5BAA00\\\",\\\"type\\\":\\\"report\\\",\\\"title\\\":\\\"Test taska\\\",\\\"slug\\\":\\\"test-taska-6002822d42f5b\\\",\\\"content\\\":\\\"Test taska v5\\\",\\\"author_email\\\":null,\\\"author_realname\\\":null,\\\"status\\\":\\\"published\\\",\\\"created\\\":1610777133,\\\"updated\\\":1610991434,\\\"locale\\\":\\\"en_us\\\",\\\"values\\\":{\\\"9219c2a8-f90b-48f0-b506-4bf81c6f185e\\\":[\\\"Zaklju\\\\u010dak v2\\\"],\\\"1328cf24-09de-44cd-b159-6242e6165530\\\":[\\\"Kon\\\"],\\\"6ecf7d8c-b455-454f-bff0-dd2b18a50675\\\":[\\\"12\\\"]},\\\"post_date\\\":{\\\"date\\\":\\\"2021-01-16 06:02:21.000000\\\",\\\"timezone_type\\\":3,\\\"timezone\\\":\\\"UTC\\\"},\\\"tags\\\":[\\\"12\\\"],\\\"published_to\\\":[],\\\"completed_stages\\\":[25],\\\"sets\\\":[\\\"2\\\",\\\"4\\\"],\\\"lock\\\":null,\\\"source\\\":null,\\\"contact_id\\\":null,\\\"data_source_message_id\\\":null,\\\"webhook_uuid\\\":\\\"565a564a-3f2d-42bb-8542-1b49f3235e31\\\",\\\"source_field_key\\\":null,\\\"destination_field_key\\\":null}\"\n        \n    \n}\n"},"url":"https://middleware-api.potres2020.repl.co/api/potres2020/utils/checkSha256"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Length","value":"14"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 26 Jan 2021 18:29:20 GMT"},{"key":"Etag","value":"W/\"e-3MDSGou3nIOvlBZElUyTiBbaRZY\""},{"key":"Expect-Ct","value":"max-age=2592000, report-uri=\"https://sentry.repl.it/api/10/security/?sentry_key=615192fd532445bfbbbe966cd7131791\""},{"key":"X-Powered-By","value":"Express"}],"cookie":[],"responseTime":null,"body":"{\n    \"valid\": true\n}"}],"_postman_id":"f930ac1d-4f45-49a8-94e2-de27404f6c9f"},{"name":"/api/potres2020/webhooks","id":"cff7c2dc-f16f-4171-8946-7b611fd3bbe6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiRGF2b3IgUG9sZHJ1Z28ifQ.GQQLbT5AUowrdiaYlVB_8HMhSWT1utp5vEb4Ggdsh40","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"url\": \"https://hook.integromat.com/vnoyua39jr8s6qqnjl3ai6kkbqf76e72\",\n    \"sharedSecret\": \"adffn343lkjfldsjfl34532554sgmgfxmgffmgfd\"\n}\n","options":{"raw":{"language":"json"}}},"url":"{{MIDDLEWARE_API_URL}}/api/potres2020/webhooks","urlObject":{"path":["api","potres2020","webhooks"],"host":["{{MIDDLEWARE_API_URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"cff7c2dc-f16f-4171-8946-7b611fd3bbe6"},{"name":"/api/sync/changes/:sourceIdentifier","id":"2f24c57a-940f-429d-af09-8aee0dcef577","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"url\": \"https://potres2020.openit.hr/api/v3/posts/1058\"\n}"},"url":"{{MIDDLEWARE_API_URL}}/api/sync/changes/:sourceIdentifier","description":"<p>More info here: <a href=\"https://github.com/potres2020/middleware-api#potres2020-checksha256\">https://github.com/potres2020/middleware-api#potres2020-checksha256</a></p>\n","urlObject":{"path":["api","sync","changes",":sourceIdentifier"],"host":["{{MIDDLEWARE_API_URL}}"],"query":[],"variable":[{"type":"any","value":"potres2020","key":"sourceIdentifier"}]}},"response":[],"_postman_id":"2f24c57a-940f-429d-af09-8aee0dcef577"},{"name":"GET /backends","id":"912c1bdc-f538-4c7e-a02f-e655bf5a552b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://api.keyvalue.xyz/4302a105/potres-middleware-api","urlObject":{"protocol":"https","path":["4302a105","potres-middleware-api"],"host":["api","keyvalue","xyz"],"query":[],"variable":[]}},"response":[],"_postman_id":"912c1bdc-f538-4c7e-a02f-e655bf5a552b"},{"name":"POST /backends","id":"f5a89fe2-3eac-4728-82c3-5457c89e4397","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"backends\": [\n        \"https://middleware-api-test-1.herokuapp.com\",\n        \"https://middleware-api-test-2.herokuapp.com\"\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://api.keyvalue.xyz/4302a105/potres-middleware-api","urlObject":{"protocol":"https","path":["4302a105","potres-middleware-api"],"host":["api","keyvalue","xyz"],"query":[],"variable":[]}},"response":[],"_postman_id":"f5a89fe2-3eac-4728-82c3-5457c89e4397"},{"name":"POST /backends  - test-1","id":"34216fb3-2208-4a74-8528-ed8a52148601","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"backends\": [\n        \"https://middleware-api-test-1.herokuapp.com\"\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://api.keyvalue.xyz/4302a105/potres-middleware-api","urlObject":{"protocol":"https","path":["4302a105","potres-middleware-api"],"host":["api","keyvalue","xyz"],"query":[],"variable":[]}},"response":[],"_postman_id":"34216fb3-2208-4a74-8528-ed8a52148601"},{"name":"POST /backends  - test-2","id":"f2ff5a4a-fa28-44df-bbaa-18455f2e188f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"backends\": [\n        \"https://middleware-api-test-2.herokuapp.com\"\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://api.keyvalue.xyz/4302a105/potres-middleware-api","urlObject":{"protocol":"https","path":["4302a105","potres-middleware-api"],"host":["api","keyvalue","xyz"],"query":[],"variable":[]}},"response":[],"_postman_id":"f2ff5a4a-fa28-44df-bbaa-18455f2e188f"}],"variable":[{"key":"REPL_BASE_URL","value":"https://middleware-api.potres2020.repl.co"}]}