Send HTTP Requests
HTTP requests to a Connect REST API resource contain the following information.
- An HTTP method (such as GET, POST, PATCH, or DELETE).
- An OAuth 2.0 access token used to authenticate the request. For information on how to retrieve the token, see Connect REST API Quick Start.
- The Connect REST API resource URL.
- Request parameters or a request body containing information needed for requests, such as
information to update a record.
The request body can contain JSON or XML. If you pass resource-specific request parameters and a request body, the request parameters are ignored. Request parameters that aren’t specific to a resource, such as parameters in a bearer token URL and the _HttpMethod parameter, are processed along with the request body. Use bearer token parameters as they are. Don’t add or remove parameters.
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 item, such as a feed item or 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 an item, such as a feed element, or to unsubscribe from a group.
- HEAD is used to retrieve resource metadata. It's similar to using GET but doesn’t return a response body. You can use HEAD to test the availability of a resource.