Cisco WebEx Social API Reference Guide, Release 3.0
Post Resource Operations
Downloads: This chapterpdf (PDF - 377.0KB) The complete bookPDF (PDF - 14.42MB) | Feedback

Post Resource Operations

Table Of Contents

Post Resource Operations

Create a Post

Get Information about a Post

Get Information about Posts

Update Information about a Post

Get Information about Attachments for a Post

Add Attachments to a Post

Delete Attachments from a Post

Get Information about a Comment for a Post

Get Information about Comments for a Post

Create a Comment for a Post

Update a Comment for a Post

Delete a Comment from a Post

Get Permissions for a Post

Update Permissions for a Post

Get Users that have Marked a Designated Post as a Favorite

Get Information about Users that Like a Designated Post

Get the Number of Users that Like a Designated Post


Post Resource Operations


A Cisco WebEx Social post lets Cisco WebEx Social users share text, videos, images, links, and files with people, groups, and communities. The Cisco WebEx Social API Post resource operations let you obtain information about posts and perform various operations on posts.

Table 7-1 provides a summary of the Post resource operations. Each operation is described in detail in the section that is listed.

These sections provide this information:

Purpose—Brief explanation of the operation

Availability—Cisco WebEx Social releases that support the operation

Request—HTTP method and URI for the operation

Request Payload—Description of the request payload, if the operation requires one

Response—Description of the expected response when the operation executes

Examples—Sample requests and responses for the operation

Table 7-1 Post Resource Operations Summary 

Operation and Reference
Purpose

Create a Post

Creates a new Cisco WebEx Social post

Get Information about a Post

Retrieves information about the designated post

Get Information about Posts

Retrieves information about one or more posts

Update Information about a Post

Updates information about the designated post

Get Information about Attachments for a Post

Retrieve information about all attachments for the designated post

Add Attachments to a Post

Adds attachments to the designated post

Delete Attachments from a Post

Deletes all attachments from the designated post

Get Information about a Comment for a Post

Retrieves information about the designated comment for the designated post

Get Information about Comments for a Post

Retrieves information about the comments that have been added to the designated post

Create a Comment for a Post

Creates a comment for the designated post and adds the comment to the post

Update a Comment for a Post

Updates the designated comment for the designated post

Delete a Comment from a Post

Deletes the designated comment from the designated post

Get Permissions for a Post

Retrieves the permissions that have been assigned to the designated post

Update Permissions for a Post

Updates permissions for the designated post

Get Users that have Marked a Designated Post as a Favorite

Retrieves Favorite resources that have as the destination the users that have marked the designated post as a favorite

Get Information about Users that Like a Designated Post

Retrieves Like resources that have as the destination the users that like the designated post

Get the Number of Users that Like a Designated Post

Retrieves the number of Like resources that have as the destination the users that like the designated post


Create a Post

Purpose

Creates a new Cisco WebEx Social post.

Availability

Cisco WebEx Social 3.0 and later.

Request

HTTP Method
URI

POST

http://server[:port_number]/api/quad/rest/posts[?query_parameters]


where:

server

Host name or IP address of the Cisco WebEx Social server.

port_number

Cisco WebEx Social server port number that is used for communication with the API consumer. Must be provided if the port number is not 80.

query_parameters

Query parameters. See the "Query Parameters" section for information about using query parameters. For this operation:

The fields query parameter is supported for selecting fields from the Post resource to include in a response (Table 3-26 describes these fields).

The filterBy query parameter is not supported for filtering resources in a response.

The sortOrder query parameter does not apply.

The startIndex query parameter does not apply.

The count query parameter does not apply.

The meta query parameter is supported with the like and the favorite values for requesting relationship metadata.

The special query parameter destUsers=user_id_1[,...[user_id_n]] is supported when the type field in the Post resource is MICRO. This parameter adds the new micropost to the walls of the users with the designated user identifiers. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section

The special query parameter showOnProfile={true|false} is supported when the type field in the Post resource is TEXT. This query parameter designates whether a new post is added to the MyBlog page of all Cisco WebEx Social users.

query_parameters

(continued)

The special query parameter destComm=community_id_1[,...[community_id_n]] is supported when the type field in the Post resource is MICRO. This query parameter adds the new micropost to the walls of the communities with the designated community identifiers. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section

The special query parameter postExternal={true|false} is supported when the type field in the Post resource is MICRO. This query parameter designates whether the new micropost is added to an external application.


Request Payload

The request payload includes fields from the Post resource (Table 3-26 describes these fields):

Required Fields
Optional Fields

title1

body
defaultPermissions
permissions
publicPost
tags
type2

1 Required for a TEXT type post. Optional for other post types.

2 If you do not specify a value for the type field, the post defaults to the TEXT type.


Response

Standard response (see the "API Responses" section) with a response payload that can include one Post resource (the "Post Resource" section describes this resource). XML and JSON formats are supported.

XML Example

Request
POST http://webexsocialserver/api/quad/rest/posts
Accept:application/xml
Content-Type: application/xml
 
   
<post>
   <title>New Employee</title>
   <body>Please welcome our new employee.</body>
   <type>TEXT</type>
   <permissions>
      <principal>
         <id>12345</id>
         <resource>http://quad.cisco.com/schema/1.0/community</resource>
      </principal>
      <permissionFlags>
         <view>true</view>
         <edit>false</edit>
         <comment>true</comment>
         <share>false</share>
         <authorize>true</authorize>
      </permissionFlags>
   </permissions>
</post>

