{
    "properties": {
        "connectionParameters": {
            "api_key": {
                "type": "securestring",
                "uiDefinition": {
                    "displayName": "API token",
                    "description": "An API token of your Kadmo account. Create one in Kadmo under Settings, Assistant, API tokens.",
                    "tooltip": "Provide your Kadmo API token. It starts with kadmo_api_.",
                    "constraints": {
                        "tabIndex": 2,
                        "clearText": false,
                        "required": "true"
                    }
                }
            }
        },
        "iconBrandColor": "#5B3DF5",
        "capabilities": [
            "actions",
            "triggers"
        ],
        "policyTemplateInstances": [
            {
                "templateId": "setheader",
                "title": "Send the token as a Bearer token",
                "parameters": {
                    "x-ms-apimTemplateParameter.name": "Authorization",
                    "x-ms-apimTemplateParameter.value": "Bearer @connectionParameters('api_key')",
                    "x-ms-apimTemplateParameter.existsAction": "override",
                    "x-ms-apimTemplate-policySection": "Request"
                }
            },
            {
                "templateId": "routerequesttoendpoint",
                "title": "Subscribe each trigger at /webhooks",
                "parameters": {
                    "x-ms-apimTemplate-operationName": [
                        "OnJobFinished",
                        "OnJobNeedsInput",
                        "OnTaskDone"
                    ],
                    "x-ms-apimTemplateParameter.newPath": "/webhooks",
                    "x-ms-apimTemplateParameter.httpMethod": "@Request.OriginalHTTPMethod"
                }
            }
        ],
        "publisher": "Kadmo",
        "stackOwner": "Kadmo GmbH"
    }
}
