{
	"info": {
		"_postman_id": "a1897b06-07df-4440-bcbf-8d2b4fd76594",
		"name": "Vidyard Analytics Webhooks",
		"description": "API Requests to do CRUD operations on Vidyard Analytics Webhooks",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Create Analytics Webhook Subscription",
			"request": {
				"auth": {
					"type": "bearer",
					"bearer": [
						{
							"key": "token",
							"value": "{{AUTH_TOKEN}}",
							"type": "string"
						}
					]
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "",
						"value": "",
						"type": "text",
						"disabled": true
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"url\": \"{{WEBHOOK_URL}}\",\n    \"security_key\": \"testkey\",\n    \"event_subscriptions\": [\n        \"view\",\n        \"attention_span\"\n    ]\n}"
				},
				"url": {
					"raw": "https://{{ANALYTICS_API_HOST}}/v1/integrations/webhooks",
					"protocol": "https",
					"host": [
						"{{ANALYTICS_API_HOST}}"
					],
					"path": [
						"v1",
						"integrations",
						"webhooks"
					]
				}
			},
			"response": []
		},
		{
			"name": "Get Analytics Webhook Subscriptions",
			"request": {
				"auth": {
					"type": "bearer",
					"bearer": [
						{
							"key": "token",
							"value": "{{AUTH_TOKEN}}",
							"type": "string"
						}
					]
				},
				"method": "GET",
				"header": [
					{
						"warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.",
						"key": "Authorization",
						"value": "",
						"type": "text",
						"disabled": true
					},
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"url": {
					"raw": "https://{{ANALYTICS_API_HOST}}/v1/integrations/webhooks",
					"protocol": "https",
					"host": [
						"{{ANALYTICS_API_HOST}}"
					],
					"path": [
						"v1",
						"integrations",
						"webhooks"
					]
				}
			},
			"response": []
		},
		{
			"name": "Update Analytics Webhook Subscription",
			"request": {
				"auth": {
					"type": "bearer",
					"bearer": [
						{
							"key": "token",
							"value": "{{AUTH_TOKEN}}",
							"type": "string"
						}
					]
				},
				"method": "PUT",
				"header": [
					{
						"key": "Content-Type",
						"name": "Content-Type",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n\"url\": \"{{WEBHOOK_URL}}\",\n\"security_key\": \"testkey\", \n\"event_subscriptions\": [\"view\"]\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "https://{{ANALYTICS_API_HOST}}/v1/integrations/webhooks/{{WEBHOOK_ID}}",
					"protocol": "https",
					"host": [
						"{{ANALYTICS_API_HOST}}"
					],
					"path": [
						"v1",
						"integrations",
						"webhooks",
						"{{WEBHOOK_ID}}"
					]
				}
			},
			"response": []
		},
		{
			"name": "Delete Analytics Webhook Subscription",
			"request": {
				"auth": {
					"type": "bearer",
					"bearer": [
						{
							"key": "token",
							"value": "{{AUTH_TOKEN}}",
							"type": "string"
						}
					]
				},
				"method": "DELETE",
				"header": [
					{
						"key": "Content-Type",
						"name": "Content-Type",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "https://{{ANALYTICS_API_HOST}}/v1/integrations/webhooks/{{WEBHOOK_ID}}",
					"protocol": "https",
					"host": [
						"{{ANALYTICS_API_HOST}}"
					],
					"path": [
						"v1",
						"integrations",
						"webhooks",
						"{{WEBHOOK_ID}}"
					]
				}
			},
			"response": []
		}
	],
	"auth": {
		"type": "bearer",
		"bearer": [
			{
				"key": "token",
				"value": "{{AUTH_TOKEN}}",
				"type": "string"
			}
		]
	},
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"id": "76bc0f62-12e8-4912-81bf-bb9ed240afe5",
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"id": "e5d1633e-ecaf-41fc-8595-5eafea731bdf",
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"id": "71e3ab26-4cae-4323-9e05-280597dd2034",
			"key": "ANALYTICS_API_HOST",
			"value": "analytics-api.vidyard.com",
			"type": "string"
		},
		{
			"id": "a3706c65-d2bd-4a51-b79a-bf96ac7890db",
			"key": "AUTH_TOKEN",
			"value": "test-token",
			"type": "string"
		},
		{
			"id": "cca01221-e537-4b96-b7e9-84eb150811f1",
			"key": "WEBHOOK_ID",
			"value": "123",
			"type": "string"
		},
		{
			"id": "252093d0-a387-43e1-8fc7-64ce14f322ca",
			"key": "WEBHOOK_URL",
			"value": "https://example-webhook.com",
			"type": "string"
		}
	],
	"protocolProfileBehavior": {}
}