Response

HTTP/1.1 201 Created
Content-Type application/xml
Location: http://webexsocialserver/api/quad/rest/posts/500001

The response can also include the Post resource. For an example, see the "Post Resource Response: XML Format, One Resource Returned" section.

JSON Example

Request
POST http://webexsocialserver/api/quad/rest/posts
Accept:application/json
Content-Type: application/json
{
 
   
    "title":"New Employee",
    "body":"Please welcome our new employee.",
    "type":"TEXT"
    "permissions": {
        "principal":{
            "id":"12345",
            "resource":"http://quad.cisco.com/schema/1.0/user"
        },
        "permissionFlags":{
            "view":"true",
            "edit":"false",
            "comment":"true",
            "share":"true",
            "authorize":"false"
        } },
    "tags":[{"name":"tag2"},{"name":"tag3"}, {"name":"tag4"}]
}

Response

HTTP/1.1 201 Created
Content-Type application/json
Location: http://webexsocialserver/api/quad/rest/posts/500001

The response can also include the Post resource. For an example, see the "Post Resource Response: JSON Format, One Resource Returned" section.

Get Information about a Post

Purpose

Retrieves information about the designated post.

Availability

Cisco WebEx Social 3.0 and later.

Request

HTTP Method
URI

GET

http://server[:port_number]/api/quad/rest/posts/post_id[?query_parameters]


where:

server

Host name or IP address of the Cisco WebEx Social server.

port_number

Cisco WebEx Social server port number that is used for communication with the API consumer. Must be provided if the port number is not 80.

post_id

Identifier of the post for which to retrieve detailed information. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.

query_parameters

Query parameters. See the "Query Parameters" section for information about using query parameters. For this operation:

The fields query parameter is supported for selecting fields from the Post resource to include in a response (Table 3-26 describes these fields)

The filterBy query parameter is supported only with the version field in the Post resource

The sortOrder query parameter does not apply

The startIndex query parameter does not apply

The count query parameter does not apply

The meta query parameter is supported with the like and the favorite values for requesting relationship metadata

The special query parameter readPost={true|false} designates whether the system marks a post as read when a client retrieves the post from the server


Request Payload

A request payload is not required.

Response

Standard response (see the "API Responses" section) with a response payload that can include one Post resource (the "Post Resource" section describes this resource). XML and JSON formats are supported.

XML Example

Request

GET http://webexsocialserver/api/quad/rest/posts/100001
Accept:application/xml

Response

HTTP/1.1 200 OK
Content-Type: application/xml
 
   

The response can also include the Post resource. For an example, see the "Post Resource Response: XML Format, One Resource Returned" section.

JSON Example

Request

GET http://webexsocialserver/api/quad/rest/posts/100001
Accept:application/json

Response

HTTP/1.1 200 OK
Content-Type: application/json
 
   

The response can also include the Post resource. For an example, see the "Post Resource Response: JSON Format, One Resource Returned" section.

Get Information about Posts

Purpose

Retrieves information about one or more posts.

Availability

Cisco WebEx Social 3.0 and later.

Request

HTTP Method
URI

GET

http://server[:port_number]/api/quad/rest/posts/post_id[,...[post_id]]
[?query_parameters]


where:

server

Host name or IP address of the Cisco WebEx Social server.

port_number

Cisco WebEx Social server port number that is used for communication with the API consumer. Must be provided if the port number is not 80.

post_id

Identifier of a post about which to retrieve information. When specifying multiple identifiers, separate each one with a comma. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.

query_parameters

Query parameters. See the "Query Parameters" section for information about using query parameters. For this operation:

The fields query parameter is supported for selecting fields from the Post resource to include in a response (Table 3-26 describes these fields)

The filterBy query parameter is not supported for filtering resources in a response

The sortOrder query parameter is not supported for sorting resources in a response

The startIndex query parameter is supported for paginating return results

The count query parameter is supported for designating the maximum number of items in the return results

The meta query parameter is supported with the like and the favorite values for requesting relationship metadata


Request Payload

A request payload is not required.

Response

Standard response (see the "API Responses" section) with a response payload that can include one or more Post resources (the "Post Resource" section describes this resource). XML, JSON, and Atom formats are supported.

XML Example

Request
GET http://webexsocialserver/api/quad/rest/posts/100001,400005
Accept:application/xml

Response

HTTP/1.1 200 OK
Content-Type: application/xml
 
   

The response can also include the Post resource. For an example, see the "Post Resource Response: XML Format, Multiple Resources Returned" section.

JSON Example

Request
GET http://webexsocialserver/api/quad/rest/posts/100001,400005
Accept:application/json

Response

The response can also include the Post resource. For an example, see the "Post Resource Response: JSON Format, Multiple Resources Returned" section.

Atom Example

Request

GET http://webexsocialserver/api/quad/rest/posts/100001,400005
Accept: application/atom+xml

Response

HTTP/1.1 200 OK
Content-Type: application/json
 
   

The response can also include the Post resource. For an example, see the "Post Resource Response: Atom Format, Multiple Resources Returned" section.

Update Information about a Post

Purpose

Updates information about the designated post.

You can use this operation to delete a post by setting the state field to DELETED in the request payload.

Availability

Cisco WebEx Social 3.0 and later.

Request

HTTP Method
URI

PUT

http://server[:port_number]/api/quad/rest/posts/post_id[?query_parameters]


where:

server

Host name or IP address of the Cisco WebEx Social server.

port_number

