Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I trying to use "Post deployment webhooks" in Umbraco Cloud. Do anyone have an working code example?
My code:
public class WebHooksController : UmbracoApiController { [System.Web.Http.HttpPost] public string Deploy(UmbracoDeployPayload payload) { Logger.Info<WebHooksController>("WebHook - Deployed"); return "message"; } public class UmbracoDeployPayload { public string Id { get; set; } public string Status { get; set; } public string StatusText { get; set; } public string AuthorEmail { get; set; } public string Author { get; set; } public string Message { get; set; } public string Progress { get; set; } public DateTime ReceivedTime { get; set; } public DateTime StartTime { get; set; } public DateTime EndTime { get; set; } public DateTime LastSuccessEndTime { get; set; } public bool Complete { get; set; } public string ProjectName { get; set; } public string ProjectUrl { get; set; } public string SiteUrl { get; set; } public string EnvironmentName { get; set; } public List<UmbracoDeployCommit> Commits { get; set; } } public class UmbracoDeployCommit { public string AuthorName { get; set; } public string AuthorEmail { get; set; } public string Message { get; set; } public DateTime Timestamp { get; set; } public List<string> ChangedFiles { get; set; } } }
My api is not called after I pushed new code. I cant see any logging. I can test my API with Postman, so I know that my API is working.
Documentation only have example on json data: https://our.umbraco.com/documentation/Umbraco-Cloud/Deployment/Deployment-Webhook/
Please help :)
So, my code works. The problem was that my site use IP-allowlisting. And Umbraco Cloud have more IP addresses than documentation says :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Umbraco 8 (Cloud) - WebHook Code Example
Hi,
I trying to use "Post deployment webhooks" in Umbraco Cloud. Do anyone have an working code example?
My code:
My api is not called after I pushed new code. I cant see any logging. I can test my API with Postman, so I know that my API is working.
Documentation only have example on json data: https://our.umbraco.com/documentation/Umbraco-Cloud/Deployment/Deployment-Webhook/
Please help :)
So, my code works. The problem was that my site use IP-allowlisting. And Umbraco Cloud have more IP addresses than documentation says :)
is working on a reply...