{ "swagger": "2.0", "info": { "title": "keptn api", "version": "0.1.0" }, "schemes": [ "http" ], "basePath": "/", "consumes": [ "application/cloudevents+json" ], "produces": [ "application/cloudevents+json" ], "securityDefinitions": { "key": { "type": "apiKey", "in": "header", "name": "x-token" } }, "security": [ { "key": [] } ], "paths": { "/auth": { "post": { "tags": [ "auth" ], "operationId": "auth", "summary": "Checks the provided token", "parameters": [ { "name": "body", "in": "body", "schema": { } } ], "responses": { "200": { "description": "authenticated" } } } }, "/event": { "post": { "tags": [ "event" ], "operationId": "sendEvent", "summary": "Forwards the received event to the eventbroker", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/KeptnContextExtendedCE" } } ], "responses": { "201": { "description": "forwarded", "schema" : { "$ref" : "#/definitions/ChannelInfo" } }, "default": { "description": "error", "schema": { "$ref": "#/definitions/error" } } } } }, "/configure": { "post": { "tags": [ "configure" ], "operationId": "configure", "summary": "Forwards the received configure event to the eventbroker", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/ConfigureCE" } } ], "responses": { "201": { "description": "configured", "schema" : { "$ref" : "#/definitions/ChannelInfo" } }, "default": { "description": "error", "schema": { "$ref": "#/definitions/error" } } } } }, "/project": { "post": { "tags": [ "project" ], "operationId": "project", "summary": "Forwards the received project event to the eventbroker", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateProjectCE" } } ], "responses": { "201": { "description": "project created", "schema" : { "$ref" : "#/definitions/ChannelInfo" } }, "default": { "description": "error", "schema": { "$ref": "#/definitions/error" } } } } }, "/dynatrace": { "post": { "tags": [ "dynatrace" ], "operationId": "dynatrace", "summary": "Forwards the received event from Dynatrace to the eventbroker", "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/DynatraceProblemCE" } } ], "responses": { "201": { "description": "event forwarded" }, "default": { "description": "error", "schema": { "$ref": "#/definitions/error" } } } } } }, "definitions": { "KeptnContextExtendedCE": { "allOf": [ { "type": "object", "required": [ "shkeptncontext" ], "properties": { "shkeptncontext": { "type": "string" } } } ] }, "ConfigureCE": { "allOf": [ { "$ref": "ce_v0_2_without_data.json#/definitions/event" }, { "type": "object", "properties": { "data": { "required": [ "org", "user", "token" ], "properties": { "org": { "type": "string" }, "user": { "type": "string" }, "token": { "type": "string" } } } } } ] }, "DynatraceProblemCE": { "allOf": [ { "$ref": "ce_v0_2_without_data.json#/definitions/event" }, { "type": "object", "properties": { "data": { "required": [ "state", "problemid", "pid", "problemtitle", "problemdetails", "impactedentities", "impactedentity" ], "properties": { "state": { "type": "string" }, "problemid": { "type": "string" }, "pid": { "type": "string" }, "problemtitle": { "type": "string" }, "problemdetails": { "required": [ "id" ], "properties": { "id": { "type": "string" } } }, "impactedentities": { "type": "array", "items": { "required": [ "type", "name", "entity" ], "properties": { "type": { "type": "string" }, "name": { "type": "string" }, "entity": { "type": "string" } } } }, "impactedentity": { "type": "string" } } } } } ] }, "CreateProjectCE": { "allOf": [ { "$ref": "ce_v0_2_without_data.json#/definitions/event" }, { "type": "object", "properties": { "data": { "required": [ "project", "stages" ], "properties": { "project": { "type": "string" }, "stages": { "type": "array", "items": { "required": [ "name", "deployment_strategy" ], "properties": { "name": { "type": "string" }, "deployment_strategy": { "type": "string" }, "test_strategy": { "type": "string" } } } } } } } } ] }, "error": { "type": "object", "required": [ "message" ], "properties": { "code": { "type": "integer", "format": "int64" }, "message": { "type": "string" }, "fields": { "type": "string" } } }, "ChannelInfo" : { "allOf": [ { "$ref": "ce_v0_2_without_data.json#/definitions/event" }, { "type": "object", "properties": { "data": { "properties": { "channelInfo": { "required": [ "token", "channelID" ], "properties": { "token": { "type": "string" }, "channelID": { "type": "string" } } } } } } } ] } } }