Cisco WebEx Social server port number that is used for communication with the API consumer. Must be provided if the port number is not 80.

post_id

Identifier of the post for which to update information. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.

query_parameters

Query parameters. See the "Query Parameters" section for information about using query parameters. For this operation:

The fields query parameter is supported for selecting fields from the Post resource to include in a response (Table 3-26 describes these fields)

The filterBy query parameter is not supported for filtering resources in a response

The sortOrder query parameter does not apply

The startIndex query parameter does not apply

The count query parameter does not apply

The meta query parameter does not apply


Request Payload

The request payload includes fields from the Post resource (Table 3-26 describes these fields):

Required Fields
Optional Fields

attachments
body
permissions
publicPost
state
tags
title


Response

Standard response (see the "API Responses" section) with an HTTP header only.

XML Example

Request

PUT http://webexsocialserver/api/quad/rest/posts/100001
Accept:application/xml
Content-Type: application/xml
 
   
<post>
  <body>This text is the body of the post.</body>
</post>

Response

HTTP/1.1 204 No Content

JSON Example

Request

PUT http://webexsocialserver/api/quad/rest/posts/100001
Accept:application/json
Content-Type: application/json
 
   
{
 
   
    "body":"This text is the body of the post."
 
   
}

Response

HTTP/1.1 204 No Content

Get Information about Attachments for a Post

Purpose

Retrieve information about all attachments for the designated post.

Availability

Cisco WebEx Social 3.0 and later.

Request

HTTP Method
URI

GET

http://server[:port_number]/api/quad/rest/posts/post_id/attachments
[?query_parameters]


where:

server

Host name or IP address of the Cisco WebEx Social server.

port_number

Cisco WebEx Social server port number that is used for communication with the API consumer. Must be provided if the port number is not 80.

post_id

Identifier of the post for which to retrieve information about attachments. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.

query_parameters

Query parameters. See the "Query Parameters" section for information about using query parameters. For this operation:

The fields query parameter is supported for selecting fields from the Attachment resource to include in a response (Table 3-4 describes these fields)

The filterBy query parameter is not supported for filtering resources in a response

The sortOrder query parameter is not supported for sorting resources in a response

The startIndex query parameter is supported for paginating return results

The count query parameter is supported for designating the maximum number of items in the return results

The meta query parameter does not apply


Request Payload

A request payload is not required.

Response

Standard response (see the "API Responses" section) with a response payload that can include one or more Attachment resources (the "Attachment Resource" section describes this resource). XML and JSON formats are supported.

XML Example

Request

GET http://quadserver//api/quad/rest/posts/14/attachments
Accept:application/xml

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 380
Content-Type: application/xml
 
   
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:response xmlns:ns2="http://quad.cisco.com/ns/1.0/xml">
  <statusCode>200</statusCode>
  <startIndex>0</startIndex>
  <itemsPerPage>1</itemsPerPage>
  <totalResults>0</totalResults>
  <filtered>false</filtered>
  <sorted>false</sorted>
  <entry>
    <attachment>
      <fileName>322675-retro-apple-tv.jpg</fileName>
      <id>2310090</id>
      <mimeType>DOCUMENT</mimeType>
      <published>1319673960078</published>
      <resource/>
      <size>27571</size>
      <updated>1319673960078</updated>
      <uri>/c/post_action/get_attachment?postId=14&amp;attachmentId=2310090</uri>
    </attachment>
  </entry>
</ns2:response>

JSON Example

Request

GET http://quadserver//api/quad/rest/posts/14/attachments
Accept:application/json

Response

HTTP/1.1 200 OK
Content-Length: 380
Content-Type: application/json
 
   
{ 
    "statusCode": 200, 
    "startIndex": 0, 
    "itemsPerPage": 1, 
    "totalResults": 0,
    "filtered": false, 
    "sorted": false, 
    "entry": [
        { 
            "data": { 
                "author": null, 
                "fileName": "322675-retro-apple-tv.jpg", 
                "id": 2310090, 
                "mimeType": "DOCUMENT", 
                "published": 1319673960078, 
                "resource": "", 
                "size": 27571, 
                "updated": 1319673960078, 
                "uri": "/c/post_action/get_attachment?postId=14&attachmentId=2310090"
            }
        }
    ], 
    "serverMessages": null
}

Add Attachments to a Post

Purpose

Adds attachments to the designated post.

Availability

Cisco WebEx Social 3.0 and later.

Request

HTTP Method
URI

POST

http://server[:port_number]/api/quad/rest/posts/post_id/attachments[?fileName=filname]


where:

server

Host name or IP address of the Cisco WebEx Social server.

port_number

Cisco WebEx Social server port number that is used for communication with the API consumer. Must be provided if the port number is not 80.

post_id

Identifier of the post for which to add attachments. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.

filname

Name of a file that overrides the file that is specified in the request payload.

The fileName parameter is required if you are using Internet Explorer to send this API operation.


Request Payload

Attachment to be uploaded.

The HTTP Content-Type header must be multipart/form-data for this request. The form-data key must be specified as file=attachment_to_upload. If you are uploading a video, single-sign on (SSO) must be enabled in Cisco WebEx Social before you execute this operation.

Response

Standard response (see the "API Responses" section) with a response payload that can include one Attachment resource (the "Attachment Resource" section describes this resource). XML and JSON formats are supported.

XML Example

Request

