DekiChangeSubscription

    Assembly: mindtouch.deki
    Class: MindTouch.Deki.DekiChangeSubscriptionService
    SID: sid://mindtouch.com/deki/2008/11/changesubscription

    Overview

    The DekiChangeSubscriptionService is responsible for the Page Alerts feature of Deki. By default it is started by Deki and located at:

    @api/deki/pagesubservice/
    Verb:Suffix Description
    POST:pages/{pageid} Subscribe authorized user to a page or page subtree
    DELETE:pages/{pageid} Remove a subscription for an authorized user
    GET:subscriptions Retrieve all subscriptions for the authorized user
    POST:updateuser Subscription end-point for user events
    POST:notify Subscription end-point for events subscribed to by users

    Data Types

    Subscription Set 

    <subscriptions>
        <subscription pageid="{pageid}" depth="0|*" />  
        ...
    </subscription-set>

    Features

    POST:pages/{pageid}

    Subscribe the current user to a specific page or page subtree

    Accces: Public 
    Post Parameters
    Name Type Defaut Description
    depth string? 0 0 for direct page subscription, * for subscription of page and child pages
    Request body

    It is assumed that the request contains Deki's authorization headers, as they are used to proxy a request to Deki to determine the requesting user

    Response

    One special case of a Bad Request response is a user without an email, which is indicated by a reason of "no email for user". This means that the request was otherwise valid, but could not be completed, because the user has to email address to be used for the subscription.

    Response Response Body Description
    Ok (200) none
    operation completed successfully and a new event was created
    Bad Request (400) none request could not be completed, because of invalid data in the request
    Unauthorized (401) none request could not be completed, because of invalid or missing authorization headers
    Response body

    None

    DELETE:pages/{pageid}

    Deletes any existing direction subscription for the page (i.e. does not any subscription if the page is indirectly subscribed by being a child of a subscribed page

    Accces: Public
    Request body

    It is assumed that the request contains Deki's authorization headers, as they are used to proxy a request to Deki to determine the requesting user

    Response
    Response Response Body Description
    Ok (200) none
    operation completed successfully and a new event was created
    Bad Request (400) none request could not be completed, because of invalid data in the request
    Unauthorized (401) none request could not be completed, because of invalid or missing authorization headers
    Response body

    None

    GET:subscriptions

    Retrieve subscriptions for all or a subset of pages for the current user. Only returns direct matches by pageId. To find out if a page is indirectly subscribed by a parent, all parent pageIds should be submitted as well in the request. The resulting document will list all subscriptions that match any of the pageIds.

    If the page under consideration is page 10 with parent ids 9,8,7, and page is directly subscriped if one of the subscription elements has a pageid attribute of 10. If it has any other subscription elements (which can only be for pageid 9,8 and/or 7) the page is indirectly subscribed to.

    Accces: Public
    Query Parameters
    Name Type Defaut Description
    pages string? empty Comma separated list of pageIds to check for a subscription.
    Request body

    It is assumed that the request contains Deki's authorization headers, as they are used to proxy a request to Deki to determine the requesting user.

    Response
    Response Response Body Description
    Ok (200) text/xml
    operation completed successfully and a new event was created
    Bad Request (400) none request could not be completed, because of invalid data in the request
    Unauthorized (401) none request could not be completed, because of invalid or missing authorization headers
    Response body

    Any subscription matches are returned in an XML document following format described above.

    POST:updateuser

    This feature is used by the pubsub chain to post user events to the service.

    Accces: Internal
    Request body

    User change doc

    Response
    Response Response Body Description
    Ok (200) none
    operation completed successfully and a new event was created
    Bad Request (400) text/html request could not be completed, because of invalid data in the request
    Response body

    None

    POST:notify

    This feature is used by the pubsub chain to post page events to the service.

    Accces: Internal
    Request body

    Page change doc

    Response
    Response Response Body Description
    Ok (200) none
    operation completed successfully and a new event was created
    Bad Request (400) text/html request could not be completed, because of invalid data in the request
    Response body

    None

    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by