Jump to: navigation, search
(Create)
(Update with the copy of version: 8.5.2DRAFT)
Line 1: Line 1:
 
=Create=
 
=Create=
 
__NOTOC__
 
__NOTOC__
This operation can be performed to create a new interaction of type Twitter. The new interaction data will arrive via CometD notification.
+
This operation is part of the [[Twitter|Twitter API]] section of the [[Welcome|Genesys Web Services REST API]].
 +
==Overview==
 +
Creates a new empty Twitter interaction.
 +
{|
 +
! Request URL
 +
| /api/v2/me/twitter
 +
|-
 +
! HTTP Method
 +
| POST
 +
|-
 +
! Required Features
 +
| api-multimedia
 +
|}
  
== HTTP Request ==
+
==Parameters==
 +
{|
 +
! Parameter
 +
! Value
 +
|-
 +
| operationName
 +
| Create
 +
|-
 +
| queuePath
 +
|  The URI of the queue where GWS should place this Twitter interaction.
 +
|-
 +
| userData
 +
| The key value data to attach. (optional)
 +
|}
  
POST on '''/me/interactions/'''
+
==Samples==
<pre>
+
===Request===
 +
<source lang="text">
 +
POST /api/v2/me/twitter
 
{
 
{
   "operationName":"Create",
+
   "operationName": "Create",
   "queueName":name-of-queue-where to store the interaction (e.g. Twitter Outbound Queue),
+
   "queuePath": "/queues/995655ec-81a5-46b0-82d0-3f2c5eca263d"
  "channel":"Twitter"
 
  "interactionType":type of the interaction to be created (e.g. Outbound),
 
  "interactionSubType":subtype of the interaction to be crated (e.g. OutboundNew)
 
 
}
 
}
</pre>
+
</source>
== HTTP Response ==
 
  
===Success===
+
===HTTP Response===
<pre>
+
<source lang="text">
 
{
 
{
   "statusCode": 0
+
   "statusCode": 0,
 +
  "referenceId":10,
 
}
 
}
</pre>
+
</source>
===Failure===
+
===CometD Response===
<pre>
+
<source lang="text">
{
+
{
  "statusCode": an integer value above 0,
+
  "messageType":"TwitterStateChangeMessage",
  "statusMessage":details
+
  "notificationType":"StatusChange",
 +
  "referenceId":10,
 +
  "twitter":{ 
 +
      "capabilities":[ 
 +
        "Cancel",
 +
        "Send",
 +
        "AddComment",
 +
        "AttachUserData",
 +
        "UpdateUserData",
 +
        "DeleteUserData",
 +
        "SetDisposition",
 +
        "SetInFocus",
 +
        "Transfer"
 +
      ],
 +
      "id":"01QQQG2MU214P05G",
 +
      "state":"Composing",
 +
      "twitterType":"Outbound",
 +
      "uri":"http://192.168.83.25:8080/api/v2/twitters/01QQQG2MU214P05G"
 +
  }
 
}
 
}
</pre>
+
</source>
  
 +
{|
 +
! '''Field'''
 +
! '''Description'''
 +
|-
 +
| messageType
 +
| The category of message.
 +
|-
 +
| notificationType
 +
| The purpose of the notification.
 +
|-
 +
| twitter
 +
| The element containing all twitter specific data.
 +
|}
  
 
[[Category:V:HTCC:8.5.2]]
 
[[Category:V:HTCC:8.5.2]]

Revision as of 18:40, April 3, 2015

Create

This operation is part of the Twitter API section of the Genesys Web Services REST API.

Overview

Creates a new empty Twitter interaction.

Request URL /api/v2/me/twitter
HTTP Method POST
Required Features api-multimedia

Parameters

Parameter Value
operationName Create
queuePath The URI of the queue where GWS should place this Twitter interaction.
userData The key value data to attach. (optional)

Samples

Request

POST /api/v2/me/twitter
{
  "operationName": "Create",
  "queuePath": "/queues/995655ec-81a5-46b0-82d0-3f2c5eca263d"
}

HTTP Response

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

CometD Response

{  
   "messageType":"TwitterStateChangeMessage",
   "notificationType":"StatusChange",
   "referenceId":10,
   "twitter":{  
      "capabilities":[  
         "Cancel",
         "Send",
         "AddComment",
         "AttachUserData",
         "UpdateUserData",
         "DeleteUserData",
         "SetDisposition",
         "SetInFocus",
         "Transfer"
      ],
      "id":"01QQQG2MU214P05G",
      "state":"Composing",
      "twitterType":"Outbound",
      "uri":"http://192.168.83.25:8080/api/v2/twitters/01QQQG2MU214P05G"
   }
}
Field Description
messageType The category of message.
notificationType The purpose of the notification.
twitter The element containing all twitter specific data.
Comments or questions about this documentation? Contact us for support!