POST | /sync/webhooks/subscriptions/{Id}/delete |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports PwC.Elmaas.Core.Services.Contracts.Webhooks.Requests
Imports PwC.Elmaas.Core.Services.Contracts.Webhooks.Responses
Imports ServiceStack.Webhooks.ServiceModel.Types
Namespace Global
Namespace PwC.Elmaas.Core.Services.Contracts.Webhooks.Requests
'''<Summary>
'''Represents a request to delete a webhook subscription.
'''</Summary>
<Api(Description:="Represents a request to delete a webhook subscription.")>
Public Partial Class DeleteWebhookSubscription
Inherits DeleteWebhookSubscriptionBase
End Class
'''<Summary>
'''Specifies a request to delete a webhook subscription.
'''</Summary>
<Api(Description:="Specifies a request to delete a webhook subscription.")>
Public Partial Class DeleteWebhookSubscriptionBase
Implements IPost
'''<Summary>
'''The unique identifier of the subscriber.
'''</Summary>
<ApiMember(Description:="The unique identifier of the subscriber.", IsRequired:=true, Name:="Id")>
Public Overridable Property Id As String
'''<Summary>
'''The secret of the to-be-deleted webhook subscription. This secret is used to authenticate the owner of the webhook subscription.
'''</Summary>
<ApiMember(Description:="The secret of the to-be-deleted webhook subscription. This secret is used to authenticate the owner of the webhook subscription.", IsRequired:=true, Name:="Secret")>
Public Overridable Property Secret As String
End Class
End Namespace
Namespace PwC.Elmaas.Core.Services.Contracts.Webhooks.Responses
'''<Summary>
'''Represents a service response that encapsulates a webhook subscription.
'''</Summary>
<Api(Description:="Represents a service response that encapsulates a webhook subscription.")>
Public Partial Class SubscriptionResponse
Public Sub New()
History = New List(Of SubscriptionDeliveryResult)
End Sub
'''<Summary>
'''The encapsulated webhook subscription of the response. The secret of the webhook subscription is encrypted and can only be decrypted by the owner of the private key.
'''</Summary>
<ApiMember(Description:="The encapsulated webhook subscription of the response. The secret of the webhook subscription is encrypted and can only be decrypted by the owner of the private key.", Name:="Subscription")>
Public Overridable Property Subscription As WebhookSubscription
'''<Summary>
'''The history of the subscription event.
'''</Summary>
<ApiMember(Description:="The history of the subscription event.", Name:="History")>
Public Overridable Property History As List(Of SubscriptionDeliveryResult)
'''<Summary>
'''The status of the response.
'''</Summary>
<ApiMember(Description:="The status of the response.", Name:="ResponseStatus")>
Public Overridable Property ResponseStatus As ResponseStatus
End Class
End Namespace
Namespace ServiceStack.Webhooks.ServiceModel.Types
Public Partial Class SubscriptionConfig
Public Overridable Property Url As String
Public Overridable Property ContentType As String
Public Overridable Property Secret As String
End Class
Public Partial Class SubscriptionDeliveryResult
Public Overridable Property AttemptedDateUtc As Date
Public Overridable Property StatusDescription As String
Public Overridable Property StatusCode As HttpStatusCode
Public Overridable Property SubscriptionId As String
Public Overridable Property Id As String
Public Overridable Property EventId As String
End Class
Public Partial Class WebhookSubscription
Public Overridable Property Id As String
Public Overridable Property Name As String
Public Overridable Property Event As String
Public Overridable Property IsActive As Boolean
Public Overridable Property CreatedDateUtc As Date
Public Overridable Property CreatedById As String
Public Overridable Property LastModifiedDateUtc As Date
Public Overridable Property Config As SubscriptionConfig
End Class
End Namespace
End Namespace
VB.NET DeleteWebhookSubscription DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /sync/webhooks/subscriptions/{Id}/delete HTTP/1.1
Host: reportfiling.staging.pwc.de
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"id":"String","secret":"String"}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"subscription":{"id":"String","name":"String","event":"String","isActive":false,"createdDateUtc":"\/Date(-62135596800000-0000)\/","createdById":"String","lastModifiedDateUtc":"\/Date(-62135596800000-0000)\/","config":{"url":"String","contentType":"String","secret":"String"}},"history":[{"attemptedDateUtc":"\/Date(-62135596800000-0000)\/","statusDescription":"String","statusCode":"Continue","subscriptionId":"String","id":"String","eventId":"String"}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}