POST http://webexsocialserver/api/quad/rest/posts/14/attachments
accept: application/xml
content-length: 87899
 
   
expect: 100-continue
content-type: multipart/form-data; boundary=----------------------------02a4bb521c19
------------------------------02a4bb521c19
Content-Disposition: form-data; name="file"; filename="ProfilePhoto.jpg"
Content-Type: image/jpeg
<binary_file>
------------------------------02a4bb521c19--

Response

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://webexsocialserver/api/quad/rest/posts/500001/attachments/2310090
 
   
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:response xmlns:ns2="http://quad.cisco.com/ns/1.0/xml">
  <statusCode>200</statusCode>
  <startIndex>0</startIndex>
  <itemsPerPage>1</itemsPerPage>
  <totalResults>0</totalResults>
  <filtered>false</filtered>
  <sorted>false</sorted>
  <entry>
    <attachment>
      <fileName>322675-retro-apple-tv.jpg</fileName>
      <id>2310090</id>
      <mimeType>DOCUMENT</mimeType>
      <published>1319673960078</published>
      <resource/>
      <size>27571</size>
      <updated>1319673960078</updated>
      <uri>/c/post_action/get_attachment?postId=14&amp;attachmentId=2310090</uri>
    </attachment>
  </entry>
</ns2:response>

JSON Example

Request

POST http://webexsocialserver/api/quad/rest/posts/14/attachments
accept: application/json
content-length: 87899
 
   
expect: 100-continue
content-type: multipart/form-data; boundary=----------------------------02a4bb521c19
------------------------------02a4bb521c19
Content-Disposition: form-data; name="file"; filename="ProfilePhoto.jpg"
Content-Type: image/jpeg
<binary_file>
------------------------------02a4bb521c19--
Response
HTTP/1.1 201 Created
Content-Type: application/json
Location: http://webexsocialserver/api/quad/rest/posts/500001/attachments/2310090
 
   
{ 
    "statusCode": 200, 
    "startIndex": 0, 
    "itemsPerPage": 1, 
    "totalResults": 0,
    "filtered": false, 
    "sorted": false, 
    "entry": [
        { 
            "data": { 
                "author": null, 
                "fileName": "322675-retro-apple-tv.jpg", 
                "id": 2310090, 
                "mimeType": "DOCUMENT", 
                "published": 1319673960078, 
                "resource": "", 
                "size": 27571, 
                "updated": 1319673960078, 
                "uri": "/c/post_action/get_attachment?postId=14&attachmentId=2310090"
            }
        }
    ], 
    "serverMessages": null
}

Delete Attachments from a Post

Purpose

Deletes all attachments from the designated post.

Availability

Cisco WebEx Social 3.0 and later.

Request

HTTP Method
URI

DELETE

http://server[:port_number]/api/quad/rest/posts/post_id/attachments


where:

server

Host name or IP address of the Cisco WebEx Social server.

port_number

Cisco WebEx Social server port number that is used for communication with the API consumer. Must be provided if the port number is not 80.

post_id

Identifier of the post for which to delete attachments. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.


Request Payload

A request payload is not required.

Response

Standard response (see the "API Responses" section) with an HTTP header only.

Example

Request

DELETE http://webexsocialserver/api/quad/rest/posts/14/attachments

Response

HTTP/1.1 200 OK

Get Information about a Comment for a Post

Purpose

Retrieves information about the designated comment for the designated post.

Availability

Cisco WebEx Social 3.0 and later.

Request

HTTP Method
URI

GET

http://server[:port_number]/api/quad/rest/posts/post_id/comments/comment_id
[?query_parameters]


where:

server

Host name or IP address of the Cisco WebEx Social server.

port_number

Cisco WebEx Social server port number that is used for communication with the API consumer. Must be provided if the port number is not 80.

post_id

Identifier of the post for which to retrieve information about the comment. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.

comment_id

Identifier of the comment to retrieve. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.

query_parameters

Query parameters. See the "Query Parameters" section for information about using query parameters. For this operation:

The fields query parameter is supported for selecting fields from the PostComment resource to include in a response (Table 3-27 describes these fields)

The filterBy query parameter is not supported for filtering resources in a response

The sortOrder query parameter does not apply

The startIndex query parameter does not apply

The count query parameter does not apply

The meta query parameter does not apply


Request Payload

A request payload is not required.

Response

Standard response (see the "API Responses" section) with a response payload that can include one PostComment resource (the "PostComment Resource" section describes this resource). XML and JSON formats are supported.

XML Example

Request

GET http://webexsocialserver/api/quad/rest/posts/100001/comments/1234
Accept:application/xml

Response

HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:response xmlns:ns2="http://quad.cisco.com/ns/1.0/xml">
  <statusCode>200</statusCode>
  <startIndex>0</startIndex>
  <itemsPerPage>1</itemsPerPage>
  <totalResults>0</totalResults>
  <filtered>false</filtered>
  <sorted>false</sorted>
  <entry>
    <comment>
      <body>comment1</body>
      <createDate>1316789154239</createDate>
      <creator>
        <firstName>Pat</firstName>
        <fullName>Pat Kim</fullName>
        <id>1234</id>
        <jobTitle/>
        <lastName>Kim</lastName>
        <screenName>patkim</screenName>
      </creator>
      <id>910001</id>
      <modifiedDate>1316789154239</modifiedDate>
      <parentMessageId>310001</parentMessageId>
      <replyCount>0</replyCount>
      <resource>http://quad.cisco.com/schema/1.0/postcomment</resource>
    </comment>
  </entry>
</ns2:response>

JSON Example

Request

GET http://webexsocialserver/api/quad/rest/posts/100001/comments/1234
Accept:application/json

