Hi support,
Subscribing to package pushed to built-in feed event (JSON at the bottom) - in order to retrieve package id and package version I have to parse textual data from the Payload.Event.Message field. IMO this should be available as a structured event-specific metadata. Moreover, Payload.Event should have a type discriminator so different event types can be easily modelled/dispatched in my webhook handler. There is the EventType field but it is always set to “SubscriptionPayload”.
Thanks,
queil
{
"Timestamp": "2019-10-28T11:01:08.7559397+00:00",
"EventType": "SubscriptionPayload",
"Payload": {
"ServerUri": "https://localhost:8443",
"ServerAuditUri": "https://localhost:8443/#/configuration/audit?from=2019-10-28T11%3a00%3a08.%2b00%3a00&to=2019-10-28T11%3a00%3a39.%2b00%3a00",
"BatchProcessingDate": "2019-10-28T11:00:39.1701336+00:00",
"Subscription": {
"Id": "Subscriptions-21",
"Name": "My subscription",
"Type": 0,
"IsDisabled": false,
"EventNotificationSubscription": {
"Filter": {
"Users": [],
"Projects": [],
"ProjectGroups": [],
"Environments": [],
"EventGroups": [],
"EventCategories": [],
"EventAgents": [],
"Tenants": [],
"Tags": [],
"DocumentTypes": []
},
"EmailTeams": [],
"EmailFrequencyPeriod": "01:00:00",
"EmailPriority": 0,
"EmailDigestLastProcessed": null,
"EmailDigestLastProcessedEventAutoId": null,
"EmailShowDatesInTimeZoneId": "GMT Standard Time",
"WebhookURI": "http://localhost:5000/webhook",
"WebhookTeams": [],
"WebhookTimeout": "00:00:05",
"WebhookHeaderKey": null,
"WebhookHeaderValue": null,
"WebhookLastProcessed": "2019-10-28T11:00:08.9949921+00:00",
"WebhookLastProcessedEventAutoId": 20592
},
"SpaceId": "Spaces-1",
"Links": {
"Self": {}
},
"Event": {
"Id": "Events-805",
"RelatedDocumentIds": [
"feeds-builtin"
],
"Category": "Created",
"UserId": "Users-1",
"Username": "admin",
"IsService": false,
"IdentityEstablishedWith": "Session cookie",
"UserAgent": "OctopusClient-js/2019.8.6",
"Occurred": "2019-10-28T11:00:17.4820962+00:00",
"Message": "Package My.Package.Name version 1.0.23 was pushed to the Octopus Server (built-in) feed",
"MessageHtml": "Package My.Package.Name version 1.0.23 was pushed to the <a href='#/library/feeds/feeds-builtin'>Octopus Server (built-in)</a> feed",
"MessageReferences": [
{
"ReferencedDocumentId": "feeds-builtin",
"StartIndex": 65,
"Length": 25
}
],
"Comments": null,
"Details": null,
"SpaceId": "Spaces-1",
"Links": {
"Self": {}
},
"BatchId": "93864dff-a759-4190-8b66-9a421092f99e",
"TotalEventsInBatch": 1,
"EventNumberInBatch": 1
}
}
}
}