{ "schemes": [ "https" ], "swagger": "2.0", "info": { "description": "Convoy is a fast and secure webhooks proxy. This document contains datastore.s API specification.", "title": "Convoy API Reference", "termsOfService": "https://getconvoy.io/terms", "contact": { "name": "Convoy Support", "url": "https://getconvoy.io/docs", "email": "support@getconvoy.io" }, "license": { "name": "Mozilla Public License 2.0", "url": "https://www.mozilla.org/en-US/MPL/2.0/" }, "version": "0.9.0" }, "host": "dashboard.getconvoy.io", "basePath": "/", "paths": { "/v1/projects": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches projects", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Projects" ], "summary": "List all projects", "parameters": [ { "type": "string", "description": "Project name", "name": "name", "in": "query" }, { "type": "string", "description": "organisation id", "name": "orgID", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/datastore.Project" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint creates a project", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Projects" ], "summary": "Create a project", "parameters": [ { "type": "string", "description": "Organisation id", "name": "orgID", "in": "query", "required": true }, { "description": "Project Details", "name": "project", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.Project" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/datastore.Project" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches a project by its id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Projects" ], "summary": "Retrieve a project", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/datastore.Project" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint updates a project", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Projects" ], "summary": "Update a project", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Project Details", "name": "project", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.Project" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/datastore.Project" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint deletes a project using its id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Projects" ], "summary": "Delete a project", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/endpoints": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches an endpoints", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Endpoints" ], "summary": "List all endpoints", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/datastore.Endpoint" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint creates an endpoint", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Endpoints" ], "summary": "Create an endpoint", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Endpoint Details", "name": "endpoint", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.Endpoint" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/datastore.Endpoint" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/endpoints/{endpointID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches an endpoint", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Endpoints" ], "summary": "Retrieve endpoint", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Endpoint ID", "name": "endpointID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/datastore.Endpoint" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint updates an endpoint", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Endpoints" ], "summary": "Update an endpoint", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Endpoint ID", "name": "endpointID", "in": "path", "required": true }, { "description": "Endpoint Details", "name": "endpoint", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.Endpoint" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/datastore.Endpoint" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint deletes an endpoint", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Endpoints" ], "summary": "Delete endpoint", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Endpoint ID", "name": "endpointID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/endpoints/{endpointID}/expire_secret": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint expires and re-generates the endpoint secret.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Endpoints" ], "summary": "Roll endpoint secret", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Endpoint ID", "name": "endpointID", "in": "path", "required": true }, { "description": "Expire Secret Body Parameters", "name": "endpoint", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.ExpireSecret" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/datastore.Endpoint" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/endpoints/{endpointID}/pause": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint toggles an endpoint status between the active and paused states", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Endpoints" ], "summary": "Pause endpoint", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Endpoint ID", "name": "endpointID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/datastore.Endpoint" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/endpoints/{endpointID}/toggle_status": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint toggles an endpoint status between the active and inactive statetes", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Endpoints" ], "summary": "Toggle endpoint status", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Endpoint ID", "name": "endpointID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/datastore.Endpoint" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/eventdeliveries": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retrieves all event deliveries paginated.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event Deliveries" ], "summary": "List all event deliveries", "parameters": [ { "type": "string", "description": "application id", "name": "appId", "in": "query" }, { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "event id", "name": "eventId", "in": "query" }, { "type": "string", "description": "start date", "name": "startDate", "in": "query" }, { "type": "string", "description": "end date", "name": "endDate", "in": "query" }, { "type": "string", "description": "results per page", "name": "perPage", "in": "query" }, { "type": "string", "description": "page number", "name": "page", "in": "query" }, { "type": "string", "description": "sort order", "name": "sort", "in": "query" }, { "type": "array", "items": { "type": "string" }, "description": "status", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/public.pagedResponse" }, { "type": "object", "properties": { "content": { "type": "array", "items": { "allOf": [ { "$ref": "#/definitions/datastore.EventDelivery" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/eventdeliveries/batchretry": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint batch retries multiple event deliveries at once.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event Deliveries" ], "summary": "Batch retry event delivery", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "event delivery ids", "name": "deliveryIds", "in": "body", "required": true, "schema": { "allOf": [ { "$ref": "#/definitions/public.Stub" }, { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "string" } } } } ] } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/eventdeliveries/forceresend": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint enables you retry a previously successful event delivery", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event Deliveries" ], "summary": "Force retry event delivery", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "event delivery ids", "name": "deliveryIds", "in": "body", "required": true, "schema": { "allOf": [ { "$ref": "#/definitions/public.Stub" }, { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "string" } } } } ] } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/eventdeliveries/{eventDeliveryID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches an event delivery.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event Deliveries" ], "summary": "Retrieve an event delivery", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "event delivery id", "name": "eventDeliveryID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/datastore.Event" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/eventdeliveries/{eventDeliveryID}/deliveryattempts": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches an app message's delivery attempts", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Delivery Attempts" ], "summary": "List delivery attempts", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "event delivery id", "name": "eventDeliveryID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/datastore.DeliveryAttempt" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/eventdeliveries/{eventDeliveryID}/deliveryattempts/{deliveryAttemptID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches an app event delivery attempt", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Delivery Attempts" ], "summary": "Retrieve a delivery attempt", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "event delivery id", "name": "eventDeliveryID", "in": "path", "required": true }, { "type": "string", "description": "delivery attempt id", "name": "deliveryAttemptID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/datastore.DeliveryAttempt" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/eventdeliveries/{eventDeliveryID}/resend": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retries an event delivery.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event Deliveries" ], "summary": "Retry event delivery", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "event delivery id", "name": "eventDeliveryID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/datastore.Event" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/events": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches app events with pagination", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Events" ], "summary": "List all events", "parameters": [ { "type": "string", "description": "application id", "name": "appId", "in": "query" }, { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "source id", "name": "sourceId", "in": "query" }, { "type": "string", "description": "start date", "name": "startDate", "in": "query" }, { "type": "string", "description": "end date", "name": "endDate", "in": "query" }, { "type": "string", "description": "results per page", "name": "perPage", "in": "query" }, { "type": "string", "description": "page number", "name": "page", "in": "query" }, { "type": "string", "description": "sort order", "name": "sort", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/public.pagedResponse" }, { "type": "object", "properties": { "content": { "type": "array", "items": { "allOf": [ { "$ref": "#/definitions/datastore.Event" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint creates an endpoint event", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Events" ], "summary": "Create an event", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Event Details", "name": "event", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.Event" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/datastore.Event" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/events/batchreplay": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint replays multiple events at once.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Events" ], "summary": "Batch replay events", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "start date", "name": "startDate", "in": "query" }, { "type": "string", "description": "end date", "name": "endDate", "in": "query" }, { "type": "string", "description": "Source ID", "name": "source", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/datastore.Event" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/events/dynamic": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint Creates an event with supplied endpoint and subscription", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Events" ], "summary": "Creates an event with supplied endpoint and subscription", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Event Details", "name": "event", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.DynamicEvent" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/public.Stub" } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/events/fanout": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint uses the owner_id to fan out an event to multiple endpoints.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Events" ], "summary": "Fan out an event", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Event Details", "name": "event", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.FanoutEvent" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/datastore.Event" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/events/{eventID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retrieves an event", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Events" ], "summary": "Retrieve an event", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "event id", "name": "eventID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/datastore.Event" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/events/{eventID}/replay": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint replays an event afresh assuming it is a new event.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Events" ], "summary": "Replay event", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "event id", "name": "eventID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/datastore.Event" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/meta-events": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches meta events with pagination", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "MetaEvents" ], "summary": "List all meta events", "parameters": [ { "type": "string", "description": "start date", "name": "startDate", "in": "query" }, { "type": "string", "description": "end date", "name": "endDate", "in": "query" }, { "type": "string", "description": "results per page", "name": "perPage", "in": "query" }, { "type": "string", "description": "page number", "name": "page", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/public.pagedResponse" }, { "type": "object", "properties": { "content": { "type": "array", "items": { "allOf": [ { "$ref": "#/definitions/datastore.MetaEvent" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/meta-events/{metaEventID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retrieves a meta event", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "MetaEvents" ], "summary": "Retrieve a meta event", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "meta event id", "name": "metaEventID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/datastore.MetaEvent" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/meta-events/{metaEventID}/resend": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retries a meta event", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "MetaEvents" ], "summary": "Retry meta event", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "meta event id", "name": "metaEventID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/datastore.MetaEvent" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/portal-links": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches multiple portal links", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Portal Links" ], "summary": "List all portal links", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "results per page", "name": "perPage", "in": "query" }, { "type": "string", "description": "page number", "name": "page", "in": "query" }, { "type": "string", "description": "sort order", "name": "sort", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/public.pagedResponse" }, { "type": "object", "properties": { "content": { "type": "array", "items": { "$ref": "#/definitions/models.PortalLinkResponse" } } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint creates a portal link", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Portal Links" ], "summary": "Create a portal link", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Portal Link Details", "name": "portallink", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.PortalLink" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.PortalLinkResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/portal-links/{portalLinkID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retrieves a portal link by its id.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Portal Links" ], "summary": "Retrieve a portal link", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "portal link id", "name": "portalLinkID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.PortalLinkResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint updates a portal link", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Portal Links" ], "summary": "Update a portal link", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "portal link id", "name": "portalLinkID", "in": "path", "required": true }, { "description": "Portal Link Details", "name": "portallink", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.PortalLink" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.PortalLinkResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/portal-links/{portalLinkID}/revoke": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint revokes a portal link", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Portal Links" ], "summary": "Revoke a portal link", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "portal link id", "name": "portalLinkID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/sources": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches multiple sources", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Sources" ], "summary": "List all sources", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "results per page", "name": "perPage", "in": "query" }, { "type": "string", "description": "page number", "name": "page", "in": "query" }, { "type": "string", "description": "sort order", "name": "sort", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/public.pagedResponse" }, { "type": "object", "properties": { "content": { "type": "array", "items": { "$ref": "#/definitions/models.Source" } } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint creates a source", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Sources" ], "summary": "Create a source", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Source Details", "name": "source", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.Source" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.Source" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/sources/{sourceID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retrieves a source by its id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Sources" ], "summary": "Retrieve a source", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Source ID", "name": "sourceID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.Source" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint updates a source", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Sources" ], "summary": "Update a source", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "source id", "name": "sourceID", "in": "path", "required": true }, { "description": "Source Details", "name": "source", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.Source" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.Source" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint deletes a source", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Sources" ], "summary": "Delete a source", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "source id", "name": "sourceID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/subscriptions": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches all the subscriptions", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Subscriptions" ], "summary": "List all subscriptions", "parameters": [ { "type": "string", "description": "results per page", "name": "perPage", "in": "query" }, { "type": "string", "description": "page number", "name": "page", "in": "query" }, { "type": "string", "description": "sort order", "name": "sort", "in": "query" }, { "type": "string", "description": "subscription title", "name": "q", "in": "query" }, { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/public.pagedResponse" }, { "type": "object", "properties": { "content": { "type": "array", "items": { "$ref": "#/definitions/datastore.Subscription" } } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint creates a subscriptions", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Subscriptions" ], "summary": "Create a subscription", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Subscription details", "name": "subscription", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.Subscription" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/public.pagedResponse" }, { "type": "object", "properties": { "content": { "type": "array", "items": { "$ref": "#/definitions/datastore.Subscription" } } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/subscriptions/test_filter": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint validates that a filter will match a certain payload structure.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Subscriptions" ], "summary": "Validate subscription filter", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Filter Details", "name": "filter", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.TestFilter" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "type": "boolean" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } }, "/v1/projects/{projectID}/subscriptions/{subscriptionID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retrieves a single subscription", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Subscriptions" ], "summary": "Retrieve a subscription", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "subscription id", "name": "subscriptionID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/datastore.Subscription" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint updates a subscription", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Subscriptions" ], "summary": "Update a subscription", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "subscription id", "name": "subscriptionID", "in": "path", "required": true }, { "description": "Subscription Details", "name": "subscription", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.Subscription" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/datastore.Subscription" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint deletes a subscription", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Subscriptions" ], "summary": "Delete subscription", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "subscription id", "name": "subscriptionID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/public.Stub" } } } ] } } } } } }, "definitions": { "config.SignatureHeaderProvider": { "type": "string", "enum": [ "X-Convoy-Signature" ], "x-enum-varnames": [ "DefaultSignatureHeader" ] }, "datastore.AlertConfiguration": { "type": "object", "properties": { "count": { "type": "integer" }, "threshold": { "type": "string" } } }, "datastore.ApiKey": { "type": "object", "properties": { "header_name": { "type": "string" }, "header_value": { "type": "string" } } }, "datastore.BasicAuth": { "type": "object", "properties": { "password": { "type": "string" }, "username": { "type": "string" } } }, "datastore.CLIMetadata": { "type": "object", "properties": { "event_type": { "type": "string" }, "source_id": { "type": "string" } } }, "datastore.DeliveryAttempt": { "type": "object", "properties": { "api_version": { "type": "string" }, "created_at": { "type": "string" }, "deleted_at": { "type": "string" }, "endpoint_id": { "type": "string" }, "error": { "type": "string" }, "http_status": { "type": "string" }, "ip_address": { "type": "string" }, "method": { "type": "string" }, "msg_id": { "type": "string" }, "request_http_header": { "$ref": "#/definitions/datastore.HttpHeader" }, "response_data": { "type": "string" }, "response_http_header": { "$ref": "#/definitions/datastore.HttpHeader" }, "status": { "type": "boolean" }, "uid": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" } } }, "datastore.Device": { "type": "object", "properties": { "created_at": { "type": "string" }, "deleted_at": { "type": "string" }, "endpoint_id": { "type": "string" }, "host_name": { "type": "string" }, "last_seen_at": { "type": "string" }, "project_id": { "type": "string" }, "status": { "$ref": "#/definitions/datastore.DeviceStatus" }, "uid": { "type": "string" }, "updated_at": { "type": "string" } } }, "datastore.DeviceStatus": { "type": "string", "enum": [ "offline", "online", "disabled" ], "x-enum-varnames": [ "DeviceStatusOffline", "DeviceStatusOnline", "DeviceStatusDisabled" ] }, "datastore.EncodingType": { "type": "string", "enum": [ "base64", "hex" ], "x-enum-varnames": [ "Base64Encoding", "HexEncoding" ] }, "datastore.Endpoint": { "type": "object", "properties": { "advanced_signatures": { "type": "boolean" }, "authentication": { "$ref": "#/definitions/datastore.EndpointAuthentication" }, "created_at": { "type": "string" }, "deleted_at": { "type": "string" }, "description": { "type": "string" }, "events": { "type": "integer" }, "http_timeout": { "type": "string" }, "owner_id": { "type": "string" }, "project_id": { "type": "string" }, "rate_limit": { "type": "integer" }, "rate_limit_duration": { "type": "string" }, "secrets": { "type": "array", "items": { "$ref": "#/definitions/datastore.Secret" } }, "slack_webhook_url": { "type": "string" }, "status": { "$ref": "#/definitions/datastore.EndpointStatus" }, "support_email": { "type": "string" }, "target_url": { "type": "string" }, "title": { "type": "string" }, "uid": { "type": "string" }, "updated_at": { "type": "string" } } }, "datastore.EndpointAuthentication": { "type": "object", "properties": { "api_key": { "$ref": "#/definitions/datastore.ApiKey" }, "type": { "$ref": "#/definitions/datastore.EndpointAuthenticationType" } } }, "datastore.EndpointAuthenticationType": { "type": "string", "enum": [ "api_key" ], "x-enum-varnames": [ "APIKeyAuthentication" ] }, "datastore.EndpointStatus": { "type": "string", "enum": [ "active", "inactive", "pending", "paused" ], "x-enum-varnames": [ "ActiveEndpointStatus", "InactiveEndpointStatus", "PendingEndpointStatus", "PausedEndpointStatus" ] }, "datastore.Event": { "type": "object", "properties": { "app_id": { "description": "Deprecated", "type": "string" }, "created_at": { "type": "string" }, "data": { "description": "Data is an arbitrary JSON value that gets sent as the body of the\nwebhook to the endpoints", "type": "array", "items": { "type": "integer" } }, "deleted_at": { "type": "string" }, "endpoint_metadata": { "type": "array", "items": { "$ref": "#/definitions/datastore.Endpoint" } }, "endpoints": { "type": "array", "items": { "type": "string" } }, "event_type": { "type": "string" }, "headers": { "$ref": "#/definitions/httpheader.HTTPHeader" }, "matched_endpoints": { "description": "TODO(all) remove this field", "type": "integer" }, "project_id": { "type": "string" }, "raw": { "type": "string" }, "source_id": { "type": "string" }, "source_metadata": { "$ref": "#/definitions/datastore.Source" }, "uid": { "type": "string" }, "updated_at": { "type": "string" } } }, "datastore.EventDelivery": { "type": "object", "properties": { "cli_metadata": { "$ref": "#/definitions/datastore.CLIMetadata" }, "created_at": { "type": "string" }, "deleted_at": { "type": "string" }, "description": { "type": "string" }, "device_id": { "type": "string" }, "device_metadata": { "$ref": "#/definitions/datastore.Device" }, "endpoint_id": { "type": "string" }, "endpoint_metadata": { "$ref": "#/definitions/datastore.Endpoint" }, "event_id": { "type": "string" }, "event_metadata": { "$ref": "#/definitions/datastore.Event" }, "headers": { "$ref": "#/definitions/httpheader.HTTPHeader" }, "metadata": { "$ref": "#/definitions/datastore.Metadata" }, "project_id": { "type": "string" }, "source_metadata": { "$ref": "#/definitions/datastore.Source" }, "status": { "$ref": "#/definitions/datastore.EventDeliveryStatus" }, "subscription_id": { "type": "string" }, "uid": { "type": "string" }, "updated_at": { "type": "string" } } }, "datastore.EventDeliveryStatus": { "type": "string", "enum": [ "Scheduled", "Processing", "Discarded", "Failure", "Success", "Retry" ], "x-enum-varnames": [ "ScheduledEventStatus", "ProcessingEventStatus", "DiscardedEventStatus", "FailureEventStatus", "SuccessEventStatus", "RetryEventStatus" ] }, "datastore.FilterConfiguration": { "type": "object", "properties": { "event_types": { "type": "array", "items": { "type": "string" } }, "filter": { "$ref": "#/definitions/datastore.FilterSchema" } } }, "datastore.FilterSchema": { "type": "object", "properties": { "body": { "$ref": "#/definitions/datastore.M" }, "headers": { "$ref": "#/definitions/datastore.M" } } }, "datastore.GooglePubSubConfig": { "type": "object", "properties": { "project_id": { "type": "string" }, "service_account": { "type": "array", "items": { "type": "integer" } }, "subscription_id": { "type": "string" } } }, "datastore.HMac": { "type": "object", "properties": { "encoding": { "$ref": "#/definitions/datastore.EncodingType" }, "hash": { "type": "string" }, "header": { "type": "string" }, "secret": { "type": "string" } } }, "datastore.HttpHeader": { "type": "object", "additionalProperties": { "type": "string" } }, "datastore.M": { "type": "object", "additionalProperties": true }, "datastore.MetaEvent": { "type": "object", "properties": { "attempt": { "$ref": "#/definitions/datastore.MetaEventAttempt" }, "created_at": { "type": "string" }, "deleted_at": { "type": "string" }, "event_type": { "type": "string" }, "metadata": { "$ref": "#/definitions/datastore.Metadata" }, "project_id": { "type": "string" }, "status": { "$ref": "#/definitions/datastore.EventDeliveryStatus" }, "uid": { "type": "string" }, "updated_at": { "type": "string" } } }, "datastore.MetaEventAttempt": { "type": "object", "properties": { "request_http_header": { "$ref": "#/definitions/datastore.HttpHeader" }, "response_data": { "type": "string" }, "response_http_header": { "$ref": "#/definitions/datastore.HttpHeader" } } }, "datastore.MetaEventConfiguration": { "type": "object", "properties": { "event_type": { "type": "array", "items": { "type": "string" } }, "is_enabled": { "type": "boolean" }, "pub_sub": { "$ref": "#/definitions/datastore.PubSubConfig" }, "secret": { "type": "string" }, "type": { "$ref": "#/definitions/datastore.MetaEventType" }, "url": { "type": "string" } } }, "datastore.MetaEventType": { "type": "string", "enum": [ "http", "pub_sub" ], "x-enum-varnames": [ "HTTPMetaEvent", "PubSubMetaEvent" ] }, "datastore.Metadata": { "type": "object", "properties": { "data": { "description": "Data to be sent to endpoint.", "type": "array", "items": { "type": "integer" } }, "interval_seconds": { "type": "integer" }, "next_send_time": { "type": "string" }, "num_trials": { "description": "NumTrials: number of times we have tried to deliver this Event to\nan application", "type": "integer" }, "raw": { "type": "string" }, "retry_limit": { "type": "integer" }, "strategy": { "$ref": "#/definitions/datastore.StrategyProvider" } } }, "datastore.PaginationData": { "type": "object", "properties": { "has_next_page": { "type": "boolean" }, "has_prev_page": { "type": "boolean" }, "next_page_cursor": { "type": "string" }, "per_page": { "type": "integer" }, "prev_page_cursor": { "type": "string" } } }, "datastore.Project": { "type": "object", "properties": { "config": { "$ref": "#/definitions/datastore.ProjectConfig" }, "created_at": { "type": "string" }, "deleted_at": { "type": "string" }, "logo_url": { "type": "string" }, "name": { "type": "string" }, "organisation_id": { "type": "string" }, "retained_events": { "type": "integer" }, "statistics": { "$ref": "#/definitions/datastore.ProjectStatistics" }, "type": { "$ref": "#/definitions/datastore.ProjectType" }, "uid": { "type": "string" }, "updated_at": { "type": "string" } } }, "datastore.ProjectConfig": { "type": "object", "properties": { "disable_endpoint": { "type": "boolean" }, "max_payload_read_size": { "type": "integer" }, "meta_event": { "$ref": "#/definitions/datastore.MetaEventConfiguration" }, "ratelimit": { "$ref": "#/definitions/datastore.RateLimitConfiguration" }, "replay_attacks_prevention_enabled": { "type": "boolean" }, "retention_policy": { "$ref": "#/definitions/datastore.RetentionPolicyConfiguration" }, "retention_policy_enabled": { "type": "boolean" }, "signature": { "$ref": "#/definitions/datastore.SignatureConfiguration" }, "strategy": { "$ref": "#/definitions/datastore.StrategyConfiguration" } } }, "datastore.ProjectStatistics": { "type": "object", "properties": { "messages_sent": { "type": "integer" }, "total_endpoints": { "type": "integer" }, "total_sources": { "type": "integer" }, "total_subscriptions": { "type": "integer" } } }, "datastore.ProjectType": { "type": "string", "enum": [ "outgoing", "incoming" ], "x-enum-varnames": [ "OutgoingProject", "IncomingProject" ] }, "datastore.ProviderConfig": { "type": "object", "properties": { "twitter": { "$ref": "#/definitions/datastore.TwitterProviderConfig" } } }, "datastore.PubSubConfig": { "type": "object", "properties": { "google": { "$ref": "#/definitions/datastore.GooglePubSubConfig" }, "sqs": { "$ref": "#/definitions/datastore.SQSPubSubConfig" }, "type": { "$ref": "#/definitions/datastore.PubSubType" }, "workers": { "type": "integer" } } }, "datastore.PubSubType": { "type": "string", "enum": [ "sqs", "google" ], "x-enum-varnames": [ "SqsPubSub", "GooglePubSub" ] }, "datastore.RateLimitConfiguration": { "type": "object", "properties": { "count": { "type": "integer" }, "duration": { "type": "integer" } } }, "datastore.RetentionPolicyConfiguration": { "type": "object", "properties": { "policy": { "type": "string" } } }, "datastore.RetryConfiguration": { "type": "object", "properties": { "duration": { "type": "integer" }, "retry_count": { "type": "integer" }, "type": { "$ref": "#/definitions/datastore.StrategyProvider" } } }, "datastore.SQSPubSubConfig": { "type": "object", "properties": { "access_key_id": { "type": "string" }, "default_region": { "type": "string" }, "queue_name": { "type": "string" }, "secret_key": { "type": "string" } } }, "datastore.Secret": { "type": "object", "properties": { "created_at": { "type": "string" }, "deleted_at": { "type": "string" }, "expires_at": { "type": "string" }, "uid": { "type": "string" }, "updated_at": { "type": "string" }, "value": { "type": "string" } } }, "datastore.SignatureConfiguration": { "type": "object", "properties": { "header": { "$ref": "#/definitions/config.SignatureHeaderProvider" }, "versions": { "type": "array", "items": { "$ref": "#/definitions/datastore.SignatureVersion" } } } }, "datastore.SignatureVersion": { "type": "object", "properties": { "created_at": { "type": "string" }, "encoding": { "$ref": "#/definitions/datastore.EncodingType" }, "hash": { "type": "string" }, "uid": { "type": "string" } } }, "datastore.Source": { "type": "object", "properties": { "created_at": { "type": "string" }, "deleted_at": { "type": "string" }, "forward_headers": { "type": "array", "items": { "type": "string" } }, "is_disabled": { "type": "boolean" }, "mask_id": { "type": "string" }, "name": { "type": "string" }, "project_id": { "type": "string" }, "provider": { "$ref": "#/definitions/datastore.SourceProvider" }, "provider_config": { "$ref": "#/definitions/datastore.ProviderConfig" }, "pub_sub": { "$ref": "#/definitions/datastore.PubSubConfig" }, "type": { "$ref": "#/definitions/datastore.SourceType" }, "uid": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" }, "verifier": { "$ref": "#/definitions/datastore.VerifierConfig" } } }, "datastore.SourceProvider": { "type": "string", "enum": [ "github", "twitter", "shopify" ], "x-enum-varnames": [ "GithubSourceProvider", "TwitterSourceProvider", "ShopifySourceProvider" ] }, "datastore.SourceType": { "type": "string", "enum": [ "http", "rest_api", "pub_sub", "db_change_stream" ], "x-enum-varnames": [ "HTTPSource", "RestApiSource", "PubSubSource", "DBChangeStream" ] }, "datastore.StrategyConfiguration": { "type": "object", "properties": { "duration": { "type": "integer" }, "retry_count": { "type": "integer" }, "type": { "$ref": "#/definitions/datastore.StrategyProvider" } } }, "datastore.StrategyProvider": { "type": "string", "enum": [ "linear", "linear", "exponential" ], "x-enum-varnames": [ "DefaultStrategyProvider", "LinearStrategyProvider", "ExponentialStrategyProvider" ] }, "datastore.Subscription": { "type": "object", "properties": { "alert_config": { "description": "subscription config", "allOf": [ { "$ref": "#/definitions/datastore.AlertConfiguration" } ] }, "created_at": { "type": "string" }, "deleted_at": { "type": "string" }, "device_metadata": { "$ref": "#/definitions/datastore.Device" }, "endpoint_metadata": { "$ref": "#/definitions/datastore.Endpoint" }, "filter_config": { "$ref": "#/definitions/datastore.FilterConfiguration" }, "name": { "type": "string" }, "rate_limit_config": { "$ref": "#/definitions/datastore.RateLimitConfiguration" }, "retry_config": { "$ref": "#/definitions/datastore.RetryConfiguration" }, "source_metadata": { "$ref": "#/definitions/datastore.Source" }, "type": { "$ref": "#/definitions/datastore.SubscriptionType" }, "uid": { "type": "string" }, "updated_at": { "type": "string" } } }, "datastore.SubscriptionType": { "type": "string", "enum": [ "cli", "api" ], "x-enum-varnames": [ "SubscriptionTypeCLI", "SubscriptionTypeAPI" ] }, "datastore.TwitterProviderConfig": { "type": "object", "properties": { "crc_verified_at": { "type": "string" } } }, "datastore.VerifierConfig": { "type": "object", "properties": { "api_key": { "$ref": "#/definitions/datastore.ApiKey" }, "basic_auth": { "$ref": "#/definitions/datastore.BasicAuth" }, "hmac": { "$ref": "#/definitions/datastore.HMac" }, "type": { "$ref": "#/definitions/datastore.VerifierType" } } }, "datastore.VerifierType": { "type": "string", "enum": [ "noop", "hmac", "basic_auth", "api_key" ], "x-enum-varnames": [ "NoopVerifier", "HMacVerifier", "BasicAuthVerifier", "APIKeyVerifier" ] }, "httpheader.HTTPHeader": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } }, "models.DynamicEndpoint": { "type": "object", "properties": { "advanced_signatures": { "type": "boolean" }, "appID": { "description": "Deprecated but necessary for backward compatibility", "type": "string" }, "authentication": { "$ref": "#/definitions/datastore.EndpointAuthentication" }, "description": { "type": "string" }, "http_timeout": { "type": "string" }, "is_disabled": { "type": "boolean" }, "name": { "type": "string" }, "owner_id": { "type": "string" }, "rate_limit": { "type": "integer" }, "rate_limit_duration": { "type": "string" }, "secret": { "type": "string" }, "slack_webhook_url": { "type": "string" }, "support_email": { "type": "string" }, "url": { "type": "string" } } }, "models.DynamicEvent": { "type": "object", "properties": { "endpoint": { "$ref": "#/definitions/models.DynamicEndpoint" }, "event": { "$ref": "#/definitions/models.DynamicEventStub" }, "subscription": { "$ref": "#/definitions/models.DynamicSubscription" } } }, "models.DynamicEventStub": { "type": "object", "properties": { "custom_headers": { "type": "object", "additionalProperties": { "type": "string" } }, "data": { "description": "Data is an arbitrary JSON value that gets sent as the body of the webhook to the endpoints", "type": "array", "items": { "type": "integer" } }, "event_type": { "type": "string" }, "project_id": { "type": "string" } } }, "models.DynamicSubscription": { "type": "object", "properties": { "alert_config": { "$ref": "#/definitions/datastore.AlertConfiguration" }, "filter_config": { "$ref": "#/definitions/datastore.FilterConfiguration" }, "name": { "type": "string" }, "rate_limit_config": { "$ref": "#/definitions/datastore.RateLimitConfiguration" }, "retry_config": { "$ref": "#/definitions/models.RetryConfiguration" } } }, "models.Endpoint": { "type": "object", "properties": { "advanced_signatures": { "type": "boolean" }, "appID": { "description": "Deprecated but necessary for backward compatibility", "type": "string" }, "authentication": { "$ref": "#/definitions/datastore.EndpointAuthentication" }, "description": { "type": "string" }, "http_timeout": { "type": "string" }, "is_disabled": { "type": "boolean" }, "name": { "type": "string" }, "owner_id": { "type": "string" }, "rate_limit": { "type": "integer" }, "rate_limit_duration": { "type": "string" }, "secret": { "type": "string" }, "slack_webhook_url": { "type": "string" }, "support_email": { "type": "string" }, "url": { "type": "string" } } }, "models.Event": { "type": "object", "properties": { "app_id": { "description": "Deprecated but necessary for backward compatibility", "type": "string" }, "custom_headers": { "type": "object", "additionalProperties": { "type": "string" } }, "data": { "description": "Data is an arbitrary JSON value that gets sent as the body of the\nwebhook to the endpoints", "type": "array", "items": { "type": "integer" } }, "endpoint_id": { "type": "string" }, "event_type": { "type": "string" } } }, "models.ExpireSecret": { "type": "object", "properties": { "expiration": { "type": "integer" }, "secret": { "type": "string" } } }, "models.FanoutEvent": { "type": "object", "properties": { "custom_headers": { "type": "object", "additionalProperties": { "type": "string" } }, "data": { "description": "Data is an arbitrary JSON value that gets sent as the body of the\nwebhook to the endpoints", "type": "array", "items": { "type": "integer" } }, "event_type": { "type": "string" }, "owner_id": { "type": "string" } } }, "models.FilterSchema": { "type": "object", "properties": { "body": {}, "header": {} } }, "models.PortalLink": { "type": "object", "properties": { "endpoints": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" } } }, "models.PortalLinkResponse": { "type": "object", "properties": { "created_at": { "type": "string" }, "deleted_at": { "type": "string" }, "endpoint_count": { "type": "integer" }, "endpoints": { "type": "array", "items": { "type": "string" } }, "endpoints_metadata": { "type": "array", "items": { "$ref": "#/definitions/datastore.Endpoint" } }, "name": { "type": "string" }, "project_id": { "type": "string" }, "token": { "type": "string" }, "uid": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" } } }, "models.Project": { "type": "object", "properties": { "config": { "$ref": "#/definitions/datastore.ProjectConfig" }, "logo_url": { "type": "string" }, "name": { "type": "string" }, "type": { "$ref": "#/definitions/datastore.ProjectType" } } }, "models.RetryConfiguration": { "type": "object", "properties": { "duration": { "type": "string" }, "interval_seconds": { "type": "integer" }, "retry_count": { "type": "integer" }, "type": { "$ref": "#/definitions/datastore.StrategyProvider" } } }, "models.Source": { "type": "object", "properties": { "is_disabled": { "type": "boolean" }, "name": { "type": "string" }, "provider": { "$ref": "#/definitions/datastore.SourceProvider" }, "pub_sub": { "$ref": "#/definitions/datastore.PubSubConfig" }, "type": { "$ref": "#/definitions/datastore.SourceType" }, "verifier": { "$ref": "#/definitions/datastore.VerifierConfig" } } }, "models.Subscription": { "type": "object", "properties": { "alert_config": { "$ref": "#/definitions/datastore.AlertConfiguration" }, "app_id": { "description": "Deprecated but necessary for backward compatibility", "type": "string" }, "endpoint_id": { "type": "string" }, "filter_config": { "$ref": "#/definitions/datastore.FilterConfiguration" }, "name": { "type": "string" }, "rate_limit_config": { "$ref": "#/definitions/datastore.RateLimitConfiguration" }, "retry_config": { "$ref": "#/definitions/models.RetryConfiguration" }, "source_id": { "type": "string" } } }, "models.TestFilter": { "type": "object", "properties": { "request": { "$ref": "#/definitions/models.FilterSchema" }, "schema": { "$ref": "#/definitions/models.FilterSchema" } } }, "public.Stub": { "type": "object" }, "public.pagedResponse": { "type": "object", "properties": { "content": {}, "pagination": { "$ref": "#/definitions/datastore.PaginationData" } } }, "util.ServerResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "integer" } }, "message": { "type": "string" }, "status": { "type": "boolean" } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } }, "tags": [ { "description": "Organisation related APIs", "name": "Organisations" }, { "description": "Subscription related APIs", "name": "Subscriptions" }, { "description": "Endpoint related APIs", "name": "Endpoints" }, { "description": "Event related APIs", "name": "Events" }, { "description": "Source related APIs", "name": "Sources" }, { "description": "EventDelivery related APIs", "name": "Event Deliveries" }, { "description": "Delivery Attempt related APIs", "name": "Delivery Attempts" }, { "description": "Project related APIs", "name": "Projects" }, { "description": "Portal Links related APIs", "name": "Portal Links" } ] }