Response

HTTP/1.1 200 OK
Content-Type: application/json
{
      "statusCode": 200, 
      "startIndex": 0, 
      "itemsPerPage": 1, 
      "totalResults": 0,
      "filtered": false, 
      "sorted": false, 
      "entry": [
            {
                  "data": {
                        "body": "comment1", 
                        "createDate": 1316789154239, 
                        "creator": {
                              "firstName": "Pat", 
                              "fullName": "Pat Kim", 
                              "id": 1234, 
                              "images": [ ], 
                              "jobTitle": "", 
                              "lastName": "Kim", 
                              "screenName": "patkim"
                        }, 
                        "id": 910001, 
                        "modifiedDate": 1316789154239, 
                        "parentMessageId": 310001, 
                        "replyCount": 0, 
                        "resource": "http://quad.cisco.com/schema/1.0/postcomment"
                  }
            }
      ], 
      "serverMessages": null
}

Get Information about Comments for a Post

Purpose

Retrieves information about the comments that have been added to the designated post.

Availability

Cisco WebEx Social 3.0 and later.

Request

HTTP Method
URI

GET

http://server[:port_number]/api/quad/rest/posts/post_id/comments
[?query_parameters]


where:

server

Host name or IP address of the Cisco WebEx Social server.

port_number

Cisco WebEx Social server port number that is used for communication with the API consumer. Must be provided if the port number is not 80.

post_id

Identifier of the post for which to retrieve information about comments. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.

query_parameters

Query parameters. See the "Query Parameters" section for information about using query parameters. For this operation:

The fields query parameter is supported for selecting fields from the PostComment resource to include in a response (Table 3-27 describes these fields)

The filterBy query parameter is not supported for filtering resources in a response

The sortOrder query parameter is not supported for sorting resources in a response

The startIndex query parameter is supported for paginating return results

The count query parameter is supported for designating the maximum number of items in the return results

The meta query parameter does not apply


Request Payload

A request payload is not required.

Response

Standard response (see the "API Responses" section) with a response payload that can include one or more PostComment resources (the "PostComment Resource" section describes this resource). XML and JSON formats are supported.

XML Example

Request

GET http://webexsocialserver/api/quad/rest/posts/400006/comments
Accept:application/xml

Response

HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:response xmlns:ns2="http://quad.cisco.com/ns/1.0/xml">
  <statusCode>200</statusCode>
  <startIndex>0</startIndex>
  <itemsPerPage>1</itemsPerPage>
  <totalResults>0</totalResults>
  <filtered>false</filtered>
  <sorted>false</sorted>
  <entry>
    <comment>
      <body>comment1</body>
      <createDate>1316789154239</createDate>
      <creator>
        <firstName>Pat</firstName>
        <fullName>Pat Kim</fullName>
        <id>1234</id>
        <jobTitle/>
        <lastName>Kim</lastName>
        <screenName>patkim</screenName>
      </creator>
      <id>910001</id>
      <modifiedDate>1316789154239</modifiedDate>
      <parentMessageId>310001</parentMessageId>
      <replyCount>0</replyCount>
      <resource>http://quad.cisco.com/schema/1.0/postcomment</resource>
    </comment>
  </entry>
  <entry>
    <comment>
      <body>comment1</body>
      <createDate>1316789154239</createDate>
      <creator>
        <firstName>Robin</firstName>
        <fullName>Robin Smith</fullName>
        <id>9876</id>
        <jobTitle/>
        <lastName>Smith</lastName>
        <screenName>robinsmith</screenName>
      </creator>
      <id>910002</id>
      <modifiedDate>1316789154239</modifiedDate>
      <parentMessageId>310001</parentMessageId>
      <replyCount>0</replyCount>
      <resource>http://quad.cisco.com/schema/1.0/postcomment</resource>
    </comment>
  </entry>
</ns2:response>

JSON Example

Request

GET http://webexsocialserver/api/quad/rest/posts/400006/comments
Accept:application/json

Response

HTTP/1.1 200 OK
Content-Type: application/json
{
      "statusCode": 200, 
      "startIndex": 0, 
      "itemsPerPage": 1, 
      "totalResults": 0,
      "filtered": false, 
      "sorted": false, 
      "entry": [
            {
                  "data": {
                        "body": "comment1", 
                        "createDate": 1316789154239, 
                        "creator": {
                              "firstName": "Pat", 
                              "fullName": "Pat Kim", 
                              "id": 11234, 
                              "images": [ ], 
                              "jobTitle": "", 
                              "lastName": "Kim", 
                              "screenName": "patkim"
                        }, 
                        "id": 910001, 
                        "modifiedDate": 1316789154239, 
                        "parentMessageId": 310001, 
                        "replyCount": 0, 
                        "resource": "http://quad.cisco.com/schema/1.0/postcomment"
                  }
            },
           {
                  "data": {
                        "body": "comment1", 
                        "createDate": 1316789154239, 
                        "creator": {
                              "firstName": "Robin", 
                              "fullName": "Robin Smith", 
                              "id": 9876, 
                              "images": [ ], 
                              "jobTitle": "", 
                              "lastName": "Smith", 
                              "screenName": "RmbinSmith"
                        }, 
                        "id": 910002, 
                        "modifiedDate": 1316789154239, 
                        "parentMessageId": 310001, 
                        "replyCount": 0, 
                        "resource": "http://quad.cisco.com/schema/1.0/postcomment"
                  }
            }
], 
      "serverMessages": null
}

