Report Filing Service

<back to all web services

GetWebhookSubscription

GetSubscriptionsWebhooksSync

Represents a request to retrieve a webhook subscription by its unique identifier, and retrieve its details.

Requires Authentication
The following routes are available for this service:
GET/sync/webhooks/subscriptions/{Id}
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 retrieve a webhook subscription by its unique identifier, and retrieve its details.
        '''</Summary>
        <Api(Description:="Represents a request to retrieve a webhook subscription by its unique identifier, and retrieve its details.")>
        Public Partial Class GetWebhookSubscription
            Inherits GetWebhookSubscriptionBase
        End Class

        '''<Summary>
        '''Specifies a request to retrieve a webhook subscription by its unique identifier, and retrieve its details.
        '''</Summary>
        <Api(Description:="Specifies a request to retrieve a webhook subscription by its unique identifier, and retrieve its details.")>
        Public Partial Class GetWebhookSubscriptionBase
            Implements IGet
            '''<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
        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 GetWebhookSubscription DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /sync/webhooks/subscriptions/{Id} HTTP/1.1 
Host: reportfiling.pwc.de 
Accept: text/jsonl
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"}}}