HTTP Methods

The REST API for Conversations supports standard HTTP methods (verbs).

Method Description

GET

Retrieve or query resources.

If you send a GET request for a specific field's value but that field does not exist, the API returns the field that you passed, with a null value and a status of 200.

POST

Create a new instance of a resource, such as a conversation.

In addition, you can use POST to create a relationship between two objects. For example, you can use POST to create a Like (Starred) relationship between a user and a conversation.

PUT

Update the state of an existing instance of a resource.

For example, you can use PUT to change the state of a conversation from Open to Closed. PUT requests use the XUpdater class.

DELETE

Delete an existing instance of a resource or delete a relationship between two objects.

Subset of HTTP Methods Supported by Client

If the client supports only a subset of these HTTP methods, you can tunnel the other methods using the POST method by specifying the desired method in the method query parameter. For example, the DELETE operation can be achieved by doing a POST on a resource with "method=delete" in the query string portion of the URL.

PUT Requests with XUpdater

When updating an object using a PUT request, such as with XConversationUpdater, you can use XUpdater to specify the value that you want to change. XUpdater is a class that represents the DTO for updating objects; the updater field actually represents a map of field values. For example, XUpdater can be reresented as follows:

{
"updater": "XUpdater"
}

For example, you can use a PUT request to . . ./social/api/v1/conversations/ObjectID with the request payload {"updater":{"SHORT_NAME":"String for short name"}} to change the short name.

XUpdater is used with Collections, Conversations, Groups, People, and Collaboration objects.