Create a Comment for a Post

Purpose

Creates a comment for the designated post and adds the comment to the post.

Availability

Cisco WebEx Social 3.0 and later.

Request

HTTP Method
URI

POST

http://server[:port_number]/api/quad/rest/posts/post_id/comments


where:

server

Host name or IP address of the Cisco WebEx Social server.

port_number

Cisco WebEx Social server port number that is used for communication with the API consumer. Must be provided if the port number is not 80.

post_id

Identifier of the post for which to create the comment. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.


Request Payload

The request payload includes fields from the PostComment resource (Table 3-28 describes these fields):

Required Fields
Optional Fields

body


Response

Standard response (see the "API Responses" section) with a response payload that can include one PostComment resource (the "PostComment Resource" section describes this resource). XML and JSON formats are supported.

XML Example

Request

POST http://webexsocialserver/api/quad/rest/posts/400006/comments
Accept:application/xml
Content-Type: application/xml
 
   
<comment>
  <body>New comment</body>
</comment>

Response

HTTP/1.1 201 Created
Content-Type application/xml
Location: http://webexsocialserver/api/quad/rest/posts/400006/comments/910001
 
   
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:response xmlns:ns2="http://quad.cisco.com/ns/1.0/xml">
  <statusCode>200</statusCode>
  <startIndex>0</startIndex>
  <itemsPerPage>1</itemsPerPage>
  <totalResults>0</totalResults>
  <filtered>false</filtered>
  <sorted>false</sorted>
  <entry>
    <comment>
      <body>New comment</body>
      <createDate>1316789154239</createDate>
      <creator>
        <firstName>Pat</firstName>
        <fullName>Pat Kim</fullName>
        <id>1234</id>
        <jobTitle/>
        <lastName>Kim</lastName>
        <screenName>patkim</screenName>
      </creator>
      <id>910001</id>
      <modifiedDate>1316789154239</modifiedDate>
      <parentMessageId>310001</parentMessageId>
      <replyCount>0</replyCount>
      <resource>http://quad.cisco.com/schema/1.0/postcomment</resource>
    </comment>
  </entry>
</ns2:response>

JSON Example

Request

POST http://webexsocialserver/api/quad/rest/posts/400006/comments
Accept:application/json
Content-Type: application/json
{
 
   
    "body":"New Comment"
 
   
}

Response

HTTP/1.1 201 Created
Content-Type application/json
Location: http://webexsocialserver/api/quad/rest/posts/400006/comments/910001
 
   
{
      "statusCode": 200, 
      "startIndex": 0, 
      "itemsPerPage": 1, 
      "totalResults": 0,
      "filtered": false, 
      "sorted": false, 
      "entry": [
            {
                  "data": {
                        "body": "New comment", 
                        "createDate": 1316789154239, 
                        "creator": {
                              "firstName": "Pat", 
                              "fullName": "patkim",
                              "id": 1234, 
                              "images": [ ], 
                              "jobTitle": "", 
                              "lastName": "Kim", 
                              "screenName": "patkim"
                        }, 
                        "id": 910001, 
                        "modifiedDate": 1316789154239, 
                        "parentMessageId": 310001, 
                        "replyCount": 0, 
                        "resource": "http://quad.cisco.com/schema/1.0/postcomment"
                  }
            }
      ], 
      "serverMessages": null
}

Update a Comment for a Post

Purpose

Updates the designated comment for the designated post.

Availability

Cisco WebEx Social 3.0 and later.

Request

HTTP Method
URI

PUT

http://server[:port_number]/api/quad/rest/posts/post_id/comments/comment_id


where:

server

Host name or IP address of the Cisco WebEx Social server.

port_number

Cisco WebEx Social server port number that is used for communication with the API consumer. Must be provided if the port number is not 80.

post_id

Identifier of the post for which to update the comment. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.

comment_id

Identifier of the comment to update. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.


Request Payload

The request payload includes fields from the PostComment resource (Table 3-27 describes these fields):

Required Fields
Optional Fields

body


Response

Standard response (see the "API Responses" section) with an HTTP header only.

XML Example

Request

PUT http://webexsocialserver/api/quad/rest/posts/400006/comments/510138
Accept:application/xml
Content-Type: application/xml
 
   
<comment>
  <body>New comment</body>
</comment>

Response

HTTP/1.1 204 No Content

JSON Example

Request

Accept:application/json
PUT http://webexsocialserver/api/quad/rest/posts/400006/comments/510138
Content-Type: application/json
{
 
   
    "body":"New Comment"
 
   
}

Response

HTTP/1.1 204 No Content

Delete a Comment from a Post

Purpose

Deletes the designated comment from the designated post.

Availability

Cisco WebEx Social 3.0 and later.

Request

HTTP Method
URI

DELETE

http://server[:port_number]/api/quad/rest/posts/post_id/comments/comment_id


where:

server

Host name or IP address of the Cisco WebEx Social server.

port_number

Cisco WebEx Social server port number that is used for communication with the API consumer. Must be provided if the port number is not 80.

post_id

Identifier of the post from which to delete the comment. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.

comment_id

Identifier of the comment to delete. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.


Request Payload

A request payload is not required.

Response

Standard response (see the "API Responses" section) with an HTTP header only.

Example

Request

DELETE http://webexsocialserver/api/quad/rest/posts/400006/comments/510138

Response

HTTP/1.1 204 No Content

Get Permissions for a Post

Purpose

Retrieves the permissions that have been assigned to the designated post.

Availability

