(Auto-creation of topic Documentation:HTCC:API:TwitterSave:8.5.2DRAFT via TOC Documentation:HTCC:APITOC8.5.2DRAFT) |
|||
Line 1: | Line 1: | ||
− | = | + | =Save= |
+ | __NOTOC__ | ||
+ | This operation is part of the [[Twitter|Twitter API]] section of the [[Welcome|Genesys Web Services REST API]]. | ||
+ | ==Overview== | ||
+ | Saves a Twitter interaction. | ||
+ | {| | ||
+ | ! Request URL | ||
+ | | /api/v2/me/twitter/{id} | ||
+ | |- | ||
+ | ! HTTP Method | ||
+ | | POST | ||
+ | |- | ||
+ | ! Required Features | ||
+ | | api-multimedia | ||
+ | |} | ||
+ | ==Parameters== | ||
+ | {| | ||
+ | ! Parameter | ||
+ | ! Value | ||
+ | |- | ||
+ | | operationName | ||
+ | | Save | ||
+ | |- | ||
+ | | twitter | ||
+ | | Specified data with twitter parameters. (optional) | ||
+ | |} | ||
+ | ===Twitter Parameters=== | ||
+ | {| | ||
+ | ! Parameter | ||
+ | ! Value | ||
+ | |- | ||
+ | | from | ||
+ | | A user name for a Twitter account. | ||
+ | |- | ||
+ | | message | ||
+ | | The actual message to send. The body should be plain text. | ||
+ | |} | ||
+ | |||
+ | ==Samples== | ||
+ | ===Request Without a Twitter Resource=== | ||
+ | ====Request==== | ||
+ | <source lang="text"> | ||
+ | POST api/v2/me/twitter/01QQQG2MU214P066 | ||
+ | { | ||
+ | "operationName": "Save" | ||
+ | } | ||
+ | </source> | ||
+ | ====HTTP Response==== | ||
+ | <source lang="text"> | ||
+ | { | ||
+ | "statusCode": 0 | ||
+ | } | ||
+ | </source> | ||
+ | ====CometD Response==== | ||
+ | The following notification is received after a saving an empty outbound message. | ||
+ | <source lang="text"> | ||
+ | {"messageType": "TwitterStateChangeMessage", | ||
+ | "notificationType": "TwitterSaved", | ||
+ | "referenceId": 40, | ||
+ | "twitter": {"capabilities": ["Cancel", | ||
+ | "Send", | ||
+ | "AddComment", | ||
+ | "AttachUserData", | ||
+ | "UpdateUserData", | ||
+ | "DeleteUserData", | ||
+ | "SetDisposition", | ||
+ | "SetInFocus", | ||
+ | "Transfer"], | ||
+ | "id": "01QQQG2MU214P066", | ||
+ | "state": "Composing", | ||
+ | "twitterType": "Outbound", | ||
+ | "uri": "http://192.168.83.25:8080/api/v2/twitters/01QQQG2MU214P066", | ||
+ | "userData": {"UserData2": 123456789}}} | ||
+ | </source> | ||
+ | |||
+ | ===Request With a Twitter Resource=== | ||
+ | ====Request==== | ||
+ | <source lang="text"> | ||
+ | POST api/v2/me/twitter/01QQQG2MU214P069 | ||
+ | { | ||
+ | "operationName": "Save", | ||
+ | "twitter" : | ||
+ | { | ||
+ | "from": "vitaliy_onv", | ||
+ | "message": "Hello saved twitter!" | ||
+ | } | ||
+ | } | ||
+ | </source> | ||
+ | ====HTTP Response==== | ||
+ | <source lang="text"> | ||
+ | { | ||
+ | "statusCode": 0 | ||
+ | } | ||
+ | </source> | ||
+ | ====CometD Response==== | ||
+ | The following notification is received after a saving a new outbound message with a Twitter resource. | ||
+ | <source lang="text"> | ||
+ | {"messageType": "TwitterStateChangeMessage", | ||
+ | "notificationType": "TwitterSaved", | ||
+ | "referenceId": 16, | ||
+ | "twitter": {"capabilities": ["Cancel", | ||
+ | "Send", | ||
+ | "AddComment", | ||
+ | "AttachUserData", | ||
+ | "UpdateUserData", | ||
+ | "DeleteUserData", | ||
+ | "SetDisposition", | ||
+ | "SetInFocus", | ||
+ | "Transfer"], | ||
+ | "from": "vitaliy_onv", | ||
+ | "id": "01QQQG2MU214P069", | ||
+ | "message": "Hello saved twitter!", | ||
+ | "state": "Composing", | ||
+ | "subject": "Hello saved twitter!", | ||
+ | "twitterType": "Outbound", | ||
+ | "uri": "http://192.168.83.25:8080/api/v2/twitters/01QQQG2MU214P069", | ||
+ | "userData": {"FromAddress": "vitaliy_onv", | ||
+ | "UserData2": 123456789}}} | ||
+ | </source> | ||
[[Category:V:HTCC:8.5.2DRAFT]] | [[Category:V:HTCC:8.5.2DRAFT]] |
Revision as of 14:40, March 5, 2015
Save
This operation is part of the Twitter API section of the Genesys Web Services REST API.
Overview
Saves a Twitter interaction.
Request URL | /api/v2/me/twitter/{id} |
---|---|
HTTP Method | POST |
Required Features | api-multimedia |
Parameters
Parameter | Value |
---|---|
operationName | Save |
Specified data with twitter parameters. (optional) |
Twitter Parameters
Parameter | Value |
---|---|
from | A user name for a Twitter account. |
message | The actual message to send. The body should be plain text. |
Samples
Request Without a Twitter Resource
Request
POST api/v2/me/twitter/01QQQG2MU214P066
{
"operationName": "Save"
}
HTTP Response
{
"statusCode": 0
}
CometD Response
The following notification is received after a saving an empty outbound message.
{"messageType": "TwitterStateChangeMessage",
"notificationType": "TwitterSaved",
"referenceId": 40,
"twitter": {"capabilities": ["Cancel",
"Send",
"AddComment",
"AttachUserData",
"UpdateUserData",
"DeleteUserData",
"SetDisposition",
"SetInFocus",
"Transfer"],
"id": "01QQQG2MU214P066",
"state": "Composing",
"twitterType": "Outbound",
"uri": "http://192.168.83.25:8080/api/v2/twitters/01QQQG2MU214P066",
"userData": {"UserData2": 123456789}}}
Request With a Twitter Resource
Request
POST api/v2/me/twitter/01QQQG2MU214P069
{
"operationName": "Save",
"twitter" :
{
"from": "vitaliy_onv",
"message": "Hello saved twitter!"
}
}
HTTP Response
{
"statusCode": 0
}
CometD Response
The following notification is received after a saving a new outbound message with a Twitter resource.
{"messageType": "TwitterStateChangeMessage",
"notificationType": "TwitterSaved",
"referenceId": 16,
"twitter": {"capabilities": ["Cancel",
"Send",
"AddComment",
"AttachUserData",
"UpdateUserData",
"DeleteUserData",
"SetDisposition",
"SetInFocus",
"Transfer"],
"from": "vitaliy_onv",
"id": "01QQQG2MU214P069",
"message": "Hello saved twitter!",
"state": "Composing",
"subject": "Hello saved twitter!",
"twitterType": "Outbound",
"uri": "http://192.168.83.25:8080/api/v2/twitters/01QQQG2MU214P069",
"userData": {"FromAddress": "vitaliy_onv",
"UserData2": 123456789}}}
Comments or questions about this documentation? Contact us for support!