Newer Version Available

This content describes an older version of this product. View Latest

Sending HTTP Requests

Chatter REST API uses HTTP methods to send and receive JSON and XML content, so it is very simple to build client applications using the tool or the language of your choice.

Your HTTP requests to a Chatter REST API resource should contain the following information:
  • An HTTP method (such as HEAD, GET, POST, or DELETE).
  • An OAuth 2.0 access token used to authenticate the request. For information on how to retrieve the token, see Step Two: Set Up Authorization.
  • The Chatter REST API resource URL.
  • Any JSON or XML files containing information needed for requests, such as updating a record with new information.
The HTTP methods are used to indicate the desired action, such as retrieving information, as well as creating, updating, and deleting records.
  • GET is used to retrieve information, such as basic resource summary information.
  • POST is used to create a new Chatter REST API item, such as a comment or like, or subscribe to a group.
  • PATCH is used for partial updates to an item, for example, renaming a file.
  • PUT is used for whole updates to an item, for example, marking a conversation as read.
  • DELETE is used to delete a Chatter REST API item, such as a feed-item, or unsubscribe from a group.
  • HEAD is used to retrieve resource metadata. It's similar to using GET but without the response body. You can use HEAD for testing the availability of a resource.

To access a resource, submit an HTTP request containing a header, method, and resource URL.