Cisco WebEx Social 3.0 and later.

Request

HTTP Method
URI

GET

http://server[:port_number]/api/quad/rest/posts/post_id/permissions


where:

server

Host name or IP address of the Cisco WebEx Social server.

port_number

Cisco WebEx Social server port number that is used for communication with the API consumer. Must be provided if the port number is not 80.

post_id

Identifier of the post for which to retrieve permissions. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.


Request Payload

A request payload is not required.

Response

Standard response (see the "API Responses" section) with a response payload that can include one Permission resource (the "Permission Resource" section describes this resource). XML and JSON formats are supported.

XML Example

Request

GET http://webexsocialserver/api/quad/rest/posts/14/permissions
Accept:application/xml

Response

HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:response xmlns:ns2="http://quad.cisco.com/ns/1.0/xml">
  <statusCode>200</statusCode>
  <startIndex>0</startIndex>
  <itemsPerPage>2</itemsPerPage>
  <totalResults>2</totalResults>
  <filtered>false</filtered>
  <sorted>false</sorted>
  <entry>
    <permission>
      <user>
        <id>310126</id>
        <resource>http://quad.cisco.com/schema/1.0/user</resource>
        <firstName>user1</firstName>
        <lastName>user1</lastName>
        <fullName>user1 user1</fullName>
        <screenName>user1</screenName>
      </user>
      <permissionFlags>
        <view>true</view>
        <edit>false</edit>
        <comment>true</comment>
        <share>false</share>
        <authorize>false</authorize>
      </permissionFlags>
    </permission>
  </entry>
  <entry>
    <permission>
      <community>
        <id>310005</id>
        <resource>http://quad.cisco.com/schema/1.0/community</resource>
        <name>test</name>
        <description>asdf</description>
        <shortName>/test1</shortName>
        <type>open</type>
        <state>live</state>
        <userCount>1</userCount>
      </community>
      <permissionFlags>
        <view>true</view>
        <edit>false</edit>
        <comment>true</comment>
        <share>false</share>
        <authorize>false</authorize>
      </permissionFlags>
    </permission>
  </entry>
  <serverMessages>
    <code>QUAD-100</code>
    <description>Protocol error</description>
    <message>responseitems</message>
  </serverMessages>
</ns2:response>

JSON Example

Request

GET http://webexsocialserver/api/quad/rest/posts/14/permissions
Accept:application/json

Response

HHTTP/1.1 200 OK
Content-Type: application/json
{
    "statusCode": 200, 
    "startIndex": 0, 
    "itemsPerPage": 2, 
    "totalResults": 2, 
    "filtered": false, 
    "sorted": false, 
    "entry": [
        {
            "data": {
                "principal": {
                    "id": 310005, 
                    "resource": "http://quad.cisco.com/schema/1.0/community", 
                    "name": "test", 
                    "description": "asdf", 
                    "shortName": "/test1", 
                    "type": "open", 
                    "state": "live", 
                    "userCount": 1, 
                    "tags": [ ], 
                    "images": [ ]
                }, 
                "permissionFlags": {
                    "view": true, 
                    "edit": false, 
                    "comment": true, 
                    "share": false, 
                    "authorize": false
                }
            }
        }, 
        {
            "data": {
                "principal": {
                    "id": 310126, 
                    "resource": "http://quad.cisco.com/schema/1.0/user", 
                    "firstName": "user1", 
                    "lastName": "user1", 
                    "fullName": "user1 user1", 
                    "screenName": "user1"
                }, 
                "permissionFlags": {
                    "view": true, 
                    "edit": false, 
                    "comment": true, 
                    "share": false, 
                    "authorize": false
                }
            }
        }
    ], 
    "serverMessages": null
}

Update Permissions for a Post

Purpose

Updates permissions for the designated post.

Availability

Cisco WebEx Social 3.0 and later.

Request

HTTP Method
URI

PUT

http://server[:port_number]/api/quad/rest/posts/post_id/permissions


where:

server

Host name or IP address of the Cisco WebEx Social server.

port_number

Cisco WebEx Social server port number that is used for communication with the API consumer. Must be provided if the port number is not 80.

post_id

Identifier of the post for which to update permissions. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.


Request Payload

The request payload includes fields from the Permission resource (Table 3-23 describes these fields):

Required Fields
Optional Fields

permissionFlags1

principal2

1 The permissionFlags field defines a resource that represents the status of permission types. All fields in this resource are required.

2 The principal field defines a resource that represents a Cisco WebEx Social user or a Cisco WebEx Social community. The id and the resource fields in this resource are required. Other fields are not used.


Response

Standard response (see the "API Responses" section) with an HTTP header only.

XML Example

Request

PUT http://webexsocialserver/api/quad/rest/posts/14/permissions
Accept:application/xml
Content-Type: application/xml
 
   
<permission>
  <principal>
    <id>310126</id>
    <resource>http://quad.cisco.com/schema/1.0/user</resource>
  </principal>
  <permissionFlags>
    <view>true</view>
    <edit>false</edit>
    <comment>true</comment>
    <share>false</share>
    <authorize>false</authorize>
  </permissionFlags>
</permission>

Response

HTTP/1.1 204 No Content

JSON Example

Request

PUT http://webexsocialserver/api/quad/rest/posts/14/permissions
Accept:application/json
Content-Type: application/json
 
   
{
      "permission": {
            "principal": {
                  "id": "310126", 
                  "resource": "http://quad.cisco.com/schema/1.0/user"
            }, 
            "permissionFlags": {
                  "view": "true", 
                  "edit": "true", 
                  "comment": "true", 
                  "share": "true", 
                  "authorize": "true"
            }
      }
}

