Jump to: navigation, search

Subscribe To Workbin Notifications

This operation is part of the Workbins API section of the Web Services API.

Overview

Agent can observe what is happening in a workbin by subscribing to a Workbin's CometD notifications.

Samples

Subscribe to Workbin Notifications

Request URL /api/v2/me/workbins/{workbinId}

OR
/api/v2/workbins/{workbinId}

HTTP Method POST
Required Features api-multimedia

Request

POST api/v2/me/workbins/aee812a5-7396-4dd9-b180-230f1c1fb085
{
  "operationName": "Subscribe"
}

HTTP Response

{
   "statusCode": 0,
   "referenceId": 14
}

CometD Response

{
    "stateResource": "Subscribed",
    "id': "aee812a5-7396-4dd9-b180-230f1c1fb085",
    "messageType': "WorkbinSubscriptionStateChangeMessage"
}

Subscribe to Multiple Workbin Notifications

Request URL /api/v2/me/workbins?workbinIds=workbinId1,workbinId2,...

OR
/api/v2/workbins?workbinIds=workbinId1,workbinId2,...

HTTP Method POST
Required Features api-multimedia

Request

POST /api/v2/me/workbins?workbinIds=aee812a5-7396-4dd9-b180-230f1c1fb085,a91ee1c2-9cfe-43b6-8193-fd39cd89d5b4
{
  "operationName": "Subscribe"
}

HTTP Response

{
    "statusCode": 0,
    "referenceIds": {
        "a91ee1c2-9cfe-43b6-8193-fd39cd89d5b4": 57,
        "aee812a5-7396-4dd9-b180-230f1c1fb085": 56
    }
}

CometD Responses

{
    "stateResource": "Subscribed",
    "id': "aee812a5-7396-4dd9-b180-230f1c1fb085",
    "messageType': "WorkbinSubscriptionStateChangeMessage"
}
{
    "stateResource": "Subscribed",
    "id': "a91ee1c2-9cfe-43b6-8193-fd39cd89d5b4",
    "messageType': "WorkbinSubscriptionStateChangeMessage"
}

Subscribe to Workbin Notifications by User

Request URL /api/v2/users/{userId}/workbins/{workbinId}
HTTP Method POST
Required Features api-multimedia

Request

POST api/v2/users/e6f2ad1b26ea4e9b8dd907eabe167522/workbins/aee812a5-7396-4dd9-b180-230f1c1fb085
{
  "operationName": "Subscribe"
}

HTTP Response

{
   "statusCode": 0,
   "referenceId": 13
}

CometD Response

{
    "workbinUserId": "e6f2ad1b26ea4e9b8dd907eabe167522",
    "stateResource": "Subscribed",
    "id": "aee812a5-7396-4dd9-b180-230f1c1fb085",
    "messageType": "WorkbinSubscriptionStateChangeMessage"
}

Subscribe to Multiple Workbin Notifications by User

Request URL /api/v2/users/{userId}/workbins?workbinIds=workbinId1,workbinId2,...
HTTP Method POST
Required Features api-multimedia

Request

POST /api/v2/users/e6f2ad1b26ea4e9b8dd907eabe167522/workbins?workbinIds=aee812a5-7396-4dd9-b180-230f1c1fb085,
aee812a5-7396-4dd9-b180-230f1c1fb085
{
  "operationName": "Subscribe"
}

HTTP Response

{
    "statusCode": 0,
    "referenceIds": {
        "a91ee1c2-9cfe-43b6-8193-fd39cd89d5b4": 133,
        "aee812a5-7396-4dd9-b180-230f1c1fb085": 134
    }
}

CometD Responses

{
    "stateResource": "Subscribed",
    "id': "aee812a5-7396-4dd9-b180-230f1c1fb085",
    "messageType': "WorkbinSubscriptionStateChangeMessage"
}
{
    "stateResource": "Subscribed",
    "id': "a91ee1c2-9cfe-43b6-8193-fd39cd89d5b4",
    "messageType': "WorkbinSubscriptionStateChangeMessage"
}
This page was last edited on March 25, 2016, at 18:23.
Comments or questions about this documentation? Contact us for support!