Response

HTTP/1.1 204 No Content

Get Users that have Marked a Designated Post as a Favorite

Purpose

Retrieves Favorite resources that have as the destination the users that have marked the designated post as a favorite.

Availability

Cisco WebEx Social 3.0 and later.

Request

HTTP Method
URI

GET

http://server[:port_number]/api/quad/rest/posts/post_id/favorite
/@favoritedbyusers
[?query_parameters]


where:

server

Host name or IP address of the Cisco WebEx Social server.

port_number

Cisco WebEx Social server port number that is used for communication with the API consumer. Must be provided if the port number is not 80.

post_id

Identifier of the post for which to retrieve the users that have marked is as a favorite. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.

query_parameters

Query parameters. See the "Query Parameters" section for information about using query parameters. For this operation:

The fields query parameter is supported for selecting fields from the Favorite resource to include in a response (Table 3-17 describes these fields)

The filterBy query parameter is not supported for filtering resources in a response

The sortOrder query parameter is not supported for sorting resources in a response

The startIndex query parameter is supported for paginating return results

The count query parameter is supported for designating the maximum number of items in the return results

The meta query parameter is supported with the follow value for requesting relationship metadata


Request Payload

A request payload is not required.

Response

Standard response (see the "API Responses" section) with a response payload that can include one or more Favorite resources (the "Favorite Relationship Resource" section describes this resource). XML and JSON formats are supported.

XML Example

Request

GET http://webexsocialserver/api/quad/rest/posts/14/favorite/@favoritedbyusers
Accept:application/xml

Response

HTTP/1.1 200 OK
Content-Type: application/xml
 
   

The response can also include the Favorite resource. For an example, see the "Favorite Resource Response with User Resource in Destination Field: XML Format, Multiple Resources Returned" section.

JSON Example

Request

GET http://webexsocialserver/api/quad/rest/posts/14/favorite/@favoritedbyusers
Accept:application/json

Response

HTTP/1.1 200 OK
Content-Type: application/json
 
   

The response can also include the Favorite resource. For an example, see the "Favorite Resource Response with User Resource in Destination Field: JSON Format, Multiple Resources Returned" section.

Get Information about Users that Like a Designated Post

Purpose

Retrieves Like resources that have as the destination the users that like the designated post.

Availability

Cisco WebEx Social 3.0 and later.

Request

HTTP Method
URI

GET

http://server[:port_number]/api/quad/rest/posts/post_id/like/@likersusers
[?query_parameters]


where:

server

Host name or IP address of the Cisco WebEx Social server.

port_number

Cisco WebEx Social server port number that is used for communication with the API consumer. Must be provided if the port number is not 80.

post_id

Identifier of the post for which to retrieve the users that like it. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.

query_parameters

Query parameters. See the "Query Parameters" section for information about using query parameters. For this operation:

The fields query parameter is supported for selecting fields from the Like resource to include in a response (Table 3-21 describes these fields)

The filterBy query parameter is not supported for filtering resources in a response

The sortOrder query parameter is not supported for sorting resources in a response

The startIndex query parameter is supported for paginating return results

The count query parameter is supported for designating the maximum number of items in the return results

The meta query parameter is supported with the follow value for requesting relationship metadata


Request Payload

A request payload is not required.

Response

Standard response (see the "API Responses" section) with a response payload that can include one or more Like resources (the "Like Relationship Resource" section describes this resource). XML and JSON formats are supported.

XML Example

Request

GET http://webexsocialserver/api/quad/rest/posts/14/like/@likersusers
Accept:application/xml

Response

HTTP/1.1 200 OK
Content-Type: application/xml
 
   

The response can also include the Like resource. For an example, see the "Like Resource Response with User Resource in Destination Field: XML Format, Multiple Resources Returned" section.

JSON Example

Request

GET http://webexsocialserver/api/quad/rest/posts/14/like/@likersusers
Accept:application/json

Response

HTTP/1.1 200 OK
Content-Type: application/json
 
   

The response can also include the Like resource. For an example, see the "Like Resource Response with User Resource in Destination Field: JSON Format, Multiple Resources Returned" section.

Get the Number of Users that Like a Designated Post

Purpose

Retrieves the number of Like resources that have as the destination the users that like the designated post.

Availability

Cisco WebEx Social 3.0 and later.

Request

HTTP Method
URI

HEAD

http://server[:port_number]/api/quad/rest/posts/post_id/like/@likersusers
[?query_parameters]


where:

server

Host name or IP address of the Cisco WebEx Social server.

port_number

Cisco WebEx Social server port number that is used for communication with the API consumer. Must be provided if the port number is not 80.

post_id

Identifier of the post for which to retrieve the number of users that like it. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.

query_parameters

Query parameters. See the "Query Parameters" section for information about using query parameters. For this operation:

The fields query parameter does not apply

The filterBy query parameter is not supported for filtering resources in a response

The sortOrder query parameter does not apply

The startIndex query parameter does not apply

The count query parameter does not apply

The meta query parameter does not apply


Request Payload

A request payload is not required.

Response

Standard response (see the "API Responses" section) with an HTTP header only. The response includes the count of users that have indicated that they like the designated post.

Example

Request

HEAD http://webexsocialserver/api/quad/rest/posts/14/like/@likersusers

Response

HTTP/1.1 204 No Content
x-quad-count: 2