Salesforce Chatter Rest API



Comments



Description

Version 25.0: Summer '12 Chatter REST API Developer's Guide Last updated: June 15 2012 © Copyright 2000–2012 salesforce.com, inc. All rights reserved. Salesforce.com is a registered trademark of salesforce.com, inc., as are other names and marks. Other marks appearing herein may be trademarks of their respective owners. Table of Contents Table of Contents Getting Started....................................................................................................................................5 Chapter 1: Introducing Chatter REST API..................................................................................5 Using Chatter API........................................................................................................................................................6 Understanding Chatter API Resources.........................................................................................................................6 Send HTTP Requests with cURL..............................................................................................................................15 Understanding OAuth and Chatter API.....................................................................................................................16 Understanding the Web Server OAuth Authentication Flow.........................................................................18 Understanding the User-Agent OAuth Authentication Flow.........................................................................23 Using Tokens...................................................................................................................................................25 Chapter 2: Quick Start...............................................................................................................27 Prerequisites.................................................................................................................................................................28 Step One: Set Up Authorization.................................................................................................................................28 Step Two: Connect to Chatter API Using OAuth.....................................................................................................28 Reference...........................................................................................................................................31 Chapter 3: Chatter API Resources Overview..............................................................................31 Chatter API Resources Relationships.........................................................................................................................31 Chatter API: How do I. . ...........................................................................................................................................34 Chapter 4: Chatter API Resources..............................................................................................43 Bookmarks Resources..................................................................................................................................................50 Chatter Resource.........................................................................................................................................................57 Comments Resource....................................................................................................................................................57 Company Feed Resources............................................................................................................................................59 Dashboard Component Snapshot Resource................................................................................................................62 Favorites Feed Resources.............................................................................................................................................64 Feeds Resource............................................................................................................................................................68 Feed-Items Resources..................................................................................................................................................70 Feed Items Query............................................................................................................................................70 Specific Feed Item...........................................................................................................................................71 Feed Item Comments......................................................................................................................................73 Feed Item Likes...............................................................................................................................................76 Files Resources............................................................................................................................................................77 Files Feed Resources....................................................................................................................................................81 Filter Feed Resources..................................................................................................................................................84 Groups Feed Resources...............................................................................................................................................88 Group-Memberships Resource....................................................................................................................................91 Groups Resources........................................................................................................................................................92 List of Groups..................................................................................................................................................92 i Table of Contents Group Information..........................................................................................................................................95 Batch Group Information................................................................................................................................96 Group Files......................................................................................................................................................96 Group Members..............................................................................................................................................98 Group Photo..................................................................................................................................................100 Influence Resource.....................................................................................................................................................101 Likes Resource...........................................................................................................................................................102 News Feed Resources................................................................................................................................................103 Organization Resource..............................................................................................................................................111 People Feed Resources..............................................................................................................................................112 Record Feed Resource...............................................................................................................................................115 Records Resources.....................................................................................................................................................122 Subscriptions Resource..............................................................................................................................................123 To Feed Resources....................................................................................................................................................124 Topics Resource.........................................................................................................................................................130 User-Profile Feed Resources......................................................................................................................................131 Users Resources.........................................................................................................................................................136 User Information...........................................................................................................................................138 User Profile Information................................................................................................................................138 Batch User Information.................................................................................................................................140 User Conversations, General.........................................................................................................................140 User Conversations, Specific..........................................................................................................................141 Change Status of Conversations....................................................................................................................142 Get Unread Count for Conversations............................................................................................................143 Users Files, General.......................................................................................................................................143 User Files, Filtered by Group........................................................................................................................146 User Files, Filtered by Sharing.......................................................................................................................146 User Followers...............................................................................................................................................147 Following Users.............................................................................................................................................148 User Groups...................................................................................................................................................150 User Messages, General.................................................................................................................................150 User Messages, Specific.................................................................................................................................154 User Photos....................................................................................................................................................155 User Recommendations, General..................................................................................................................156 User Recommendations for a Specific Action...............................................................................................158 User Recommendations for a Specific Action and Object Category.............................................................159 User Recommendations for a Specific Action and Object ID.......................................................................160 User Status.....................................................................................................................................................162 Chapter 5: JSON and XML Request Bodies..............................................................................164 Chapter 6: Chatter API Resource Returns................................................................................171 Response Bodies........................................................................................................................................................171 Response Body Encoding..........................................................................................................................................201 Status Codes and Error Responses............................................................................................................................202 ii ...........................................................204 iii ....................................Table of Contents Index................................................. Table of Contents iv . 5 . To use this documentation. Chatter must be enabled for the organization. and third-party Web applications. Web services. and Chatter. intranet sites. groups. and files. In addition. Note: Chatter API is available for all editions except Personal Edition..GETTING STARTED Chapter 1 Introducing Chatter REST API In this chapter . How to configure OAuth for your client application. • • • • Using Chatter API Understanding Chatter API Resources Send HTTP Requests with cURL Understanding OAuth and Chatter API Chatter API is a REST API that provides programmatic access to Chatter feeds and social data such as users.. Chatter API is similar to APIs offered by other companies with feeds. OAuth. It's used by developers who want to integrate Chatter into a variety of applications such as mobile applications. you should have a basic familiarity with software development. such as Facebook and Twitter. How to set up your development environment so you can start working with Chatter API. Its advantages include ease of integration and development. This will help you understand how your applications can best use Chatter API resources. followers. The following sections include: • • • • The key characteristics and architecture of Chatter REST API. A tutorial that leads you step by step through a typical use case. Feed items are structured in a way that makes it easy to render on Web sites and mobile devices. you can use SOAP API or REST API for the bulk of your queries. So when should you use which API? Situations where you would want to use SOAP API or REST API include: • • • Migrating or synchronizing user profiles and their associated user photos from one system to another. Changed values that are tracked in a feed are returned as value-pair representations. For example. branded skin for Chatter for your organization. after users are authenticated. These APIs provide access to the majority of Salesforce data. Relationships between objects can easily be traversed without having to resolve foreign keys. Selecting the Right API for Your Application Salesforce provides many types of APIs for various use cases. Games might include things like sales incentive competitions. including most of the Chatter data. Make feeds actionable and integrated with third-party sites. 6 . POST. How is Chatter API Different from other APIs? Chatter API complements the SOAP API by making it easy to interact with Chatter data. including both SOAP API and REST API. group information. SOAP API and REST API’s rate limiting and powerful query language more suited to these use cases and contains most of the applicable Chatter data. and Chatter user-profile details. However. Understanding Chatter API Resources Each resource in Chatter API is a URI used with an HTTP method (such as GET. for example posting photos or using @mention rich text in feed items. Display the Chatter feed on an external system. such as an intranet site. or the comments on a post. Each resource represents something in Chatter. The following are some of the differences between Chatter API and the SOAP API: • • • • Returned information is automatically localized to the user's time zone and language. DELETE. If necessary. Queries where you want to select specifically which records or fields are returned. or HEAD). Chatter API is the only API that supports some of Chatter’s more complex data structures. For example. Create simple games that interact with the feed for notifications. Integrate a third-party Web application with Chatter so it can notify groups of users about events. an app that posts a Chatter item to Twitter whenever the post includes #tweet hashtag.Introducing Chatter REST API Using Chatter API Using Chatter API Use Chatter API to: • • • • • • Build a mobile client that displays a Chatter feed. Creating a custom. using Chatter API you can get all of a user's followers or groups with one request per page. such as a user's news feed. then use the feed item or comment Ids you’ve extracted to selectively work with Chatter API. such as feeds. Creating analytic applications for Chatter. 0 and later.Introducing Chatter REST API Understanding Chatter API Resources The primary resources for Chatter API are: Resource Bookmarks Resources Description Feed made up of Chatter feed items posted to bookmarks saved by the logged-in user.0 and later. Available resources are: Feed Item Comments Feed Item Likes 7 . Available resources are: Bookmarks Feed URL Bookmarks Feed Items Bookmarks Feed Items Flat—Available in versions 25. or to like a comment. Available resources are: Comment Comment Likes Company Feed Resources A feed that returns all updates for people the current user follows. Posts a new dashboard component snapshot to the specified location. Contains a single resource. and files and records the user is following. Available resources are: List of Favorites Favorite Feed Favorites Feed Items Feeds Resource Feed-Items Resources A list of all of the feeds the logged in user is able to view. Contains a single resource. Chatter Resource Dashboard Component Snapshot Resource Comments Resource Directory of the general resources available. Available in versions 24.0 and higher. Represents a specific feed item. Information about the specified comment. Available in versions 25. Available in versions 24. Also used to delete a comment. Available resources are: Company Feed URL Company Feed Items Favorites Feed Resources Feeds made up of Chatter favorites saved by the logged-in user.0 and later. as well as delete a specific feed item. groups the user is a member of. post comments to feed-items. Contains a single resource. Also used to query all feed items.0 and higher. Available in versions 24. including content. Available resources are: File Information File Content File Rendition File Shares Files Feed Resources All feed items that contain files posted by people or groups that the current user follows. Filter Feed Resources Feeds filtered by the specified criteria for the logged-in user. Note: To get the feed for a specific group. use the Record Feed Resource resource with a groupId. Available in versions 24. Information about groups.0 and higher. Groups Feed Resources All feed items from all groups the current user either owns or is a member of. or remove a member from a group. Available resources are: Files Feed URL Files Feed Items Files Feed Items Flat Available in versions 25.Introducing Chatter REST API Understanding Chatter API Resources Resource Description Feed Items Query Specific Feed Item Files Resources Information about the specified file. and sharing. photo. Also used to add members to a group and change the group 8 . rendered version.0 and higher. Available resources are: List of Filters Keyprefix Filter Feed Keyprefix Filtered Feed Items Filter Feed Items Flat—Available in versions 25. such as the group's members. Contains a single resource. and the groups the current user is following.0 and higher. Available resources are: Groups Feed URL Groups Feed Items Groups Feed Items Flat—Available in versions 25.0 and later. Group-Memberships Resource Groups Resources Access information about a member of a group. Introducing Chatter REST API Understanding Chatter API Resources Resource Description photo. This is not a feed. To get the feed for a specific group, use the Record Feed Resource resource with a groupId. Available resources are: List of Groups Batch Group Information Group Files Group Information Group Members Group Photo Influence Resource Likes Resource News Feed Resources List of the percentile thresholds used to categorize an organization’s users by their influence in Chatter. Available in versions 24.0 and later. Contains a single resource. Information about the specified like. Also used to delete a like. Contains a single resource. The news feed of the current user. Includes feed items from all groups the current user either owns or is a member of, as well as all files, records, and all users the current user follows. You can also use this resource to add feed-items. Available resources are: News Feed URL News Feed Items News Feed Items Flat—Available in versions 25.0 and higher. Organization Resource People Feed Resources Information about the current user’s organization and settings. Available in versions 24.0 and later. Contains a single resource. All feed items posted by all of the people the current user follows. Available resources are: People Feed URL People Feed Items People Feed Items Flat—Available in versions 25.0 and higher. Record Feed Resource The feed of the specified record, which could be a group, person, object or file. Available resources are: Record Feed URL Record Feed Items Record Feed Items Flat—Available in versions 25.0 and higher. 9 Introducing Chatter REST API Understanding Chatter API Resources Resource Records Resources Description Information about the specified record, including followers. This is not a feed. To access a record feed, use the Record Feed Resource. Available resources are: Record Specifics Record Followers Subscriptions Resource To Feed Resources Information about the specified subscription. Also used to delete a subscription, for example, to unfollow a record. Contains a single resource. Feed of all @mentions of the current user and posts others make to the logged-in user's feed. Also used to post to the user's feed. Available resources are: To Feed URL To Feed Items To Feed Items Flat—Available in versions 25.0 and higher. Topics Resource User-Profile Feed Resources List of the trending topics for the organization. Available in versions 24.0 and later. Contains a single resource. Feed of all actions by the current, logged-in user on all records that can be tracked in a feed. This is different than/chatter/feeds/news, which returns everything in a user's feed, including posts, group updates, and record updates. Also used to add feed items. Available resources are: User–Profile Feed URL User–Profile Feed Items User-Profile Feed Items Flat—Available in versions 25.0 and higher. Users Resources Information about the user, such as who is following the user, the user’s files or recommendations.. Also used for posting feed items and updating conversation status. This is not a feed. To access the user profile feed, use User-Profile Feed Resources. Available resources are: Batch User Information Change Status of Conversations Users Files, General User Files, Filtered by Group User Files, Filtered by Sharing Following Users User Information 10 Introducing Chatter REST API Understanding Chatter API Resources Resource Description User Messages, General User Messages, Specific User Recommendations, General Get Unread Count for Conversations User Conversations, General User Conversations, Specific User Followers User Groups User Photos User Profile Information User Recommendations for a Specific Action User Recommendations for a Specific Action and Object Category User Recommendations for a Specific Action and Object ID User Status—No longer available as of version 25.0. Many of the resources use either a specified userId or the keyword me to indicate the current, logged-in user. For example, to return the user-profile information for the current, logged-in user, use the following resource: /chatter/users/me You could also specify a particular user by user ID: /chatter/users/005D0000001GLoh When you successfully access a resource, a response body is returned, in either XML or JSON. Each response body may contain one or more response bodies. For example, the following is the response body of the above resource (users). Note that it includes other response bodies as well, such as address, current status, and phone numbers: Name aboutMe address chatterActivity chatterInfluence companyName currentStatus Type String Address Chatter Activity Chatter Influence String User Status Description Text from user's profile Address Chatter activity statistics User’s influence rank Company name Note: This property is no longer available as of version 25.0. 11 Introducing Chatter REST API Understanding Chatter API Resources Name Type Description User's current status email firstName followersCount followingCounts String String Integer Following Counts Integer String Boolean Boolean String String String Reference User's email address User's first name Number of users following this user Information about items the user is following Number of groups user is following 18-character Id of the user true if user is active, false otherwise true if user is a Chatter customer, false otherwise groupCount id isActive isChatterGuest lastName managerId managerName User's last name 18-character Id of the user’s manager Locale-based concatenation of manager's first and last names If the logged-in user is following this user, this contains information about the subscription, else returns null Locale-based concatenation of user's first and last names Collection of user's phone numbers Information about the user's photos Title of the user User mySubscription name String Phone Number[] Photo String String String String phoneNumbers photo title type url username URL to the user's Chatter profile User name of the user, such as [email protected]. Available in versions 24.0 and later. The output is as follows: { "aboutMe": "I&#39;m excited to be part of the team focused on building out our apps business and showing our customers their future.", "address": { "city": "Seattle", "country": "US", "state": "WA", 12 "records": 0.com or na6. "phoneNumbers": [{ "number": "(206) 999-2846". The instance for your organization may be similar to na1. Uniform interface All resources are accessed with a generic interface over HTTP. "followingCounts": { "people": 5. The instance given to the client app when they are authenticated should be prepended to the URLs. "username": "mraven@seattleapps. "mySubscription": null. "commentReceivedCount": 1. however. However. "zip": "98121" "formattedAdress": "2001 8th Ave\nSeattle. "type": "Work" }]. "likeReceivedCount": 0. WA 98121\nUS" }. "type": "User". "followersCount": 1. "title": null.com" } Note: Salesforce runs on multiple server instances. "chatterActivity": { "commentCount": 0.com. which allow the client to progress between states.com".0/chatter/users/005D0000001Kl6xIAC". most of the returned URLs are relative. the representations of the resources are interconnected using URLs. "managerId": null. The examples in this guide use instance_name to indicate the instance. "managerName": null. "firstName": "Marion". "isChatterGuest": false. "url": "/services/data/v25. "total": 5 }.mycompany. The following are important characteristics of Chatter API resources and architecture: Stateless Each request from client to server must contain all the information necessary to understand the request. "postCount": 2 }.Introducing Chatter REST API Understanding Chatter API Resources "street": "2001 8th Ave". "photoVersionId": "729D00000000BDV". "groupCount": 3. "name": "Marion Raven". "lastName": "Raven". "companyName": "Seattle Apps". "email": "mraven@seattleapps. "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }. 13 . "isActive": true. "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F". Some of the items in a response body have a fully qualified URL.salesforce. "id": "005D0000001Kl6xIAC". and not use any stored context on the server. 0/chatter/ And the resource is : feeds/news/me/feed-items Put together. You can append either . if your instance is: https://na1.json or . Authentication Chatter API uses OAuth 2.xml. the full URL is: https://na1. Be sure to use the correct case for all values.0.Introducing Chatter REST API Understanding Chatter API Resources Named resources Access almost all resources by using the URI for your company's instance.0/chatter/ feeds/news/me/feed-items Note: The Organization resource has the base URL of /services/v25. Support for JSON and XML The JavaScript Object Notation (JSON) format is supported with UTF-8. For example. XML requests are supported in UTF-8 and UTF-16. /chatter/feeds/filter/me/001/feed-items. Support for Method Overriding If you use an HTTP library that doesn’t allow overriding or setting an arbitrary HTTP method name. using HTTPS. For example.com/ And the version information is: /services/data/v25. you can send a POST request and provide an override to the HTTP method with the request parameter _HttpMethod. For example: https://instance_name/services/data/v25. that is.com/services/data/v25.0/connect.salesforce. and XML responses are provided in UTF-8. Note: Salesforce is generally accessed securely.xml to the URI of any resource to specify how the return is formatted. 14 .salesforce. Date-time information is in ISO8601 format. combined with version information and the URI for the resource.0/chatter/ /chatter/users/me/conversations/03MD0000000008KMAQ ?_HttpMethod=PATCH&read=true Note: The _HttpMethod parameter is case sensitive. XML serialization is similar to SOAP API. An OAuth 2. that application's requests count against a general allocation of 200 requests per user per hour where there is no associated OAuth consumer key. performance and other system issues might prevent some limits from being reached. Send HTTP Requests with cURL Chatter API uses HTTP methods to send and receive JSON and XML content.Introducing Chatter REST API Send HTTP Requests with cURL Localized names and times Chatter API localizes both the names and datetimes to the language and time zone settings of the current user.se/. GET. For non-HTML contexts. or DELETE). For example. see Step One: Set Up Authorization on page 28. For more information.haxx. Default HTML Entity Encoding Chatter API strings are minimally HTML entity encoded by default. The stated limit may change without notice. ensure that your system meets the cURL requirements for SSL. Chatter API clients may request raw (unencoded) output by setting the X-Chatter-Entity-Encoding HTTP header in your request to false. any other application the user accesses. load. Note: Stated limits aren't a promise that the specified resource is available at its limit in all circumstances. Your HTTP requests to a Chatter API resource should contain the following information: • • • • An HTTP method (such as HEAD. If a user issues more than 200 requests per hour. We recommend a command-line tool called cURL to simplify sending and receiving HTTP requests and responses. This user now only has 200 hourly requests regardless of the app they are using. Because of this. your app connects a user to Salesforce using a regular session ID. 15 . If an application uses a regular session ID for authentication instead of an OAuth token. The Chatter API resource. Chatter API returns a 503 Service Unavailable error code. For example. see Response Body Encoding on page 201. each user of those apps has 200 requests per hour.0 access token used to authenticate the request. Windows users can download a version at curl. such as updating a record with new information. For information on how to retrieve the token. but not necessarily in other HTML contexts. POST. that is also authenticating with session IDs. Any JSON or XML files containing information needed for requests. Users set their locale in their personal information. Chatter API Request Limits Chatter API request limit is 200 requests per OAuth consumer per user per hour. such as native mobile applications. However. so it is very simple to build client applications using the tool or the language of your choice. Applications should make efficient use of available requests and gracefully handle the 503 error code. which is suitable in most cases for display between HTML tags. cURL is pre-installed on many Linux and Mac systems. is contending for the same allocation of 200 hourly requests per user. This means mobile devices don't need their own language or time zone settings. For example. if you have created three remote access applications (each of which represents a different OAuth consumer with its own Consumer Key and Consumer Secret). When using HTTPS on Windows. we recommend clients use OAuth tokens whenever feasible. They no longer have a separate request limit per application: all applications are now using the same limit. Chatter API uses OAuth 2. which returns an access token to your application. Your application can use this access token to access Chatter API Web services. you must create a REST entry point in your organization. Understanding Remote Access Applications To use Chatter API. To access a resource. Salesforce defines this entry point as a remote access application definition. This approach to authentication can be used in both mobile apps and from a Web page. marking a conversation as read. see Step One: Set Up Authorization on page 28. as well as creating. updating. or unsubscribe from a group. and deleting records. It's similar to using GET but without the response body. It is often described as the valet key of software access: a valet key only allows access to certain features of your car: for example. Chatter API uses OAuth to securely identify your application before connecting to Salesforce. or subscribe to a group. HEAD is used to retrieve resource metadata. submit an HTTP request containing a header. without handing out the user's username and password. you can’t open the trunk or glove compartment using a valet key. such as a comment or like. method. for example. your application can prompt the user to login using a standard Salesforce page. POST is used to create a new Chatter API item. For an example in creating a remote access application definition. You can use HEAD for testing the availability of a resource.0. PATCH and PUT are used to update an item. such as retrieving information. and resource name. such as basic resource summary information. When you use OAuth. Instead.Introducing Chatter REST API Understanding OAuth and Chatter API The HTTP methods are used to indicate the desired action. • • • • • GET is used to retrieve information. Understanding OAuth and Chatter API OAuth is an open protocol that allows secure authentication for access to a user's data. such as a feed-item. you can avoid storing login credentials in your application. DELETE is used to delete a Chatter API item. Considerations when creating and using a remote access application: • The following maps the labels used in the remote access application definition to OAuth terms: 16 . A URL associated with your client application. A secret key associated with your application.Introducing Chatter REST API Understanding OAuth and Chatter API Remote Access Application Label Consumer Key Consumer Secret Callback URL OAuth Term client_id client_secret redirect_uri Description A unique identifier that identifies your application to Salesforce. the resource we are concerned about protecting is all the data accessible through the API. such as iOS and Android. Different flows are suitable for different contexts. it requests authorization from the resource owner. OAuth Basics • OAuth grants access by client applications to resources owned by resource owners. • • • 17 . In others. In terms of OAuth. however. the URL isn’t actually used. the client application is given an access token and a refresh token. between your client application and the server (the remote access application definition) the value must be same. The access token must be included by the authorized client application in any subsequent Web service requests to identify itself. you may want to use a value that identifies the application.Myapp. Your remote access application does not have to reside in the same organization as your users. When an application wants to access a resource. the authorized client application can make a special request using the refresh token to obtain a new access token. a resource is anything that must be kept secured. • If you are developing a mobile app. you must change the value of the Callback URL to reflect the location of your application code. In addition. you should create more than one remote access application if you are developing for different platforms. These are referred to as grant types or flows. In some contexts this must be a real URL that the client’s Web browser is redirected to. The remote access application you create can be used to sign into any organization. the resource owner is a combination of the administrator (who administers users and the remote access application) and the users (who log in and grant access to third party applications).instance_name/services/oauth2/success • • This value should NOT be used when developing a Web application. Access tokens have a limited lifetime. If you create only one. Once a client application has been authorized to access to a resource. you can use the following value for the Callback URL (redirect_uri) to avoid setting up an application server of your own: https://login. In our context. We recommend creating more than one remote access application definition: one for testing and one for production. When an access token expires. It is up to a resource owner to grant access to resources. For example. OAuth outlines various ways that an application can be granted access to a resource. For Chatter API. such as http://MyCompany. com REST API. Client libraries for OAuth help smooth the development process for client applications. The following is the general flow. they can revoke access by clicking Your Name > Setup > My Personal Information > Personal Information.com JavaScript REST Toolkit OAuth is a popular authentication standard. you can also use the refresh token to get a new access token after your application has been authorized for access.com/chatter-api.force. On successful authorization. as well as additional code examples.com REST API is shared with Chatter API. the client application is provided with access and refresh tokens. The information on authentication in these Force. OAuth has multiple authentication flows.com REST API Digging Deeper into OAuth on Force.com REST API useful: • Force.Introducing Chatter REST API Understanding the Web Server OAuth Authentication Flow OAuth Flows A user must be authenticated before accessing Salesforce. see http://developer. Revoking Access After a user has granted access to a client application.com tutorials is also applicable to Chatter API: • • • Getting Started with the Force. A critical aspect of the Web server flow is that the application must be able to protect the consumer secret. Chatter API shares some infrastructure with the Force. The individual step descriptions follow. as dictated by the OAuth standard and the type of application trying to access Salesforce.com Using OAuth to Authorize External Applications The authentication part of the Force. clicking Revoke. Additional Resources To find out the latest information about Chatter API. Salesforce supports the following flows for use with the Chatter API: • • Web server flow User-agent flow In addition. then in the Remote Access related section. There are several steps in each authentication flow. 18 . Here are some client programming libraries you may find useful: • • Ruby on Rails: OmniAuth Java Apache Amber Understanding the Web Server OAuth Authentication Flow Typically this flow is used by web applications that can confidentially store the client secret. You may find the following library supporting the Force. the response token includes an access code. After obtaining the authorization code. If there was no error. and additional information. 2.Introducing Chatter REST API Understanding the Web Server OAuth Authentication Flow The following is a general description of the OAuth web-server flow: 1. The end-user logs into Salesforce to authenticate themselves. Using the Web Server Flow with Chatter API and Salesforce The following provides specific details for the OAuth Web-server flow when used with Salesforce and Chatter API: 1. Since this web page is hosted by the resource owner (Salesforce) and interacted with directly by the end user. 4. 3. the client application passes back the authorization code to obtain an access token. 5.instance_name/services/oauth2/authorize. After validating the authorization code. To request authorization for a resource. Salesforce sends the authorization code back to the client application using the specified callback URL. The protected resources are Chatter API endpoints. a refresh token. Direct the client’s web browser to the page https://login. the client web application never finds out the user’s login credentials. with the following request parameters: 19 . 6. Salesforce passes back a response token. the client application redirects the end-user’s browser to a web page hosted on the resource owner’s authorization server. The end-user also grants authorization to the client application. it is the Salesforce log in page. In this case. and if the user is currently logged in and has previously approved the application. • mobile—mobile optimized dialog designed for less capable smartphones such as BlackBerry OS 5. the approval step is skipped. Determines whether the user should be prompted for login and approval. After successfully being logged in.Introducing Chatter REST API Understanding the Web Server OAuth Authentication Flow Parameter response_type client_id Description Must be code for this authentication flow The Consumer Key value from the remote access application defined for this application The Callback URL value from the remote access application defined for this application redirect_url You can also include the following optional request parameters: Parameter state immediate Description Specifies URL-encoded state data to be returned in the callback URL after approval. the user is asked to authorize the application. display 2. This is the default value if none is specified. 20 . the session is immediately terminated with the immediate_unsuccessful error code. Indicates the type of web pages that is provided. • touch—mobile-optimized dialog designed for modern smartphones such as Android and iPhone. • If set to true and the user is not logged in or has not previously approved the application. • popup—Compact dialog optimized for modern web browser popup windows. Default is false. Values are either true or false. • If set to true. Valid values are: • page—Full-page authorization screen. appended with the following values in its query string: Parameter code state Description The authorization code that is passed to get the access and refresh tokens The state value that was passed in as part of the initial request. 21 . 3. this step is skipped. if applicable. the end-user’s web browser is redirected to the callback URL specified by the redirect_uri parameter. Once Salesforce has confirmed that the client application is authorized.Introducing Chatter REST API Understanding the Web Server OAuth Authentication Flow Note that if the user has already authorized the application. This must match the value in the Callback URL field in the remote access application definition exactly. Authorization code obtained from the callback after approval.salesforce. This request should be made as a POST against this URL: https://login. the instance is na1: https://na1. You should treat it like the user's password and use appropriate measures to protect it. Expected return format. This parameter is optional. 4.instance_name/services/oauth2/token with the following query parameters: Parameter grant_type client_id client_secret redirect_uri Description Value must be authorization_code for this flow. refresh_token instance_url URL indicating the instance of the user's organization. This session ID cannot be used in the user interface. Can be used in an HTTP request to get more information about the end user. URI to redirect the user to after approval. Token that can be used in the future to obtain new access tokens (sessions). In this example.com id Identity URL that can be used to both identify the user as well as query for more information about the user. The client application server must extract the authorization code and pass it in a request to Salesforce for an access token. Consumer key from the remote access application definition. Base64-encoded HMAC-SHA256 signature signed with the consumer's private key containing the concatenated ID signature 22 . Caution: This value is a secret. Values are: • urlencoded • json • xml code format 5. If this request is successful. the server returns a response body holding the following: Parameters access_token Description Session ID that you can use for making Chatter API requests. Treat this like a user's session and diligently protect it.Introducing Chatter REST API Understanding the Web Server OAuth Authentication Flow It is expected that the redirect_uri web page is hosted by the client application server. Consumer secret from the remote access application definition. and is the same value sent by the initial redirect. The default is json. location. The following is a general description of the OAuth user-agent flow: 1. 23 . to remove the callback from the browser’s history. This can be used to verify the identity URL was not modified since it was sent by the server. Understanding the User-Agent OAuth Authentication Flow Typically this flow is used by mobile apps or applications that directly access theChatter API from JavaScript. In this case. The following is the general flow. In this flow.Introducing Chatter REST API Understanding the User-Agent OAuth Authentication Flow Parameters Description and issued_at. it’s the Salesforce login page. it might be exposed to the end-user and other applications residing on the computer or device. Caution: Because the access token is encoded into the redirection URI. issued_at When the signature was created. it is assumed that the client application can’t be trusted to store client credentials. we recommend calling window. nor the user login credentials. the client application redirects the end-user’s browser to a Web page hosted on the resource owner’s authorization server. The individual step descriptions follow. To request authorization for a resource.replace(). If you are authenticating using JavaScript. Specifies URL-encoded state data to be returned in the callback URL after approval. The end-user uses this web page to authenticate themselves and then grant authorization to the client application. If the client application is running in the browser already.Introducing Chatter REST API Understanding the User-Agent OAuth Authentication Flow 2. you must include the chatter_api value. the authorization server redirects the end-user’s Web browser to a redirection URL. For more information.instance_name/services/oauth2/authorize. Direct the client’s Web browser to the page https://login. Since this Web page is hosted by the resource owner (Salesforce) and interacted with directly by the end user. The protected resources are Chatter API resources. • touch—mobile-optimized dialog designed for modern smartphones such as Android and iPhone. with the following request parameters: Parameter response_type client_id Description Must be token for this authentication flow The Consumer Key value from the remote access application defined for this application The Callback URL value from the remote access application defined for this application redirect_url You can also include the following optional request parameters: Parameter display Description Indicates the type of Web page that’s provided. Specifies what data your app can access. Using the User-Agent Flow with Chatter API and Salesforce The following provides specific details for the OAuth user-agent flow when used with Salesforce and Chatter API: 1. scope state 24 . 4. The end-user logs into Salesforce to authenticate themselves. see “Scope Parameter Values” in the online help. the client Web application never finds out the user’s login credentials. • mobile—mobile optimized dialog designed for older smartphones such as BlackBerry OS 5. a browser must be opened (such as an UIWebView in iOS). You do not have to specify any value to access Chatter API If you specify any values. 3. the browser can just be redirected. This is the default value if none is specified. This URL can be used by the client application to retrieve the access and refresh tokens. If the client application is a mobile app. Valid values are: • page—Full-page authorization screen. Once authorization has been granted. • popup—Compact dialog optimized for modern Web browser popup windows. they should intercept the redirection URI and extract the parameters values. the end-user’s Web browser is redirected to the callback URL specified by the redirect_uri parameter. it can use them to make requests to Chatter API. the user is asked to authorize the application. appended with the following values after the hash sign (#). Treat this like a user's session and diligently protect it. a client application (native or web) may use the page https://login. however. you will be working with access tokens and refresh tokens. The following additional parameters are returned. This is not a query string.Introducing Chatter REST API Using Tokens 2. this step is skipped. Once Salesforce has confirmed that the client application is authorized. This can be done by using the HTTP Authorization header: Authorization: Bearer <access token> 25 . you must include a valid access token in the request. Using Access Tokens To make a successful Chatter API request. Note that if the user has already authorized the application. the redirection Web page that it uses may include JavaScript that the client application can manipulate in order to retrieve the access and refresh tokens. If the client application is a Web app. Alternatively. Token that can be used in the future to obtain new access tokens (sessions). they aren't used with this flow and Chatter API: • • • • instance_url id signature issued_at 4. Amount of time the access token is valid. in seconds. Once the client application has retrieved the access and refresh tokens. After successfully logging in. You should treat it like the user's password and use appropriate measures to protect it.instance_name/services/oauth2/success as their callback URL. The refresh token is only returned if the redirect URI is https://login. Parameters access_token Description Session ID that you can use for making Chatter API requests. Caution: This value is a secret. Note that the refresh_token parameter values are only provided if the redirection URI is this URI or if the redirection URI uses a custom protocol. This session ID cannot be used in the user interface. Using Tokens As part of both authentication flows. Instead of actually loading the page on redirect. 3.instance_name/services/oauth2/success expires_in refresh_token or used with a custom protocol that is not HTTPS. Using Refresh Tokens If the client application has a refresh token. To ask for a new access token. The refresh token the client application already received.instance_name/services/oauth2/token with the following query parameters: Parameters grant_type refresh_token client_id Description Value must be refresh_token for this flow. If the request yields an error because an access token has been revoked. Values are: • urlencoded • json • xml If this request is successful. The default is json.Introducing Chatter REST API Using Tokens If the request yields an error response due to an expired token. Expected return format. the client application should send a POST request to https://login. the client application must be re-authorized by the user in order to gain access. they aren't used with this flow and Chatter API: • • • • instance_url id signature issued_at 26 . the refresh token can be used to get a new access token. it can use it to send a request for a new access token. however. the server returns a payload holding the access_token. Consumer key from the remote access application definition. You can also include the following optional parameters: Parameters client_secret format Description Consumer secret from the remote access application definition. The following additional parameters are also returned. Chapter 2 Quick Start In this chapter . • • • Prerequisites Step One: Set Up Authorization Step Two: Connect to Chatter API Using OAuth Create a sample application in your development environment to see the power and flexibility of the Chatter REST API.. 27 .. It must be secure: http:// does not work. 5. Your remote access application does not have to reside in the same organization as your users. For development environments. navigate to Your Name > Setup > Develop > Remote Access. Decide where to create your remote access application. 1. Enter the contact email. 6. If any of the steps are unfamiliar. Use this remote access application to connect to the servers.Quick Start Prerequisites Prerequisites Completing the prerequisites make it easier to build and use the quick-start sample: • • • • • Install your development platform according to its product documentation Become familiar with cURL. If you use another tool. Click Save. only https://. you should be familiar enough with it to translate the example code. in the applicationName field. 4. Enter a URL for the Info URL. We provide the steps. and a Consumer Secret is created (click the link to reveal it). 3. the tool used to execute REST requests in this quick start. 2.” 28 . Note: The OAuth 2. or be able to translate samples from JSON to the standard you use.0 specification uses “client” instead of “consumer. as well as any other information appropriate to your application. Become familiar with JavaScript Object Notation (JSON). which requires some setup. Step Two: Connect to Chatter API Using OAuth You must create a remote access application (such as the example in Step One: Set Up Authorization) before you can do this step. Step One: Set Up Authorization Setting up OAuth 2.0. This is the name that is returned in the client info response. If you work with Java it's generally a servlet. Enter a Callback URL. you can consult the online help or the OAuth 2. Enable an SSL endpoint in your application server Become familiar with OAuth 2. In the appropriate organization. It must be the same as your Web application's callback URL. The remote access application you create can be used to sign into any organization.0 documentation. The Consumer Key is created and displayed. but it will help if you are familiarize yourself with terms and concepts. which is used in this quick start.0 requires that you take some steps within your development environment and in other locations. and click New to create a new remote access application. the callback URL is similar to https://instance_name/ConnectTest/oauth/_callback. the value is password. Remote Access Application Label Consumer Key Consumer Secret Callback URL Value in Example client_id client_secret redirect_uri In addition. This example also uses the following values: Name Instance username Consumer key Consumer secret Callback URL Grant type Password Value na1. Important: The OAuth flow being used in this example is not suitable for production client apps because it involves passing in the client secret. "issued_at":"1302907727777".salesforce.com".salesforce.com admin@seattleapps. "instance_url":"https://na1.seattleapps. Generate the access token. For this flow. Use of the username-password flow is not recommended for most applications. "signature":"5jcevY5fUai0lWntuSxkwBzWcvRjd01RCOkIBZpyGv0=".salesforce. "access_token":"00DD0000000FJ6T!AQkAQPde_DMF2vGzddfZmBRS95GojDbtA rKkgukAgZP0OVFYY5KkAqhLw9ejeKIlpJ3FgwGAWeRlBiWRt8mfXEuAZGbZNosk" } 29 .com 3MVG9PhR6g6B7ps4xDycwGrI4PvjVZvK9 8870355475032095511 https://www.com password 1Lsfdc! 1. The following is an example of the cURL command to generate an access token: curl --form client_id=3MVG9PhR6g6B7ps4xDycwGrI4PvjVZvK9 --form client_secret=8870355475032095511 --form grant_type=password --form username=admin@seattleapps. the value of grant_type depends on the OAuth authentication flow you are using.com --form password=1Lsfdc! https://na1.salesforce.com/id/00DD0000000FJ6TMAW/ 005D0000001B5T4IAK".na1.Quick Start Step Two: Connect to Chatter API Using OAuth The following maps the terms used in the remote access application you just created to the OAuth values used in the examples.com/services/oauth2/token The following is the response that includes the access token: { "id":"https://login. curl -X GET https://na1.salesforce.com/services/data/v25.Quick Start Step Two: Connect to Chatter API Using OAuth 2. Access Chatter API using the access token.0/chatter/users/me -H 'Authorization: Bearer 00DD0000000FJ6T!AQkAQPde_DMF2vGzddfZmBRS95Goj DbtArKkgukAgZP0OVFYY5KkAqhLw9ejeKIlpJ3FgwGAWeRlBiWRt8mfXEuAZGbZNosk' 30 . REFERENCE Chapter 3 Chatter API Resources Overview This chapter contains information about the relationships between the resources as well as a tip sheet with the most common Chatter API uses. 31 .0/connect. logged-in user. The Organization resource has the base URL of /services/v25. Please also note: • • Many of the resources use either a specified userId or the keyword me to indicate the current. Chatter API Resources Relationships The following shows the relationships between the various resources. Chatter API Resources Overview Chatter API Resources Relationships Figure 1: Chatter API Resources Relationships Part I 32 . Chatter API Resources Overview Chatter API Resources Relationships Figure 2: Chatter API Resources Relationships Part II 33 . • • • • • • • • • • • • • • • • • Post a feed item? Add a comment to a record or user? Post a comment or feed item with an @mention? Like a feed item? Share a feed item? Get my news feed? Get feed items posted to a record? Get the list of records a specific user follows? Get Chatter activity statistics? Get recommendations of people to follow? Join a group? Post to a group? Follow a record? Unfollow a record? Send a private message? How to create autocomplete for @mentions? Retrieve all the information for a group of users? Use either a request body or request parameters. For more information. . such as /chatter/feeds/news/userId/feed-items. or PUT for Input on page 48. You cannot use both.Chatter API Resources Overview Chatter API: How do I. With a request body. see Using POST. . PATCH. With request parameters. Chatter API: How do I. . Post feed item Resource: HTTP method: Request body: Request parameter: Use one of the feed resources. . use Content-Type: application/x-www-form-urlencoded. use Content-Type: application/json or Content-Type: application/xml. POST Feed Item Input text 34 . .0/chatter/feed-items/ 0D5D0000000DaSbKAK/comments?text=New+comment Returns: Comment 35 .Chatter API Resources Overview Chatter API: How do I.0/chatter/feeds/news /me/feed-items?text=New+post Returns: Feed Item Add comments Resource: HTTP method: Request body: Request parameter: Request body example: { "body" : { "messageSegments" : [ { "type": "Text". "text" : "New post" } ] } } Request parameter example: /services/data/v25. Request body example: { "body" : { "messageSegments" : [ { "type": "Text". . "text" : "New comment" } ] } } /chatter/feed-items/feedItemId/comments POST Comment input text Request parameter example: /services/data/v25. use the Feed-Items resource: /chatter/feed-items/feedItemId/comments POST The appropriate container input. To post a comment. "id" : "005D0000001GpHp" }. such as comment input or feed-item input. "text" : " Did you see the new plans?" } ] } } HTTP method: Request body: Request body example: Note: No spaces are added either before or after the @mention. use one of the feed resources. { "type": "text". . Returns Feed Item Like feed items Resource: HTTP method: Request body: Request parameter: Example: /services/data/v25. .0/chatter/feed-items/0D5D0000000DaZBKA0 /likes /chatter/feed-items/feedItemId/likes POST NA NA Returns: Like 36 . so the text message segment includes a space. Post @mentions Resource: To post a feed-item with an @mention.Chatter API Resources Overview Chatter API: How do I. with the message segment input: mention { "body" : { "messageSegments" : [ { "type": "mention". such as /chatter/feeds/user-profile/userId/feed-items. . ] } } Use one of the feed resources. "text" : "Great post!" }. Resource: HTTP method: Request body: Request parameter: Example: /services/data/v25. POST originalFeedItem originalFeedItem Returns: Feed Item Get news feeds The following gets the news feed of the current user. . Share a feed item Resource: HTTP method: Request body: Request parameter: Request body example: { "body" : { "feedItem" : [ { "originalFeedItem": "0D5D0000000DaZBKA0".0/chatter/feeds/news/me/feed-items /chatter/feeds/news/me/feed-items GET NA NA Returns: Feed Item Page Get feed items for a record Resource: HTTP method: Request body: /chatter/feeds/record/recordId/feed-items GET NA 37 .Chatter API Resources Overview Chatter API: How do I. such as /chatter/feeds/user-profile/userId/feed-items/feedItemId. 0/chatter/feeds/record /005x0000001oXx9AAE/feed-items?page=2011-03-31T20:57:24Z.0D5x0000001C2XPCA0 Returns: Feed Item Page Get list of what user is following Resource: HTTP method: Request body: Request parameter: Request parameter example: /chatter/users/userId/following GET NA page (optional) /services/data/v25.0/chatter/users /005D0000001GLowIAB/following?page=3 Returns: Subscription Page Get Chatter activity statistics Resource: HTTP method: Request body: Request parameter: Example: /services/data/v25. such as nextPageURL.Chatter API Resources Overview Chatter API: How do I.0/chatter/users /005D0000001GLowIAB /chatter/users/userId GET NA NA Returns: User Detail Get recommendations Resource: /chatter/users/me/recommendations/follow/users 38 . in one of the URL parameters. . . Request parameter: page (optional) Note: Page tokens are returned as part of the response body. Request parameter example: /services/data/v25. 0/chatter/users /me/recommendations/follow/users Returns: Recommendation Join a group Resource: HTTP method: Request body: Request parameter: Request body example: Request parameter example: /chatter/groups/groupId/members POST Group member input userId {"userId": "005D0000001GpHp" } /services/data/v25. HTTP method: Request body: Request parameter: Example: GET NA NA /services/data/v25.Chatter API Resources Overview Chatter API: How do I.0/chatter/groups/0F9D000000006bOKAQ /members?userId=005D0000001GpHp Returns: Group Member Post to a group Resource: HTTP method: Request body: Request parameter: /chatter/feeds/record/groupId/feed-items POST Feed item Text 39 . . . "text" : "Has everyone seen the latest building proposal?" } ] } } Request parameter example: /feeds/record/0F9D000000006bO/feed-items? text=Has+everyone+seen+the+latest+building+proposal? Returns: Feed Item Follow a record The subjectId is the ID of the item you want to follow.Chatter API Resources Overview Chatter API: How do I. Request body example: { "body" : { "messageSegments" : [ { "type": "Text". Resource: HTTP method: Request body: Request parameter: /chatter/subscriptions/subscriptionId DELETE NA NA 40 . . Resource: HTTP method: Request body: Request parameter: Request body example: Request parameter example: /chatter/users/me/following POST Following input subjectId { "subjectId" : "001D000000Iyu2p" } /services/data/v25.0/chatter/users/me /following?subjectId=001D000000Iyu2p Returns: Subscription Unfollow records Note that a complete structured resource is not returned. just a return code. . For every two or three characters the user types. . 005D0000001GbdHIAS&Are+we+ready+for+next+week's+customer+meeting? Returns: Message Build a user name autocomplete for @mentions Resource: /chatter/users?q=searchtext where searchtext includes wildcards.0/chatter/users /me/messages?recipients=005D0000001GOYpIAO. "recipients" : ["005D0000001GOYpIAO". Example: /services/data/v25. /chatter/users?q=cha* finds all users whose user names begin with "cha". . you can add a wildcard and get the list of matching user names.0/chatter/subscriptions/0E8D00000001JkFKAU Returns: 204: Successful Delete Send a private message Resource: HTTP method: Request body: Request parameter: /chatter/users/me/messages/ POST Messaging input recipients OR inReplyTo text Request body example: { "body" : "Are we ready for next week's customer meeting?". "005D0000001GbdHIAS"] } Request parameters example: /services/data/v25. For example.0/chatter/users?q=cha* User Page 41 . HTTP method: Request parameter: Request parameters example: Returns: GET q=searchtext /services/data/v25.Chatter API Resources Overview Chatter API: How do I. .005D0000005J3D4HVB. . .0/chatter/users /batch/005D0000001Kl6xIAC. Returns: Batch Results 42 . . Return all user information for multiple users Resource: /chatter/users/batch/user_list where user_list is a list of user Ids. Your app may need to call Chatter API twice: once to get the feed items and user Ids. . HTTP method: Request parameter: Request parameters example: GET NA /services/data/v25.Chatter API Resources Overview Chatter API: How do I. the second time to call this resource with the list of user Ids. Information about the specified comment. groups the user is a member of.0 and later. Posts a new dashboard component snapshot to the specified location.0 and later. Available in versions 24. Available in versions 25.0 and higher. Available in versions 24. Available in versions 24. Available resources are: Bookmarks Feed URL Bookmarks Feed Items Bookmarks Feed Items Flat—Available in versions 25.Chapter 4 Chatter API Resources The following are Chatter API resources: Resource Bookmarks Resources Description Feed made up of Chatter feed items posted to bookmarks saved by the logged-in user. Contains a single resource. Available resources are: Comment Comment Likes Company Feed Resources A feed that returns all updates for people the current user follows. Contains a single resource. and files and records the user is following. Available resources are: Company Feed URL Company Feed Items Favorites Feed Resources Feeds made up of Chatter favorites saved by the logged-in user.0 and later.0 and higher. Chatter Resource Dashboard Component Snapshot Resource Comments Resource Directory of the general resources available. Available resources are: List of Favorites Favorite Feed Favorites Feed Items 43 . Also used to delete a comment. or to like a comment. Filter Feed Resources Feeds filtered by the specified criteria for the logged-in user. Available in versions 24. Available resources are: Files Feed URL Files Feed Items Files Feed Items Flat Available in versions 25. Note: To get the feed for a specific group. including content. Available resources are: Groups Feed URL Groups Feed Items Groups Feed Items Flat—Available in versions 25. 44 . as well as delete a specific feed item.Chatter API Resources Resource Feeds Resource Feed-Items Resources Description A list of all of the feeds the logged in user is able to view.0 and later. Also used to query all feed items.0 and higher. Represents a specific feed item. Available resources are: Feed Item Comments Feed Item Likes Feed Items Query Specific Feed Item Files Resources Information about the specified file. use the Record Feed Resource resource with a groupId. rendered version.0 and higher. Available resources are: List of Filters Keyprefix Filter Feed Keyprefix Filtered Feed Items Filter Feed Items Flat—Available in versions 25. and sharing. post comments to feed-items.0 and higher. Available resources are: File Information File Content File Rendition File Shares Files Feed Resources All feed items that contain files posted by people or groups that the current user follows. Groups Feed Resources All feed items from all groups the current user either owns or is a member of. Contains a single resource. You can also use this resource to add feed-items. Organization Resource People Feed Resources Information about the current user’s organization and settings. This is not a feed. person. Information about groups. Contains a single resource. Available resources are: People Feed URL People Feed Items People Feed Items Flat—Available in versions 25. and the groups the current user is following. which could be a group.0 and higher. The news feed of the current user. Also used to add members to a group and change the group photo. object or file. Record Feed Resource The feed of the specified record.0 and later. All feed items posted by all of the people the current user follows.0 and later. such as the group's members. Available resources are: Record Feed URL Record Feed Items Record Feed Items Flat—Available in versions 25. Contains a single resource. as well as all files. and all users the current user follows. use the Record Feed Resource resource with a groupId.Chatter API Resources Resource Group-Memberships Resource Groups Resources Description Access information about a member of a group. Contains a single resource. Available resources are: List of Groups Batch Group Information Group Files Group Information Group Members Group Photo Influence Resource Likes Resource News Feed Resources List of the percentile thresholds used to categorize an organization’s users by their influence in Chatter. Contains a single resource. Includes feed items from all groups the current user either owns or is a member of. Information about the specified like. Available in versions 24.0 and higher. Available in versions 24. Available resources are: News Feed URL News Feed Items News Feed Items Flat—Available in versions 25. Also used to delete a like. or remove a member from a group. photo. records.0 and higher. To get the feed for a specific group. 45 . Topics Resource User-Profile Feed Resources List of the trending topics for the organization. including posts. To access a record feed. including followers. the user’s files or recommendations.Chatter API Resources Resource Records Resources Description Information about the specified record. This is different than/chatter/feeds/news. use the Record Feed Resource. logged-in user on all records that can be tracked in a feed. Contains a single resource. group updates. Available in versions 24. such as who is following the user. Available resources are: To Feed URL To Feed Items To Feed Items Flat—Available in versions 25. Filtered by Group User Files. This is not a feed. which returns everything in a user's feed. Available resources are: User–Profile Feed URL User–Profile Feed Items User-Profile Feed Items Flat—Available in versions 25. Also used to delete a subscription. Feed of all @mentions of the current user and posts others make to the logged-in user's feed. Available resources are: Batch User Information Change Status of Conversations Users Files. Filtered by Sharing Following Users User Information User Messages. Specific User Recommendations.0 and higher.. To access the user profile feed.0 and later. Users Resources Information about the user. General 46 . and record updates. General User Files.0 and higher. for example. Also used for posting feed items and updating conversation status. Also used to post to the user's feed. General User Messages. Also used to add feed items. Contains a single resource. Feed of all actions by the current. to unfollow a record. This is not a feed. use User-Profile Feed Resources. Available resources are: Record Specifics Record Followers Subscriptions Resource To Feed Resources Information about the specified subscription. such as. To find * or ? inside a phrase. Use a question mark (?) to match one character at the middle or end of your search term. the process flow for using Chatter API is as follows: 1. the plural form). then escape the asterisk (precede it with the \ character). Wildcards Some of the resource request parameters support wildcards. General User Conversations. Specific User Followers User Groups User Photos User Profile Information User Recommendations for a Specific Action User Recommendations for a Specific Action and Object Category User Recommendations for a Specific Action and Object ID User Status—No longer available as of version 25. Tailor your searches to find all variations of a word. If you are searching for a literal asterisk in a word or phrase.0. For example. a search for jo?n finds items with the word john or joan. it is more efficient to specify prospect* in the search string than to specify a less restrictive wildcard search (such as prosp*) that could return extraneous matches (such as prosperity). The escape character (\) is required in order for this search to work correctly. you must enclose your search string in quotation marks and you must escape the special character. to search for all occurrences of the word prospect (or prospects. A search for ma* finds items with mary or marty. Send an HTTP request to Salesforce.Chatter API Resources Resource Description Get Unread Count for Conversations User Conversations. For example. • • Process Flow In general. the faster the search results are returned. For example. you would specify propert*. For example. johnson or johnny. 47 . For example. Punctuation is indexed. consider the following issues: • The more focused your wildcard search. ? When using wildcards. and the more likely the results will reflect your intention. Do not use the question mark wildcard at the beginning of a search term. a search for john* finds items that start with variations on the term john. You can specify the following wildcard characters to match text patterns in your search: Wildcard * Description Use an asterisk (*) to match one or more characters at the middle or end of your search term. "where are you\?" finds the phrase where are you?. Do not use the asterisk at the beginning of a search term. to find property and properties. The following specifies the content-disposition as application/json as well as shows rich JSON input. 4. The system returns an HTTP return code.1 Host: instance_name Content-Length: 817 Content-Type: multipart/form-data. "tag" : "important" }. charset=UTF-8 Content-Transfer-Encoding: 8bit { "body": { "messageSegments" : [ { "type" : "Text". Additional information (such as a Chatter API response body) is optionally included in the response. { "type" : "Hashtag".0. PATCH.0/chatter/feeds/user-profile/005x0000001T9PwAAK/feed-items HTTP/1. or PUT for Input HTTP POST. "text" : "High priority content " }. Request Chatter API resources using an HTTP request.Chatter API Resources 2. name="json" Content-Type: application/json. PATCH. "filename": "2012_q1" 48 . { "type" : "Text". To submit a request using request parameters. You might post a request like this using the /chatter/feeds/news/me/feed-items or /chatter/feed-items/feedItemId/comments resources. For the request body. you must use a Content-Type header parameter with one of the following values: • • application/json application/xml Uploading Binary Files When uploading a new file either in a comment or in a feed post using a request body and Attachment Input: New File Upload. If you pass in both a request body and request parameters. the content type of the request must be multipart/form-data with one binary upload part named feedItemFileUpload parameter and one part holding the serialized input as either application/json or application/xml. "attachment": { "desc": "Quarterly review". generally the request parameters will be ignored." } ] }. sometimes a 400 error is thrown.1 Authorization: Bearer 00Dx00000001hIF!AQ8AQKy6K1Tmko19Au4U29YanMFt53ccip 1969CAg7t. boundary=a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Disposition: form-data. JSON is default. POST /services/data/v25. however. The system authenticates the user and client app. and PUT methods take either request parameters or a JSON/XML request body that can include rich input. 3.vlXqyFyMd8cEh8axN1u8o86yAKBlcuyr7YOdNSnW52qNDppsduxI User-Agent: Jakarta Commons-HttpClient/3. The following is an example of posting a new feed item that includes a binary file. you must use a Content-Type header parameter with application/x-www-form-urlencoded. You must specify the accept type of XML if you want XML back. Using POST. "text" : "Please review this as soon as possible. 0/chatter/feeds/user-profile/005x0000001TBMVAA4/feed-items HTTP/1. you receive an error: Content-Disposition: form-data. boundary=0HWq8x4y4DSQ4fqjXt6MinVMyqbf1r --0HWq8x4y4DSQ4fqjXt6MinVMyqbf1r Content-Disposition: form-data. charset=ISO-8859-1 Content-Transfer-Encoding: binary binary stream of file --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq-- Spacing and carriage returns or line feeds (CRLF) are important. filename="2012_q1_review. name="feedItemFileUpload". name="xml" Content-Type: application/xml. filename="2012_q1_review. filename="2012_q1_review.ppt" Content-Type: application/octet-stream. charset=ISO-8859-1 Content-Transfer-Encoding: binary binary stream of file --0HWq8x4y4DSQ4fqjXt6MinVMyqbf1r-- 49 . name="feedItemFileUpload". if you have a CRLF instead of spaces. this example uses XML: POST /services/data/v25. name="feedItemFileUpload". however.1 Host: instance_name Content-Length: 897 Content-Type: multipart/form-data.ppt" Content-Type: application/octet-stream. The following is also an example of posting a new feed item. charset=UTF-8 Content-Transfer-Encoding: 8bit <feedItem> <body> <messageSegments> <segment> <text>High priority content </text> <type>Text</type> </segment> <segment> <tag>important</tag> <type>Hashtag</type> </segment> <segment> <text>Please review this as soon as possible</text> <type>Text</type> </segment> </messageSegments> </body> <attachment> <desc>Quarterly review</desc> <filename>2012_q1</filename> </attachment> </feedItem> --0HWq8x4y4DSQ4fqjXt6MinVMyqbf1r Content-Disposition: form-data.Chatter API Resources } } --a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq Content-Disposition: form-data.ppt" Also see Form-based File Upload in HTML and User–Profile Feed Items on page 132. in the following line.0.1 Authorization: Bearer 00Dx00000001hQs!ASAAQClqZ7lCeGp01tC1ap0DG3eTWXxYw _5YV9l3fSBRqdfshcE7yZa8weqxMR2DIMjLnUhIetykeydyLphphQYeG5vJFQlt Accept: application/xml User-Agent: Jakarta Commons-HttpClient/3. For example. 0 and later.0. name="xml" Content-Type: application/xml.0/chatter/feed-items/0D5x00000000RryCAE/comments HTTP/1. see User–Profile Feed Items on page 132. see Comments Resource on page 57. filename="2012_q1_review.SeattleApps.Chatter API Resources Bookmarks Resources For more information on the resource. Bookmarks Resources Feed made up of Chatter feed items posted to bookmarks saved by the logged-in user. boundary=F9jBDELnfBLAVmLNbnLIYibT5Icp0h3VJ7mkI --F9jBDELnfBLAVmLNbnLIYibT5Icp0h3VJ7mkI Content-Disposition: form-data. name="feedItemFileUpload". The following is the XML version of posting a comment. POST /services/data/v25.ppt" Content-Type: application/octet-stream.1 Host: instance_name Content-Length: 978 Content-Type: multipart/form-data. Available in versions 24. charset=ISO-8859-1 Content-Transfer-Encoding: binary binary stream of file --F9jBDELnfBLAVmLNbnLIYibT5Icp0h3VJ7mkI-- For more information on the resource.1 Authorization: Bearer 00Dx00000001hQs!ASAAQGmoa_8P5XX7G6LP92kXX7IkPm0vCa E2q23jvofDMWT9VUlkAYD2iuyCT2269Z_Gfd6Tdu08asLYsfSargwhYyHzC3RR Accept: application/xml User-Agent: Jakarta Commons-HttpClient/3. 50 . charset=UTF-8 Content-Transfer-Encoding: 8bit <comment> <body> <messageSegments> <segment> <text>Please review this file</text> <type>Text</type> </segment> <segment> <url>http://www.com/QuarterlyReviews</url> <type>Link </type> </segment> <segment> <tag>2012_q1</tag> <type>Hashtag</type> </segment> <segment> <type>Mention</type> <id>005x0000001TBMT</id> </segment> </messageSegments> </body> <attachment> <desc>2012 Q1 Review</desc> <fileName>2012_q1_review</fileName> </attachment> </comment> --F9jBDELnfBLAVmLNbnLIYibT5Icp0h3VJ7mkI Content-Disposition: form-data. Returns a flat feed. a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level. HTTP methods GET or HEAD Request parameter Parameter Name sort Type String. One of the following: • CreatedDateDesc • LastModifiedDateDesc Description Sorts the returned feed either by created date in ascending order. Bookmarks Feed URL Returns the URL for the bookmarks feed for the logged-in user. or by last modified date. also in ascending order. All items are returned in chronological order. Resource /chatter/feeds/bookmarks/me OR /chatter/feeds/bookmarks/userId Note: userId must be the same as the logged-in user.Chatter API Resources Bookmarks Resources To bookmark an item. use PATCH with the Feed Item resource and the isBookmarkedByCurrentUser parameter. that is. Response body Feed 51 . Returns all feed items for all bookmarks for the logged-in user. The default is CreatedDateDesc. For example: /feed-item/0D5D0000000Ir6zKAC?isBookmarkedByCurrentUser=true Available resources are: Resource /chatter/feeds/bookmarks/me /chatter/feeds/bookmarks/me/feed-items /chatter/feeds/bookmarks/me/feed-items/flat Description Returns the URL for the bookmarks feed for the logged-in user. in one of the URL parameters. If you don't specify a size. sort String. for example: "nextPageUrl": "/services/data/v25. Resource /chatter/feeds/bookmarks/me/feed-items OR /chatter/feeds/bookmarks/userId/feed-items Note: userId must be the same as the logged-in user. also in ascending order. the default is 25. such as nextPageURL. 0D5D0000000DSv4KAG" pageSize Integer Specifies the number of items per page. Valid values are between 1 and 100. HTTP methods GET or HEAD Request parameters Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed.Chatter API Resources Bookmarks Resources Bookmarks Feed Items Returns all feed items for all bookmarks for the logged-in user. One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body Feed Item Page 52 . Page tokens are returned as part of the response body. The default is CreatedDateDesc. Sorts the returned feed either by created date in ascending order. or by last modified date.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z. Chatter API Resources Bookmarks Resources Example response body { "currentPageUrl": "/services/data/v25.0/chatter/feeds/bookmarks/005D0000001Kl6xIAC/feed-items", "isModifiedUrl": null, "items": [ { "actor": { "companyName": "Seattle Apps", "firstName": "Marion", "id": "005D0000001Kl6xIAC", "isChatterGuest": false, "lastName": "Raven", "mySubscription": null, "name": "Marion Raven", "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F", "photoVersionId": "729D00000000BDV", "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }, "title": null, "type": "User", "url": "/services/data/v25.0/chatter/users/005D0000001Kl6xIAC" }, "attachment": { "description": "Sharing feed items policy.", "downloadUrl": "/services/data/v25.0/chatter/files/069D00000000xNXIAY/content?versionNumber=2", "fileSize": "371033", "fileType": "Adobe PDF", "hasImagePreview": true, "hasPdfPreview": true, "id": "069D00000000xNXIAY", "mimeType": "application/pdf", "title": "ReviewForJohn", "versionId": "068D00000000uFE" }, "body": { "messageSegments": [{ "text": "More testing of files", "type": "Text" }], "text": "More testing of files" }, "clientInfo": null, "comments": { "comments": [], "currentPageUrl": "/services/data/v25.0/chatter/feed-items/0D5D0000000Gh5VKAS/comments", "nextPageUrl": null, "total": 0 }, "createdDate": "2011-11-10T20:02:10.000Z", "event": false, "id": "0D5D0000000Gh5VKAS", "isBookmarkedByCurrentUser": true, "isLikedByCurrentUser": false, "likes": { "currentPageUrl": "/services/data/v25.0/chatter/feed-items/0D5D0000000Gh5VKAS/likes", "likes": [], "nextPageUrl": null, 53 Chatter API Resources Bookmarks Resources "previousPageUrl": null, "total": 0 }, "modifiedDate": "2011-11-10T20:02:10.000Z", "myLike": null, "originalFeedItem": null, "originalFeedItemActor": null, "parent": { "companyName": "Seattle Apps", "firstName": "Marion", "id": "005D0000001Kl6xIAC", "isChatterGuest": false, "lastName": "Raven", "mySubscription": null, "name": "Marion Raven", "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F", "photoVersionId": "729D00000000BDV", "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }, "title": null, "type": "User", "url": "/services/data/v25.0/chatter/users/005D0000001Kl6xIAC" }, "photoUrl": "https://instance_name/profilephoto/729D00000000BDV/T", "type": "ContentPost", "url": "/services/data/v25.0/chatter/feed-items/0D5D0000000Gh5VKAS" }, { "actor": { "companyName": "Seattle Apps", "firstName": "Marion", "id": "005D0000001Kl6xIAC", "isChatterGuest": false, "lastName": "Raven", "mySubscription": null, "name": "Marion Raven", "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F", "photoVersionId": "729D00000000BDV", "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }, "title": null, "type": "User", "url": "/services/data/v25.0/chatter/users/005D0000001Kl6xIAC" }, "attachment": null, "body": { "messageSegments": [{ "text": "created this group.", "type": "Text" }], "text": "created this group." }, "clientInfo": null, "comments": { "comments": [], "currentPageUrl": "/services/data/v25.0/chatter/feed-items/0D5D0000000F4JnKAK/comments", "nextPageUrl": null, "total": 0 }, 54 Chatter API Resources Bookmarks Resources "createdDate": "2011-09-21T20:23:46.000Z", "event": true, "id": "0D5D0000000F4JnKAK", "isBookmarkedByCurrentUser": true, "isLikedByCurrentUser": false, "likes": { "currentPageUrl": "/services/data/v25.0/chatter/feed-items/0D5D0000000F4JnKAK/likes", "likes": [], "nextPageUrl": null, "previousPageUrl": null, "total": 0 }, "modifiedDate": "2011-09-21T20:23:46.000Z", "myLike": null, "originalFeedItem": null, "originalFeedItemActor": null, "parent": { "canHaveChatterGuests": true, "description": "Each week we test different apps with live customers! This group is for invites and comments.", "fileCount": 0, "id": "0F9D00000000FG5KAM", "lastFeedItemPostDate": "2011-09-21T20:23:46.000Z", "memberCount": 3, "myRole": "GroupOwner", "mySubscription": { "id": "0FBD00000002oJqOAI", "url": "/services/data/v25.0/chatter/group-memberships/0FBD00000002oJqOAI" }, "name": "Testing User Experience", "owner": { "companyName": "Seattle Apps", "firstName": "Marion", "id": "005D0000001Kl6xIAC", "isChatterGuest": false, "lastName": "Raven", "mySubscription": null, "name": "Marion Raven", "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F", "photoVersionId": "729D00000000BDV", "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }, "title": null, "type": "User", "url": "/services/data/v25.0/chatter/users/005D0000001Kl6xIAC" }, "photo": { "largePhotoUrl": "https://instance_name/profilephoto/0F9/F", "photoVersionId": null, "smallPhotoUrl": "https://instance_name/profilephoto/0F9/T" }, "type": "CollaborationGroup", "url": "/services/data/v25.0/chatter/groups/0F9D00000000FG5KAM", "visibility": "PrivateAccess" }, "photoUrl": "https://instance_name/profilephoto/729D00000000BDV/T", "type": "TrackedChange", "url": "/services/data/v25.0/chatter/feed-items/0D5D0000000F4JnKAK" } ], 55 Chatter API Resources Bookmarks Resources "nextPageUrl": null } Bookmarks Feed Items Flat Returns a flat feed, that is, a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level. All items are returned in chronological order. Available in versions 25.0 and higher. Resource /chatter/feeds/bookmarks/me/feed-items/flat or /chatter/feeds/bookmarks/userId/feed-items/flat Note: userId must be the same as the logged-in user. HTTP methods GET or HEAD Request parameters Parameter Name numFeedItems Type Integer Description Specifies the number of feed items returned. Valid values are between 0 and 100. Default value is 25. Because feed items may include comments, specifying 25 flat feed items may actually return more. For example, if each feed item has one comment, and recentCommentCount is greater than 1, 50 flat feed items are returned. A generated token that indicates the view of feed items in the feed. Page tokens are returned as part of the response body, in one of the URL parameters, such as nextPageURL. Specifies the number of recent comments returned. Valid values are between 0 and 25. Default value is 3. Sorts the returned feed either by created date in ascending order, or by last modified date, also in ascending order. The default is LastModifiedDateDesc page Token recentCommentCount Integer sort String. One of the following: • CreatedDateDesc • LastModifiedDateDesc 56 Also used to delete a comment. Also used to delete a comment.0/chatter/feeds" } Comments Resource Information about the specified comment.0/chatter/groups". Comment Returns information about the specified comment. Resource /chatter HTTP methods GET or HEAD Response body Chatter Directory Example response body { "groups" : "/services/data/v25.0 and later. Returns information about the likes for the specified comment. "users" : "/services/data/v25.Chatter API Resources Chatter Resource Response body Flat Feed Chatter Resource Directory of the general resources available. Also used to delete a comment. Resource /chatter/comments/commentId 57 .0/connect/organization". Available resources: Resource /chatter/comments/commentId /chatter/comments/commentId/likes Description Returns information about the specified comment.0/chatter/users". Available in versions 24. "feeds" : "/services/data/v25. Also used to add a like to a comment. "organization" : "/services/data/v25. or to like a comment. "myLike": null.000+0000". "name": "Marion Raven".0/chatter/users/005D0000001Kl6xIAC" }. "id": "0D7D00000000MKbKAM". "lastName": "Raven". "user": { "companyName": "Seattle Apps". DELETE or HEAD Response body for GET or HEAD Comment Example You can find the ID for a specific comment from any feed.0/chatter/feed-items/0D5D0000000Gh5VKAS" }. "text": "Has everyone reviewed this?" }. "firstName": "Marion". "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }. "type": "Text" }]. such as a news feed or a record feed. "createdDate": "2011-12-12T21:53:12. 58 . "photoVersionId": "729D00000000BDV". "clientInfo": null. "type": "TextComment".Chatter API Resources Comments Resource HTTP methods GET.0/chatter/comments/0D7D00000000MKbKAM". "nextPageUrl": null. "isChatterGuest": false. "parent": { "id": "005D0000001Kl6xIAC". "deletable": true. Use the following resource and the HTTP method GET to return information about a comment: /chatter/comments/0D7D00000000LdQKAU Which returns the following: { "attachment": null. "likes": { "currentPageUrl": "/services/data/v25. "url": "/services/data/v25. "title": null. "type": "User".0/chatter/comments/0D7D00000000MKbKAM/likes". "likes": []. "total": 0 }. "body": { "messageSegments": [{ "text": "Has everyone reviewed this?". "previousPageUrl": null. "url": "/services/data/v25. "mySubscription": null. "url": "/services/data/v25. "feedItem": { "id": "0D5D0000000Gh5VKAS". "id": "005D0000001Kl6xIAC". "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F". Valid values are between 1 and 100. Also used to add a like to a comment. Parameter Name page pageSize Type Integer Integer Description Specifies the number of the page you want returned.Chatter API Resources Company Feed Resources "url": "/services/data/v25.0/chatter/users/005D0000001Kl6xIAC" } } Comment Likes Returns information about the likes for the specified comment. Available resources are: Resource /chatter/feeds/company /chatter/feeds/company/feed-items Description Returns a URL to the company feed. Resource /chatter/comments/commentId/likes HTTP methods GET. POST or HEAD Request parameters for GET or HEAD Note: POST takes no request parameters. Specifies the number of items per page. nor a request body. 59 . Response body for GET or HEAD Like Page Response body for POST Like Company Feed Resources A feed that returns all updates for people the current user follows. the default is 25. groups the user is a member of. If you don't specify a size. Returns the feed items of a company feed. and files and records the user is following. Page tokens are returned as part of the response body. Resource /chatter/feeds/company/feed-items HTTP methods GET or HEAD Request parameters Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. Response body Feed Example response body { "feedItemsUrl": "/services/data/v25. } Company Feed Items Returns the feed items of a company feed. One of the following: • CreatedDateDesc • LastModifiedDateDesc Description Sorts the returned feed either by created date in ascending order. also in ascending order. The default is CreatedDateDesc. Resource /chatter/feeds/company HTTP methods GET or HEAD Request parameters Parameter Name sort Type String.Chatter API Resources Company Feed Resources Company Feed URL Returns a URL to the company feed. or by last modified date. in one of the URL 60 .0/chatter/feeds/company/feed-items". 61 . or by last modified date. the default is 25. "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D000000007ux/F". "title": "Service Engineer". "type": "Text" }]. "isChatterGuest": false. "url": "/services/data/v25. If you don't specify a size. Valid values are between 1 and 100.0/chatter/feeds/company/feed-items". One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body Feed Item Page Example response body { "currentPageUrl": "/services/data/v25.Chatter API Resources Company Feed Resources Parameter Name Type Description parameters.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z. "lastName": "Grant". "mySubscription": null. also in ascending order. "body": { "messageSegments": [{ "text": "Working today on Dreamforce presentation. "firstName": "Adam". The default is CreatedDateDesc. such as nextPageURL. "items": [ { "actor": { "companyName": "Seattle Apps". "id": "005D0000001Gl4rIAC".0/chatter/users/005D0000001Gl4rIAC" }.". for example: "nextPageUrl": "/services/data/v25. "name": "Adam Grant". "type": "User". 0D5D0000000DSv4KAG" pageSize Integer Specifies the number of items per page. "attachment": null. Sorts the returned feed either by created date in ascending order. sort String. "smallPhotoUrl": "https://instance_name/profilephoto/729D000000007ux/T" }. "title": "Service Engineer". "clientInfo": null.Chatter API Resources Dashboard Component Snapshot Resource "text": "Working today on Dreamforce presentation. "url": "/services/data/v25.000Z". } "nextPageUrl": null } Dashboard Component Snapshot Resource Posts a new dashboard component snapshot to the specified location. { "actor": { .000Z". "nextPageUrl": null. "mySubscription": null.0/chatter/users/005D0000001Gl4rIAC" }. "name": "Adam Grant". "currentPageUrl": "/services/data/v25. } . . "previousPageUrl": null. "comments": { "comments": []. "likes": { "currentPageUrl": "/services/data/v25. "firstName": "Adam". . "id": "0D5D0000000IqJqKAK".0/chatter/feed-items/0D5D0000000IqJqKAK" }. "type": "UserStatus"." }. "nextPageUrl": null. "isLikedByCurrentUser": false. "lastName": "Grant". "total": 0 }. "smallPhotoUrl": "https://instance_name/profilephoto/729D000000007ux/T" }. "event": false. "id": "005D0000001Gl4rIAC". "isChatterGuest": false.0 and higher. "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D000000007ux/F". 62 .0/chatter/feed-items/0D5D0000000IqJqKAK/comments". Available in versions 25. "createdDate": "2011-08-22T22:04:18. "parent": { "companyName": "Seattle Apps". "photoUrl": "https://instance_name/profilephoto/729D000000007ux/T".0/chatter/feed-items/0D5D0000000IqJqKAK/likes". . "type": "User". "url": "/services/data/v25. "total": 0 }. . "myLike": null. "likes": []. "modifiedDate": "2011-08-22T22:04:18. "currentUserLike": null. the root XML tag is expected to be <dashboardComponentSnapshot>. Optional. Optional. Optional. A third dashboard filter item Id. if other than the creator. Optional. group. A user Id from which the view of the dashboard will be created. String String String String Description A user. Text that accompanies the dashboard component snapshot. not /services/data/v25. A dashboard filter item Id. A user Id from which the view of the dashboard will be created. Contains the text that accompanies the feed item associated with the dashboard component snapshot. 63 . or dashboard Id to which you are posting the snapshot. if other than the creator. A second dashboard filter item Id. A dashboard filter item Id. A second dashboard filter item Id.0/chatter. Optional. A third dashboard filter item Id. runningUserId String Request parameters Name parentId filterId1 filterId2 filterId3 feedItemText runningUserId Type String String.0/connect. Name parentId filterId1 filterId2 filterId3 feedItemBody Type String String String String Message Body Input Description A user. or dashboard Id to which you are posting the snapshot.Chatter API Resources Dashboard Component Snapshot Resource Note: This resource is under the base URL of /services/data/v25. Optional. Resource /connect/dashboards/components/componentId/snapshots HTTP methods POST Request body In XML form. Optional. Optional. group. Available resources are: Resource /chatter/feeds/favorites/me /chatter/feeds/favorites/me/favoriteId Description Returns a list of all the favorites for the logged-in user. Can also be used to create a favorite.0 and later.Chatter API Resources Favorites Feed Resources Response body Feed Item Attachment: Dashboard Favorites Feed Resources Feeds made up of Chatter favorites saved by the logged-in user. /chatter/feeds/favorites/me/favoriteId/feed-items Returns a filtered feed. list views. or topics that the logged-in user has starred. HTTP methods GET. the root XML tag is expected to be <favorite>. Can also be used to delete the specified favorite. This parameter can only be used with saved searches and not list views. or POST Request body for POST Available in versions 24. Available in versions 24.0 and later. Returns the feed for the specified favorite. HEAD. Can also be used to create a favorite. 64 . In XML form. only showing those feed items for the List of Favorites Returns a list of all the favorites for the logged-in user. specified favorite. Resource /chatter/feeds/favorites/me or /chatter/feeds/favorites/userId Note: userId must be the same as the logged-in user. Name searchText Type String Description Text of the search that comprises the favorite. Favorites are searches. feed items. Response body for GET or HEAD Favorites Page Response body for POST Favorite Sample response body for GET {"favorites": [{ "createdBy": { "companyName": "Seattle Apps". "type": "Search". "name": "Marion Raven". "url": "/services/data/v25. "id": "005D0000001Kl6xIAC". "searchText": "dreamforce".000Z". "id": "07FD00000000GhmMAE".0/chatter/feeds/favorites/me/07FD00000000Ghm/feed-items". This parameter can only be used with saved searches and not list views. "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }. "photoVersionId": "729D00000000BDV". "user": { "companyName": "Seattle Apps".0/chatter/users/005D0000001Kl6xIAC" 65 . "lastName": "Raven". "name": "dreamforce". "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F". "type": "User". "type": "User". "isChatterGuest": false. "title": null. "mySubscription": null. "mySubscription": null. "id": "005D0000001Kl6xIAC". "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }. "firstName": "Marion". "isChatterGuest": false. "title": null.0/chatter/feeds/favorites/me/07FD00000000GhmMAE". "firstName": "Marion". "photoVersionId": "729D00000000BDV". "url": "/services/data/v25. "name": "Marion Raven". "lastName": "Raven". "url": "/services/data/v25. "lastViewDate": "2011-10-13T21:52:50. "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F".Chatter API Resources Favorites Feed Resources Request parameters for POST Name searchText Type String Description Text of the search that comprises the favorite. "feedUrl": "/services/data/v25.0/chatter/users/005D0000001Kl6xIAC" }. or DELETE Request parameter for GET or HEAD Parameter Name sort Type String. 66 . the root XML tag is expected to be <favorite>. HEAD. One of the following: • CreatedDateDesc • LastModifiedDateDesc Description Sorts the returned feed either by created date in ascending order. Can also be used to delete the specified favorite. Request body for PATCH Available in versions 24. also in ascending order. The default is CreatedDateDesc. or by last modified date. HTTP methods GET.0 and later. In XML form. PATCH. Resource /chatter/feeds/favorites/me/favoriteId or /chatter/feeds/favorites/userId/favoriteId Note: userId must be the same as the logged-in user. Default value is false. Name updateLastViewDate Type Boolean Description Sets the last view date of the specified feed favorite to the current system time.Chatter API Resources Favorites Feed Resources } }]} Favorite Feed Returns the feed for the specified favorite. for example: "nextPageUrl": "/services/data/v25. in one of the URL parameters.Chatter API Resources Favorites Feed Resources Request parameter for PATCH Parameter Name updateLastViewDate Type Boolean Description Sets the last view date of the specified feed favorite to the current system time. such as nextPageURL. 0D5D0000000DSv4KAG" 67 . only showing those feed items for the specified favorite. Page tokens are returned as part of the response body. Default value is false. Resource /chatter/feeds/favorites/me/favoriteId/feed-items or /chatter/feeds/favorites/userId/favoriteId/feed-items Note: userId must be the same as the logged-in user. Response body for GET or HEAD Feed Response body for PATCH Favorite Favorites Feed Items Returns a filtered feed.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z. HTTP methods GET or HEAD Request parameters Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. Valid values are between 1 and 100. Use the given labels returned in this resource and avoid hard-coding any of these values.0/chatter/feeds/groups/me/feed-items". the different feeds may have unique labels as well as URLs.Chatter API Resources Feeds Resource Parameter Name pageSize Type Integer Description Specifies the number of items per page. If you don't specify a size. sort String. "feedUrl" : "/services/data/v25.0/chatter/feeds/groups/me" }. { "label" : "My Chatter". "feedItemsUrl" : "/services/data/v25. "feedUrl" : "/services/data/v25. One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body Feed Item Page Feeds Resource A list of all of the feeds the logged in user is able to view.0/chatter/feeds/files/me" }.0/chatter/feeds/bookmarks/me/feed-items". the default is 25. 68 . or by last modified date. "feedItemsUrl" : "/services/data/v25. also in ascending order. In addition. Each user may have a different set of feeds.0/chatter/feeds/bookmarks/me" }. Resource /chatter/feeds/ HTTP methods GET or HEAD Response body Feed Directory Example response body { "feeds" : [ { "label" : "Bookmarks". Sorts the returned feed either by created date in ascending order. { "label" : "Groups". "feedItemsUrl" : "/services/data/v25. Use this resource to determine what feeds are available. The default is CreatedDateDesc.0/chatter/feeds/files/me/feed-items". "feedUrl" : "/services/data/v25. { "label" : "Files". { "label" : "People". "type" : "User" }.0/chatter/feeds/to/me" }.000Z" } ] } 69 . "type" : "Search". "feedItemsUrl" : "/services/data/v25.0/chatter/users/005D0000001Kl6xIAC". "url" : "/services/data/v25. "id" : "07FD00000000GhmMAE". "feedUrl" : "/services/data/v25. "type" : "User" }. "lastName" : "Raven". "title" : null. { "label" : "Record".0/chatter/feeds/news/me" }. "isChatterGuest" : false. "feedUrl" : "/services/data/v25. "id" : "005D0000001Kl6xIAC". { "label" : "User Profile".0/chatter/feeds/favorites/me/07FD00000000Ghm/feed-items".0/chatter/feeds/to/me/feed-items". "smallPhotoUrl" : "https://instance_name/profilephoto/729D00000000BDV/T" }. "photoVersionId" : "729D00000000BDV". "feedUrl" : "/services/data/v25. "smallPhotoUrl" : "https://instance_name/profilephoto/729D00000000BDV/T" }. "favorites" : [ { "name" : "dreamforce". "lastName" : "Raven". "companyName" : "Seattle Apps". "photoVersionId" : "729D00000000BDV".0/chatter/feeds/people/me/feed-items".0/chatter/feeds/user-profile/me/feed-items". "firstName" : "Marion". "feedItemsUrl" : "/services/data/v25. "feedItemsUrl" : "/services/data/v25. "firstName" : "Marion". "searchText" : "dreamforce".Chatter API Resources Feeds Resource "feedItemsUrl" : "/services/data/v25. "photo" : { "largePhotoUrl" : "https://instance_name/profilephoto/729D00000000BDV/F". "url" : "/services/data/v25. "feedItemsUrl" : "/services/data/v25. "feedUrl" : "/services/data/v25. "title" : null.0/chatter/feeds/user-profile/me" } ]. { "label" : "Me". "lastViewDate" : "2011-10-13T21:52:50. "createdBy" : { "name" : "Marion Raven". "companyName" : "Seattle Apps". "url" : "/services/data/v25.0/chatter/feeds/news/me/feed-items". "photo" : { "largePhotoUrl" : "https://instance_name/profilephoto/729D00000000BDV/F". "user" : { "name" : "Marion Raven".0/chatter/feeds/record/me" }. "mySubscription" : null.0/chatter/feeds/record/me/feed-items". "feedUrl" : "/services/data/v25.0/chatter/feeds/favorites/me/07FD00000000GhmMAE". "isChatterGuest" : false.0/chatter/users/005D0000001Kl6xIAC". "feedUrl" : "/services/data/v25. "id" : "005D0000001Kl6xIAC". "mySubscription" : null.0/chatter/feeds/people/me" }. or to post a comment. Resource /chatter/feed-items?q=searchTerm HTTP methods GET or HEAD Request parameters Parameter Name page pageSize Type Token Integer Description A generated token that indicates the view of feed items in the feed. as well as feed items that have comments that contain the search term. Valid values are between 1 and 100. including tracked changes. All types of feed items are searched. as well as delete a specific feed item. or to add a like to a specific feed item. Also used to mark a feed item as bookmarked. Used to access or delete a specific feed item.Chatter API Resources Feed-Items Resources Feed-Items Resources Represents a specific feed item. post comments to feed-items. Available resources: Resource /chatter/feed-items?q=searchTerm Description Used to search for specific feed items. /chatter/feed-items/feedItemId /chatter/feed-items/feedItemId/comments /chatter/feed-items/feedItemId/likes Feed Items Query Used to search for specific feed items. as well as feed items that have comments that contain the search term. including tracked changes. Used to access comments for a specific feed item. A search returns feed items with the search term in the feed item body. A search returns feed items with the search term in the feed item body. The query parameter (q) is required with this resource. If 70 . You can also use wildcards with the query parameter. The query parameter (q) is required with this resource. Specifies the number of items per page. Also used to query all feed items. All types of feed items are searched. Used to access likes for a specific feed item. For more information about wildcards. not including any wildcards. Also used to mark a feed item as bookmarked. The search string must contain at least two characters.Chatter API Resources Specific Feed Item Parameter Name Type Description you don't specify a size. or HEAD Request body for PATCH In XML form. Specify false to remove this feed item from the list of bookmarked feed items for the current user. as well as feed items that have comments that contain the search term. Request parameter for PATCH Parameter Name isBookmarkedByCurrentUser Type Boolean Description Specify true to add the current feed item to the list of bookmarked feed items for the current user. Specify 71 . q String Specify the string to search. see Wildcards on page 47. the root XML tag is expected to be <feedItem>. the default is 25. Parameter Name isBookmarkedByCurrentUser Type Boolean Description Specify true to add the current feed item to the list of bookmarked feed items for the current user. PATCH. Response body Feed Item Page Specific Feed Item Used to access or delete a specific feed item. including tracked changes. DELETE. The search returns feed items with the search term in the feed item body. Note: The query parameter searches all types of feed items. Resource /chatter/feed-items/feedItemId HTTP methods GET. "firstName" : "Pierre". PATCH. "companyName" : "Seattle Apps". "id" : "0D5D0000000HvPwKAK". "nextPageUrl" : null.0/chatter/feed-items/0D5D0000000HvPwKAK". "currentPageUrl" : "/services/data/v25. "isBookmarkedByCurrentUser" : false.0/chatter/feed-items/0D5D0000000HvPwKAK/likes". or HEAD Feed Item Example response body { "parent" : { "name" : "Pierre Delacruix".Chatter API Resources Specific Feed Item Parameter Name Type Description false to remove this feed item from the list of bookmarked feed items for the current user. "createdDate" : "2012-04-20T22:49:34. "mySubscription" : null. "text" : "Reviewed the Racer 5 proposal" } ] }. "nextPageUrl" : null. "isLikedByCurrentUser" : false. "likes" : { "total" : 0. "body" : { "text" : "Reviewed the Racer 5 proposal". "comments" : { "total" : 0.0/chatter/feed-items/0D5D0000000HvPwKAK/comments" }. "clientInfo" : null. "messageSegments" : [ { "type" : "Text". "comments" : [ ]. "modifiedDate" : "2012-04-20T22:49:34. 72 . "myLike" : null. "previousPageUrl" : null }. "smallPhotoUrl" : "https://instance_name/profilephoto/729D00000000Fj1/T" }. "title" : null. "currentPageUrl" : "/services/data/v25. "isDeleteRestricted" : false.000Z". "lastName" : "Delacruix". "isActive" : true. "photoVersionId" : "729D00000000Fj1". "photoUrl" : "https://instance_name/profilephoto/729D00000000Fj1/T". Response body for GET. "id" : "005D0000001L3zVIAS".0/chatter/users/005D0000001L3zVIAS". "isChatterGuest" : false. "photo" : { "largePhotoUrl" : "https://instance_name/profilephoto/729D00000000Fj1/F". "type" : "TextPost".000Z". "actor" : { "name" : "Pierre Delacruix". "likes" : [ ]. "url" : "/services/data/v25. "title" : null. "url" : "/services/data/v25. "type" : "User" }. or to post a comment. "originalFeedItem" : null. "type" : "User" }.Chatter API Resources Feed Item Comments "firstName" : "Pierre". "mySubscription" : null. "isChatterGuest" : false. "originalFeedItemActor" : null } Feed Item Comments Used to access comments for a specific feed item. "event" : false. Name attachment Type Depends on type. "smallPhotoUrl" : "https://instance_name/profilephoto/729D00000000Fj1/T" }. "url" : "/services/data/v25. "isActive" : true. the root XML tag is expected to be <comment>. Description Optional Values are: • Attachment Input: Existing Content • Attachment Input: Link • Attachment Input: New File Upload Note: If you’re uploading a new file. "id" : "005D0000001L3zVIAS". "companyName" : "Seattle Apps". See Using POST. "lastName" : "Delacruix". POST or HEAD Request body for POST Available in versions 24.0/chatter/users/005D0000001L3zVIAS". In XML form.0 and later. "photo" : { "largePhotoUrl" : "https://instance_name/profilephoto/729D00000000Fj1/F". "photoVersionId" : "729D00000000Fj1". or PUT for Input on page 48. PATCH. you must include a binary file in the multipart request. body Message Body Input Description of message body 73 . "attachment" : null. Resource /chatter/feed-items/feedItemId/comments HTTP methods GET. Optional. Page tokens are returned as part of the response body.0/ chatter/feeds/news/ 74 . Attention: This parameter should not be used as of version 24. text title String String Text of the feed item. Use title instead. Contents of file to be uploaded.0. Optional. File name of a file to be uploaded and posted. feedItemFileUpload String Either contentDocumentId or feedItemFileUpload is required for file posts. Must be an absolute path. For text posts: Parameter Name text Type String Description Text of the feed item. Only used with fileName. Required or Optional Required Request parameters for GET or HEAD Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. Required or Optional Either contentDocumentId or feedItemFileUpload is required for file posts. Available in versions 24. desc String Description of file being posted. for example: "nextPageUrl": "/services/data/v25. fileName String Required. Title of the file.Chatter API Resources Feed Item Comments Request parameters for POST For file posts: Parameter Name contentDocumentId Type String Description ID of an existing file to be posted. such as nextPageURL.0 and later. Optional. in one of the URL parameters. "firstName" : "Adam". sort String. One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body for GET or HEAD Comment Page Response body for POST Comment Example response body using POST { "parent" : { "id" : "005D0000001Gl4rIAC". "body" : { "text" : "What are the new dates?". "url" : "/services/data/v25.0/chatter/users/005D0000001Gl4rIAC" }. "user" : { "name" : "Adam Grant". "id" : "0D7D00000000LflKAE". "createdDate" : "2011-08-24T18:06:30. "mySubscription" : null.0/chatter/comments/0D7D00000000LflKAE". "companyName" : "Seattle Apps".0/chatter/users/005D0000001Gl4rIAC" }. If you don't specify a size. Valid values are between 1 and 100. "largePhotoUrl" : "https://instance_name/profilephoto/729D000000007ux/F" }. "id" : "005D0000001Gl4rIAC". Sorts the returned feed either by created date in ascending order. the default is 25.000+0000". "lastName" : "Grant". "isChatterGuest" : false. or by last modified date. also in ascending order. 75 . "url" : "/services/data/v25. "clientInfo" : null. "messageSegments" : [ { "type" : "Text". "title" : "Service Engineer".Chatter API Resources Feed Item Comments Parameter Name Type Description 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z. The default is CreatedDateDesc. "type" : "User". "url" : "/services/data/v25. "photo" : { "smallPhotoUrl" : "https://instance_name/profilephoto/729D000000007ux/T". "text" : "What are the new dates?" } ] }. 0D5D0000000DSv4KAG" pageSize Integer Specifies the number of items per page. Resource /chatter/feed-items/feedItemId/likes HTTP methods GET. "feedItem" : { "id" : "0D5D0000000Ir6zKAC". "user": { "companyName": "Seattle Apps". Response body for GET or HEAD Like Page Response body for POST Like Example response body with GET { "id": "0I0D000000002XiKAI".0/chatter/feed-items/0D5D0000000Ir6zKAC" } } Feed Item Likes Used to access likes for a specific feed item. "mySubscription": null.Chatter API Resources Feed Item Likes "deletable" : true. If you don't specify a size. Valid values are between 1 and 100. the default is 25. or to add a like to a specific feed item. "firstName": "Adam". "url": "/services/data/v25. "isChatterGuest": false. Specifies the number of items per page. 76 .0/chatter/likes/0I0D000000002XiKAI". POST or HEAD Request parameters for GET or HEAD Note: There aren’t any request parameters for POST. Parameter Name page pageSize Type Integer Integer Description Specifies the number of the page you want returned. "lastName": "Grant". "id": "005D0000001Gl4rIAC". "url" : "/services/data/v25. Chatter API Resources Files Resources "name": "Adam Grant". Return the content of the file. A rendition is a binary preview of the file. groups. Available in versions 24.0 and later. and sharing. the latest version is returned. "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D000000007ux/F". Returns information about the entities with which the specified file has been shared. rendered version. "smallPhotoUrl": "https://instance_name/profilephoto/729D000000007ux/T" }. including content. These can be users. File Information Return details about the specified file. "type": "User". Returns a rendition of the file. The format of the binary depends on the format specified in the request. 77 . "url": "/services/data/v25. If not specified. Available resources are: Resource /chatter/files/fileId /chatter/files/fileId/content /chatter/files/fileId/file-shares /chatter/files/fileId/rendition Description Return details about the specified file. The content is streamed as the body of the response. Resource /chatter/files/fileId HTTP methods GET or HEAD Request parameters Name versionNumber Type Integer Description Specify an existing version number for the file. or records. "title": "Service Engineer".0/chatter/users/005D0000001Gl4rIAC" } } Files Resources Information about the specified file. "versionNumber" : "2". "origin" : "Content". "isChatterGuest" : false. "title" : "Head SE". "modifiedDate" : "2011-11-10T19:53:04. "lastName" : "Raven". "url" : "/services/data/v25.0/chatter/files/069D00000000xNXIAY".Chatter API Resources Files Resources Response body File Details Example response body { "pageCount" : 3. "firstName" : "Marion". "contentSize" : 371033. "thumb120By90RenditionStatus" : "Success". "pdfRenditionStatus" : "NA". "mySubscription" : null. "id" : "005D0000001Kl6xIAC". "flashRenditionStatus" : "Success". "url" : "/services/data/v25. Resource /chatter/files/fileId/content HTTP methods GET 78 . "id" : "069D00000000xNXIAY". "smallPhotoUrl" : "https://instance_name/profilephoto/729D00000000BDV/T" }. "fileType" : "PDF". "description" : "Sharing feed items policy. "thumb240By180RenditionStatus" : "Success". "contentUrl" : null.". "title" : "ReviewForJohn". "type" : "User".0/chatter/subscriptions/0E8D0000000SipsKAC" } "type" : "ContentDocument" } File Content Return the content of the file. "owner" : { "name" : "Marion Raven". "photo" : { "largePhotoUrl" : "https://instance_name/profilephoto/729D00000000BDV/F". "url" : "/services/data/v25. "photoVersionId" : "729D00000000BDV".0/chatter/users/005D0000001Kl6xIAC" }. "companyName" : "Seattle Apps". The content is streamed as the body of the response. "thumb720By480RenditionStatus" : "Success". "mySubscription" : { "id" : "0E8D0000000SipsKAC".000Z". "type": "User". These can be users. "shares": [ { "entity": { "companyName": "Seattle Apps". "id": "005D0000001Kl6xIAC". Resource /chatter/files/fileId/file-shares HTTP methods GET or HEAD Response body for GET or HEAD File Shares Page Example response body for GET or HEAD { "currentPageUrl": "/services/data/v/chatter/files/069D00000000yO6IAI/file-shares". "url": "/services/data/v25. "isChatterGuest": false. File Shares Returns information about the entities with which the specified file has been shared.0/chatter/users/005D0000001Kl6xIAC" }. groups. "lastName": "Raven". "nextPageUrl": null. "name": "Marion Raven". or records. "photoVersionId": "729D00000000BDV".Chatter API Resources Files Resources Request parameters Name versionNumber Type Integer Description Specify an existing version number for the file. "sharingType": "I" }. Response body Binary stream of the file content. "mySubscription": null. { "entity": { 79 . "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }. "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F". If not specified. "previousPageUrl": null. "firstName": "Marion". "title": null. the latest version is returned. Chatter API Resources Files Resources "id": "058D00000000Rz7IAE". A rendition is a binary preview of the file. "name": "Review library". If you don’t specify a specific page. Default value is THUMB120BY90. type String Specify the type of rendition to be returned. The only valid value is 0: you can’t get the rendition of a single page. 80 . Resource /chatter/files/fileId/rendition HTTP methods GET Request parameters Name page Type Integer Description Specify a rendition of a specific page. "url": "/services/data/v25. "sharingType": "I" } ] } File Rendition Returns a rendition of the file. a rendition of the first page is returned.0/chatter/records/058D00000000Rz7IAE" }. The format of the binary depends on the format specified in the request. "type": "ContentWorkspace". Valid values are: • FLASH • PDF • SLIDE • THUMB120BY90 • THUMB240BY180 • THUMB720BY480 Response body Binary stream of the rendition. For a PDF file rendition. The first page is 0. the rendition is for the entire document. One of the following: • CreatedDateDesc • LastModifiedDateDesc Description Sorts the returned feed either by created date in ascending order. also in ascending order. a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level. Resource /chatter/feeds/files/me OR /chatter/feeds/files/userId Note: userId must be the same as the logged-in user. Available resources are: Resource /chatter/feeds/files/me /chatter/feeds/files/me/feed-items /chatter/feeds/files/me/feed-items/flat Description Returns the URL to the feed-items that contain files that are posted by users or groups the current user is following.Chatter API Resources Files Feed Resources Files Feed Resources All feed items that contain files posted by people or groups that the current user follows. HTTP methods GET or HEAD Request parameter Parameter Name sort Type String. Returns a flat feed. Response body Feed 81 . Files Feed URL Returns the URL to the feed-items that contain files that are posted by users or groups the current user is following. Returns all feed items posted with files by people or groups that the logged-in user follows. The default is CreatedDateDesc. that is. All items are returned in chronological order. or by last modified date. or by last modified date. sort String.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z. 0D5D0000000DSv4KAG" pageSize Integer Specifies the number of items per page. Valid values are between 1 and 100. the default is 25. If you don't specify a size. The default is CreatedDateDesc. One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body Feed Item Page 82 . HTTP methods GET or HEAD Request parameters Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. Resource /chatter/feeds/files/me/feed-items or /chatter/feeds/files/userId/feed-items Note: userId must be the same as the logged-in user.Chatter API Resources Files Feed Resources Files Feed Items Returns all feed items posted with files by people or groups that the logged-in user follows. in one of the URL parameters. such as nextPageURL. also in ascending order. Page tokens are returned as part of the response body. Sorts the returned feed either by created date in ascending order. for example: "nextPageUrl": "/services/data/v25. Page tokens are returned as part of the response body. Default value is 3. in one of the URL parameters. specifying 25 flat feed items may actually return more. "isModifiedUrl" : null } Files Feed Items Flat Returns a flat feed. All items are returned in chronological order.0/chatter/feeds/files/005D0000001L3zVIAS/feed-items?page=2012-04-17T18%3A13%3A57Z". if each feed item has one comment.Chatter API Resources Files Feed Resources Response body example { "items" : [ ]. Because feed items may include comments. A generated token that indicates the view of feed items in the feed. "currentPageUrl" : "/services/data/v25. page Token recentCommentCount Integer 83 . Specifies the number of recent comments returned. such as nextPageURL. Valid values are between 0 and 100. Resource /chatter/feeds/files/me/feed-items/flat or /chatter/feeds/files/userId/feed-items/flat Note: userId must be the same as the logged-in user. Valid values are between 0 and 25. a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level. Default value is 25. 50 flat feed items are returned. HTTP methods GET or HEAD Request parameters Parameter Name numFeedItems Type Integer Description Specifies the number of feed items returned. that is. Available in versions 25. and recentCommentCount is greater than 1. For example. "nextPageUrl" : null.0 and higher. Returns a flat feed. such as the feed items from all the groups the logged-in user is a member of. /chatter/feeds/filter/me/idPrefix/feed-items/flat List of Filters Use this resource to return a list of the possible filters for a user. You should get this list. a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level. Resource /chatter/feeds/filter/me or /chatter/feeds/filter/userId userId must be the same as the logged-in user. also in ascending order. All items are returned in chronological order. Available resources are: Resource /chatter/feeds/filter/me /chatter/feeds/filter/me/idPrefix /chatter/feeds/filter/me/idPrefix/feed-items Description List of Filters Use this resource to return the URL for the specified key prefix feed. then construct additional resource URLs using the keyprefixes that are returned.Chatter API Resources Filter Feed Resources Parameter Name sort Type String. Use this resource to return the feed items for the specified key prefix. One of the following: • CreatedDateDesc • LastModifiedDateDesc Description Sorts the returned feed either by created date in ascending order. The default is LastModifiedDateDesc Response body Flat Feed Filter Feed Resources Feeds filtered by the specified criteria for the logged-in user. 84 . or by last modified date. that is. { "feedItemsUrl": "/services/data/v25. 85 . Resource /chatter/feeds/filter/me/idPrefix or /chatter/feeds/filter/userId/idPrefix userId must be the same as the logged-in user. "label": "Contacts" } ] } Keyprefix Filter Feed Use this resource to return the URL for the specified key prefix feed. One of the following: • CreatedDateDesc • LastModifiedDateDesc Description Sorts the returned feed either by created date in ascending order. also in ascending order. User objects have a prefix of 005 and Group objects have a prefix of 0F9.0/chatter/feeds/filter/005D0000001Gl4rIAB/003". "feedUrl" : "/services/data/v25. "feedUrl": "/services/data/v25. The default is CreatedDateDesc.Chatter API Resources Filter Feed Resources HTTP methods GET or HEAD Response body Feed Directory Example response body for GET { "feeds" : [ { "feedItemsUrl": "/services/data/v25. or by last modified date. The key prefix (idPrefix) is the three-character prefix code in the object ID. You don’t need to generate the key prefixes yourself. Object IDs are prefixed with three-character codes that specify the type of the object. HTTP methods GET or HEAD Request parameters Parameter Name sort Type String. For example. }. Use the List of feeds to see the available key prefixes.0/chatter/feeds/filter/005D0000001Gl4rIAB/005" "label" : "Users".0/chatter/feeds/filter/005D0000001Gl4rIAB/005/feed-items".0/chatter/feeds/filter/005D0000001Gl4rIAB/003/feed-items". Resource /chatter/feeds/filter/me/idPrefix/feed-items or /chatter/feeds/filter/userId/idPrefix/feed-items userId must be the same as the logged-in user.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z. that is prefix 005. { "feedItemsUrl": "/services/data/v25. 86 . for example: "nextPageUrl": "/services/data/v25. in one of the URL parameters. such as the feed items from all the groups the logged-in user is a member of.Chatter API Resources Filter Feed Resources Response body Feed Example response body The following is an example of a URL that’s filtered by user Id.0/chatter/feeds/filter/005D0000001Gl4rIAC/005/feed-items". 0D5D0000000DSv4KAG" pageSize Integer Specifies the number of items per page. } Keyprefix Filtered Feed Items Use this resource to return the feed items for the specified key prefix. If you don't specify a size. Page tokens are returned as part of the response body. such as nextPageURL. HTTP methods GET or HEAD Request parameters Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. the default is 25. Valid values are between 1 and 100. Response body Feed Item Page Filter Feed Items Flat Returns a flat feed. a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level. if each feed item has one comment. Because feed items may include comments. or by last modified date.0 and higher. Page tokens are returned as part of the response body. such as nextPageURL. The default is CreatedDateDesc. One of the following: • CreatedDateDesc • LastModifiedDateDesc Description Sorts the returned feed either by created date in ascending order. Valid values are between 0 and 100. in one of the URL parameters. A generated token that indicates the view of feed items in the feed. 50 flat feed items are returned.Chatter API Resources Filter Feed Resources Parameter Name sort Type String. and recentCommentCount is greater than 1. specifying 25 flat feed items may actually return more. page Token 87 . Default value is 25. All items are returned in chronological order. Available in versions 25. For example. Resource /chatter/feeds/filter/me/feed-items/flat or /chatter/feeds/filter/userId/feed-items/flat Note: userId must be the same as the logged-in user. HTTP methods GET or HEAD Request parameters Parameter Name numFeedItems Type Integer Description Specifies the number of feed items returned. also in ascending order. that is. All items are returned in chronological order. signed-in user is a member of. Available resources are: Resource /chatter/feeds/groups/me /chatter/feeds/groups/me/feed-items /chatter/feeds/groups/me/feed-items/flat Description Returns a URL to the feed-items for all the groups the current. Valid values are between 0 and 25. that is. signed-in user is a member of. Groups Feed URL Returns a URL to the feed-items for all the groups the current. One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body Flat Feed Groups Feed Resources All feed items from all groups the current user either owns or is a member of. 88 . Returns a flat feed. also in ascending order. Resource /chatter/feeds/groups/me or /chatter/feeds/groups/userId Note: userId must be the same as the logged-in user.Chatter API Resources Groups Feed Resources Parameter Name recentCommentCount Type Integer Description Specifies the number of recent comments returned. or by last modified date. Returns all feed items from all groups the current user either owns or is a member of. Default value is 3. The default is LastModifiedDateDesc sort String. a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level. Sorts the returned feed either by created date in ascending order. One of the following: • CreatedDateDesc • LastModifiedDateDesc Description Sorts the returned feed either by created date in ascending order. also in ascending order.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items 89 . Response body Feed Groups Feed Items Returns all feed items from all groups the current user either owns or is a member of. in one of the URL parameters. The default is CreatedDateDesc. Resource /chatter/feeds/groups/me/feed-items or /chatter/feeds/groups/userId/feed-items Note: userId must be the same as the logged-in user. HTTP methods GET or HEAD Request parameters Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. such as nextPageURL. or by last modified date. for example: "nextPageUrl": "/services/data/v25. Page tokens are returned as part of the response body.Chatter API Resources Groups Feed Resources HTTP methods GET or HEAD Request parameters Parameter Name sort Type String. specifying 25 flat feed items may actually return more. or by last modified date. The default is CreatedDateDesc. One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body Feed Item Page Groups Feed Items Flat Returns a flat feed. For example. All items are returned in chronological order. Because feed items may include comments.Chatter API Resources Groups Feed Resources Parameter Name Type Description ?page=2011-03-30T17:34:50Z. if each feed item has one comment. Default value is 25. also in ascending order. Resource /chatter/feeds/groups/me/feed-items/flat or /chatter/feeds/groups/userId/feed-items/flat Note: userId must be the same as the logged-in user. a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level.0 and higher. If you don't specify a size. the default is 25. sort String. that is. Available in versions 25. Sorts the returned feed either by created date in ascending order. 0D5D0000000DSv4KAG" pageSize Integer Specifies the number of items per page. Valid values are between 1 and 100. and 90 . Valid values are between 0 and 100. HTTP methods GET or HEAD Request parameters Parameter Name numFeedItems Type Integer Description Specifies the number of feed items returned. also in ascending order. The default is LastModifiedDateDesc recentCommentCount Integer sort String. Valid values are between 0 and 25.0/chatter/group-memberships/0FBD00000002kYFOAY". Default value is 3. or remove a member from a group. "user": { 91 . such as nextPageURL. or by last modified date. Page tokens are returned as part of the response body. Specifies the number of recent comments returned. One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body Flat Feed Group-Memberships Resource Access information about a member of a group. Membership IDs are returned in the mySubscription value of the response body from the groups resource. Sorts the returned feed either by created date in ascending order. page Token A generated token that indicates the view of feed items in the feed. /groups/0F9D000000006bOKA Resource /chatter/group-memberships/membershipId HTTP methods GET. The following resource returns the membership ID for the logged-in user. in one of the URL parameters. 50 flat feed items are returned.Chatter API Resources Group-Memberships Resource Parameter Name Type Description recentCommentCount is greater than 1. "role": "GroupOwner". DELETE or HEAD Response body for GET or HEAD Group Member Response body example for GET { "id": "0FBD00000002kYFOAY". "url": "/services/data/v25. To view the feed for a group. or post to it. "smallPhotoUrl": "https://instance_name/profilephoto/729D000000007ux/T" }. add. "lastName": "Grant". Also use this resource and POST to add members to a group. Returns information about more than one group at the same time. Also used to add members to a group and change the group photo. "firstName": "Adam".0/chatter/users/005D0000001Gl4rIAC" } } Groups Resources Information about groups. and the groups the current user is following. Use this resource to access the photo for the specified group. "name": "Adam Grant". Returns information about the files posted to the specified group.Chatter API Resources Groups Resources "companyName": "Seattle Apps". update. "title": "Service Engineer". or delete the photo. use the record feed resource with a groupId. "mySubscription": null. such as the group's members. "type": "User". Note: The groups resource is not a feed. "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D000000007ux/F". "id": "005D0000001Gl4rIAC". Available resources: Resource /chatter/groups/ /chatter/groups/groupId /chatter/groups/batch/group_list /chatter/groups/groupID/files /chatter/groups/groupId/members /chatter/groups/groupId/photo Description Returns a list of groups the logged–in user is a member of.0 and later. "isChatterGuest": false. Returns information about the specified group. Resource /chatter/groups/ 92 . Available in versions 24. List of Groups Returns a list of groups the logged–in user is a member of. Returns a list of members for the specified group. "url": "/services/data/v25. photo. For more information about wildcards. "groups": [ { "canHaveChatterGuests": false. "url": "/services/data/v25. "mySubscription": { "id": "0FBD00000002oJVOAY". q String Response body Group Page Example response body "currentPageUrl": "/services/data/v25.000Z". "description": "Get company announcements and other important updates".0/chatter/group-memberships/0FBD00000002oJVOAY" }. Page tokens are returned as part of the response body. "myRole": "GroupOwner". The search string must contain at least two characters. Specify the string to search. in one of the URL parameters.0/chatter/groups". for example: "nextPageUrl": "/services/data/v25. the default is 25. "name": "All Seattle Apps". "lastFeedItemPostDate": "2011-09-21T19:58:58. "memberCount": 2. "fileCount": 0. Valid values are between 1 and 250. not including any wildcards. "id": "0F9D00000000FG0KAM". such as nextPageURL.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z. see Wildcards on page 47. If you don’t specify a size. 0D5D0000000DSv4KAG" pageSize Integer Specifies the number of items per page.Chatter API Resources List of Groups HTTP methods GET or HEAD Request parameters Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. "owner": { 93 . 0/chatter/groups/0F9D00000000FG0KAM". "name": "Marion Raven". "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F". "url": "/services/data/v25.Chatter API Resources List of Groups "companyName": "Seattle Apps". "lastName": "Raven". "name": "Testing User Experience". "photoVersionId": "729D00000000BDV". { "canHaveChatterGuests": true. "isChatterGuest": false. "mySubscription": null. "title": null. "smallPhotoUrl": "https://instance_name/profilephoto/0F9/T" }. "visibility": "PublicAccess" }. "url": "/services/data/v25. "fileCount": 0. "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F". "url": "/services/data/v25. "id": "005D0000001Kl6xIAC". "type": "User". "photoVersionId": null.0/chatter/users/005D0000001Kl6xIAC" }. "id": "005D0000001Kl6xIAC". "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDQ/F".0/chatter/group-memberships/0FBD00000002oJqOAI" }. "lastFeedItemPostDate": "2011-09-21T20:23:46. "mySubscription": null. "firstName": "Marion". "url": "/services/data/v25. "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }. "name": "Marion Raven". "isChatterGuest": false. "photoVersionId": "729D00000000BDQ". "description": "Each week we test different apps with live customers! This group is for invites and comments.0/chatter/users/005D0000001Kl6xIAC" }. "owner": { "companyName": "Seattle Apps". "mySubscription": { "id": "0FBD00000002oJqOAI".000Z". "type": "CollaborationGroup". "photoVersionId": "729D00000000BDV". "title": null. "firstName": "Marion". "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }. "memberCount": 3. "lastName": "Raven". "type": "User". "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDQ/T" }. "id": "0F9D00000000FG5KAM".". "photo": { "largePhotoUrl": "https://instance_name/profilephoto/0F9/F". 94 . "myRole": "GroupOwner". 0/chatter/groups/0F9D00000000FG5KAM". "owner": { "companyName": "Seattle Apps". "nextPageUrl": null. "lastName": "Raven". Resource /chatter/groups/groupId 95 . "memberCount": 2. "myRole": "GroupOwner". "url": "/services/data/v25. "url": "/services/data/v25. "mySubscription": null. "name": "Volunteer Opportunities". "type": "User". "id": "005D0000001Kl6xIAC". "mySubscription": { "id": "0FBD00000002oJWOAY". "previousPageUrl": null } Group Information Returns information about the specified group. "visibility": "PublicAccess" } ]. "id": "0F9D00000000FG1KAM". "title": null. "type": "CollaborationGroup". "name": "Marion Raven". "photoVersionId": "729D00000000BDV". "visibility": "PrivateAccess" }.". "url": "/services/data/v25. "fileCount": 0.Chatter API Resources Group Information "type": "CollaborationGroup". "isChatterGuest": false. "firstName": "Marion". "photoVersionId": null.0/chatter/users/005D0000001Kl6xIAC" }. "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }. { "canHaveChatterGuests": false.0/chatter/groups/0F9D00000000FG1KAM". Please join so you can also volunteer! List any additional volunteer opportunities as well. "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F". "lastFeedItemPostDate": "2011-09-21T20:06:03. "photo": { "largePhotoUrl": "https://instance_name/profilephoto/0F9/F". "description": "This group contains information about our monthly volunteer opportunity.000Z".0/chatter/group-memberships/0FBD00000002oJWOAY" }. "smallPhotoUrl": "https://instance_name/profilephoto/0F9/T" }. "url": "/services/data/v25. HTTP methods GET or HEAD Response body Batch Results Group Files Returns information about the files posted to the specified group. "mySubscription": { "id": "0FBD00000002kYFOAY". "photo": { "largePhotoUrl": "https://instance_name/profilephoto/0F9/F". "myRole": "GroupOwner".0 and later. "visibility": "PublicAccess" } Batch Group Information Returns information about more than one group at the same time. "description": "Find out everything that&#39. Resource /chatter/groups/batch/group_list Where group_list is a comma separated list of group IDs. "type": "CollaborationGroup". "memberCount": 23. "name": "Seattle Prime". Available in versions 24. Resource /chatter/groups/groupID/files 96 .0/chatter/group-memberships/0FBD00000002kYFOAY" }. "url": "/services/data/v25. "smallPhotoUrl": "https://instance_name/profilephoto/0F9/T" }.Chatter API Resources Batch Group Information HTTP methods GET or HEAD Response body Group Example response body { "canHaveChatterGuests": false. "url": "/services/data/v25. "id": "0F9D00000000BsTKAU".s going on with the product! Join this group!".0/chatter/groups/0F9D00000000BsTKAU". "url": "/services/data/v25. "title": null. "type": "ContentDocument". "photoVersionId": "729D00000000BDV".000Z". "pdfRenditionStatus": "NA".0/chatter/users/005D0000001Kl6xIAC" }. "origin": "H". "thumb120By90RenditionStatus": "SUCCESS". "thumb240By180RenditionStatus": "SUCCESS". "name": "Marion Raven". "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }. "owner": { "companyName": "Seattle Apps". "modifiedDate": "2011-11-18T22:14:23. "modifiedDate": "2011-11-10T19:53:04. "description": "Sharing feed items policy. "lastName": "Raven". 97 . "firstName": "Marion".000Z".Chatter API Resources Group Files HTTP methods GET or HEAD Response body File Page Example response body { "currentPageUrl": "/services/data/v25. "type": "User". "flashRenditionStatus": "SUCCESS". "description": null. "mySubscription": null. "flashRenditionStatus": "SUCCESS". "files": [ { "contentSize": 7193018. "id": "069D00000000xNXIAY". "lastName": "Raven". "owner": { "companyName": "Seattle Apps". "contentUrl": null.0/chatter/files/069D00000000yO6IAI". "isChatterGuest": false.". "url": "/services/data/v25. "origin": "C". "fileType": "PDF".0/chatter/users/005D0000001Kl6xIAC/files". "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F". "contentUrl": null. "id": "005D0000001Kl6xIAC". "title": "Web Services API". "id": "005D0000001Kl6xIAC". "thumb720By480RenditionStatus": "SUCCESS". "id": "069D00000000yO6IAI". { "contentSize": 371033. "isChatterGuest": false. "firstName": "Marion". "mySubscription": null. "versionNumber": "1" }. "fileType": "PDF". "pdfRenditionStatus": "NA". "title": "ReviewForJohn". the root XML tag is expected to be <member>. "thumb120By90RenditionStatus": "SUCCESS". "url": "/services/data/v25. POST or HEAD Request body for POST In XML form. 98 .Chatter API Resources Group Members "name": "Marion Raven". "type": "User". "type": "ContentDocument". "nextPageUrl": null.0/chatter/files/069D00000000xNXIAY". "title": null.0/chatter/users/005D0000001Kl6xIAC" }. "url": "/services/data/v25. "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F". "previousPageUrl": null } Group Members Returns a list of members for the specified group. "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }. "thumb720By480RenditionStatus": "SUCCESS". Also use this resource and POST to add members to a group. Name userId Type String Description The user ID of the member to be added to the group Request parameter for POST Parameter Name userId Type String Description ID of the user to add to the group. Resource /chatter/groups/groupId/members HTTP methods GET. "thumb240By180RenditionStatus": "SUCCESS". "photoVersionId": "729D00000000BDV". "versionNumber": "2" } ]. 0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z. If you don’t specify a size.0/chatter/groups/0F9D00000000BsTKAU/members". "id": "005D0000001Gl4rIAC". "user": { "companyName": "Seattle Apps". "isChatterGuest": false. "firstName": "Adam". "title": "Service Engineer". "type": "User". the default is 25. "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D000000007ux/F". "mySubscription": null. "role": "GroupOwner". Page tokens are returned as part of the response body.0/chatter/group-memberships/0FBD00000002kYFOAY". 99 . 0D5D0000000DSv4KAG" pageSize Integer Specifies the number of items per page. such as nextPageURL.Chatter API Resources Group Members Request parameters for GET or HEAD Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. "name": "Adam Grant". in one of the URL parameters. Response body for GET or HEAD Group Member Page Response body for POST Group Member Example response body for GET { "currentPageUrl": "/services/data/v25. "smallPhotoUrl": "https://instance_name/profilephoto/729D000000007ux/T" }. for example: "nextPageUrl": "/services/data/v25. "url": "/services/data/v25. Valid values are between 1 and 1000. "members": [ { "id": "0FBD00000002kYFOAY". "lastName": "Grant". POST. "myMembership": { "id": "0FBD00000002kYFOAY". "type": "User". "previousPageUrl": null. { "id": "0FBD00000002zClOAI".0/chatter/users/005D0000001GpHpIAK" } } ]. Resource /chatter/groups/groupId/photo HTTP methods GET. "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000CSQ/F". "id": "005D0000001GpHpIAK". update.0/chatter/users/005D0000001Gl4rIAC" } }. "totalMemberCount": 2 } Group Photo Use this resource to access the photo for the specified group. "url": "/services/data/v25. DELETE. add. "isChatterGuest": false. or HEAD Request body for POST In XML form. "name": "Devi Tapash". "title": "Service Engineer".0 and higher.0/chatter/group-memberships/0FBD00000002zClOAI". Available in versions 25.Chatter API Resources Group Photo "url": "/services/data/v25. "user": { "companyName": "Seattle Chatter". "nextPageUrl": null. Name fileId Type String Description 18–character Id of an already existing file to be used as the photo 100 .0/chatter/group-memberships/0FBD00000002kYFOAY" }. "role": "StandardMember". or delete the photo. "mySubscription": { "id": "005D0000001GpHpIAK".0/chatter/subscriptions/0E8D00000001VQCKA2" }. "url": "/services/data/v25. "firstName": "Devi". the root XML tag is expected to be <photo>. "url": "/services/data/v25. "url": "/services/data/v25. "lastName": "Tapash". "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000CSQ/T" }. Available in versions 24. Parameter Name fileUpload Type a file Description String multipart/form-data for Contents of file to be uploaded String ID ID of a file already uploaded.Chatter API Resources Influence Resource Name version Type Integer Description Version number of the already existing file Request parameters for POST You can specify either fileUpload or fileId. which means it includes users with an influence rank equal to or greater than the 25th percentile (25%) and less than the next highest category threshold. and be smaller than 2 MB. You’ll receive an error if you specify both. fileId Note: Photos are processed asynchronously and may not be visible right away. For example: 0. Influence Thresholds Resource /chatter/influence/thresholds HTTP method GET or HEAD Response body Influence Thresholds 101 . Users are ranked based on the number of posts and comments made. The percentile associated with a category represents the bottom threshold for that influencer category.25 defines the cutoff for the Active Influencer category. and comments and likes received. Response body for GET or HEAD Photo Response body for POST Photo Influence Resource List of the percentile thresholds used to categorize an organization’s users by their influence in Chatter. The file must have a content type of image.0 and later. "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D000000007ux/F".0/chatter/likes/0I0D000000002ZtKAI". "threshold": "0. such as a news feed or a record feed.25". Like Resource /chatter/likes/likeId HTTP methods GET. "lastName": "Grant".8". "type": "User". "user": { "companyName": "Seattle Apps". "mySubscription": null. Also used to delete a like.0/chatter/users/005D0000001Gl4rIAC" 102 . "smallPhotoUrl": "https://instance_name/profilephoto/729D000000007ux/T" }. } { "name": "Active Influencer".0". "threshold": "0. "title": "Service Engineer". "url": "/services/data/v25. } ]} Likes Resource Information about the specified like. DELETE or HEAD Response body for GET or HEAD Like Example response body You can find the ID for a specific like from any feed. { "id": "0I0D000000002ZtKAI". "id": "005D0000001Gl4rIAC".0. } { "name": "Observer". "threshold": "0. "isChatterGuest": false. "name": "Adam Grant". "url": "/services/data/v25. "firstName": "Adam".Chatter API Resources Likes Resource Example response body {"thresholds": [ { "name": "Top Influencer". and all users the current user follows. that is. HTTP methods GET or HEAD Request parameter Parameter Name sort Type String. Returns a flat feed. a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level.Chatter API Resources News Feed Resources } } News Feed Resources The news feed of the current user. records. Returns all feed items from all groups the logged-in user either owns or is a member of. Available resources are: Resource /chatter/feeds/news/me /chatter/feeds/news/me/feed-items Description Returns a URL to the feed-items for all feeds for the logged–in user. as well as all files. also in ascending 103 . One of the following: • CreatedDateDesc Description Sorts the returned feed either by created date in ascending order. /chatter/feeds/news/me/feed-items/flat News Feed URL Returns a URL to the feed-items for all feeds for the logged–in user. as well as all files. or by last modified date. Resource /chatter/feeds/news/me or /chatter/feeds/news/userId Note: userId must be the same as the logged-in user. and all users the current user follows. All items are returned in chronological order. Includes feed items from all groups the current user either owns or is a member of. You can also use this resource to add feed-items. records. as well as all files. or HEAD Request body for POST In XML form. Values are: • Attachment Input: Existing Content • Attachment Input: Link • Attachment Input: New File Upload Note: If you’re uploading a new file. Name attachment Type Depends on type Description Optional. HTTP methods GET. or PUT for Input on page 48. body Message Body Input Description of message body 104 . See Using POST. POST. Resource /chatter/feeds/news/me/feed-items or /chatter/feeds/news/userId/feed-items Note: userId must be the same as the logged-in user. The default is CreatedDateDesc. You can specify only one of these values in the attachment parameter. you must include a binary file in the multipart request.Chatter API Resources News Feed Resources Parameter Name Type • LastModifiedDateDesc Description order. records. Response body Feed News Feed Items Returns all feed items from all groups the logged-in user either owns or is a member of. PATCH. and all users the current user follows. You can also use this resource to add feed-items. the root XML tag is expected to be <feedItem>. Default value is false. the generated feed-item only contains the shared post. Only used with fileName. originalFeedItemId String Request parameters for POST Use only one of these sets of parameters at a time. Optional.Chatter API Resources News Feed Resources Name isBookmarkedByCurrentUser Type Boolean Description Specifies if the new feed item should be bookmarked for the user (true) or not (false. you must include a binary file in the multipart request. the file post parameters are ignored. File post parameters: Parameter Name contentDocumentId Type String Description ID of an existing file to be posted. feedItemFileUpload String Either contentDocumentId or feedItemFileUpload is required for file posts. This parameter is only available for PATCH methods. you can’t make both a link post and a file post at the same time. PATCH. or PUT for Input on page 48. Note: If you’re uploading a new file. Contents of file to be uploaded. such as a file post parameter contentDocumentId. Must be an absolute path. See Using POST. Required or Optional Either contentDocumentId or feedItemFileUpload is required for file posts. not both in the same post. For example. 105 . You should only share a post or upload a file. if you share a post and also try to upload a file. For example. this is the original feed item 18-character Id Note: This parameter takes precedence over all other parameters. If you post using the sharing parameter originalFeedItemId and any other parameters. If this feed item is shared. desc String Description of file being posted. Sharing posts take precedence over all other types of posts. Optional. Page tokens are returned as part of the response body. Href of the URL. Available in versions 24. Description name of the URL. Title of the file. versions 24.0 and later. Attention: This parameter should not be used as of version 24. Optional. Optional. Required or Optional Required Request parameters for GET or HEAD Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. Required or Optional Required. Use title instead. Link post parameters: Parameter Name text url urlName Type String String String Description Text of the feed item. Text of the feed item. Available in to share. in one of the URL 106 . text title String String Text of the feed item. Required or Optional Optional Required Optional Share post parameters: Parameter Name originalFeedItemId text Type String String Description Required or Optional ID of the existing feed item Required.0.Chatter API Resources News Feed Resources Parameter Name fileName Type String Description File name of a file to be uploaded and posted. Text post parameters: Parameter Name text Type String Description Text of the feed item.0 and later. 0D5D0000000DSv4KAG" pageSize Integer Specifies the number of items per page.httpclient. Valid values are between 1 and 100. .multipart. import org. import org. One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body for GET or HEAD Feed Item Page Response body for POST Feed Item Example of file post The following is an example of updating a news feed with a file post. 107 . the default is 25.*.apache. import java. K3ztqnibMTXDGDs8zEjbB7wVC6xA0pcfOMFWwJkjmNhNIH5RbVZ722hBeN0VE_c8jNFrAv' https://instance_name/services/data/v25.0/chatter/" + "feeds/user-profile/me/feed-items"..PostMethod.apache.File.apache.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z.httpclient. If you don't specify a size.ppt --form fileName=FY12_results --form "desc=FY 12 SE Division Sales Results" --form "text=Please review" --header 'Authorization: Bearer 00Dx0000000M5Li!ARIAQCZ4DkPlHzGMaYKgVubVN. String url = "https://instance_name/services/data/v25. such as nextPageURL.0/chatter/feeds/news/me/feed-items The following is an example in Java of updating a news feed with a file post. curl --form feedItemFileUpload=@/home/ujones/Desktop/FY12_results.*. sort String. also in ascending order.httpclient.commons.commons. Sorts the returned feed either by created date in ascending order.io. The default is CreatedDateDesc.Chatter API Resources News Feed Resources Parameter Name Type Description parameters.methods.. String oauthToken = "00Dx0000000X42V!AQgAQClp6UqGWNJUf4d3LQkVCysBIS6a". for example: "nextPageUrl": "/services/data/v25.commons. or by last modified date. import org.methods. text).Chatter API Resources News Feed Resources String text = "I love posting files to Chatter!".com" }. new StringPart("fileName". final PostMethod postMethod = new PostMethod(url). try { postMethod. HttpClient httpClient = new HttpClient(). { "type": "Text". returnCode == HttpStatus. contentFile).println(postMethod. "text" : "Is everyone following this?" } ] } } The following is the request body for including a link as an attachment to a feed-item post: { "body" : { "messageSegments" : [ 108 .com The following is the request body for creating a link in a feed-item post: { "body" : { "messageSegments" : [ { "type": "Link". "url" : "http://www.chatter. System.SC_CREATED). fileName).setRequestHeader("Content-type". } Example of a link post The following creates a link post using the request parameters: /feeds/news/me/feed-items?text=Did+you+see+this?&url=http://www.getResponseBodyAsString()). int returnCode = httpClient. "Bearer " + oauthToken).setSoTimeout(60000). String fileName = "contentFile". new FilePart("feedItemFileUpload". "1"). postMethod.chatter.addRequestHeader("X-PrettyPrint". }. String desc = "This is a test file that I'm posting.getParams())). desc). } finally { postMethod.". "x-www-form-urlencoded") postMethod.setRequestEntity(new MultipartRequestEntity(parts.getParams().out.executeMethod(postMethod).setRequestHeader("Authorization". postMethod. assertTrue("Expected return code of: " + HttpStatus.SC_CREATED. File contentFile = getFile(). postMethod. httpClient. new StringPart("text".releaseConnection(). Part[] parts = { new StringPart("desc". 50 flat feed items are returned. a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level. and recentCommentCount is greater than 1.chatter. For example.Chatter API Resources News Feed Resources { "type": "Text". "text" : "Is everyone following this?" } ] }. Page tokens are returned as part of the response body. All items are returned in chronological order. "urlName" : "The Future of Social Enterprise" } } News Feed Items Flat Returns a flat feed.com". "attachment" : { "url" : "http://www. Because feed items may include comments.0 and higher. Valid values are between 0 and 100. Resource /chatter/feeds/news/me/feed-items/flat or /chatter/feeds/news/userId/feed-items/flat Note: userId must be the same as the logged-in user. A generated token that indicates the view of feed items in the feed. page Token 109 . if each feed item has one comment. in one of the URL parameters. such as nextPageURL. Default value is 25. that is. specifying 25 flat feed items may actually return more. Available in versions 25. HTTP methods GET or HEAD Request parameters Parameter Name numFeedItems Type Integer Description Specifies the number of feed items returned. "id" : "005D0000001L3zVIAS". "isChatterGuest" : false. "nextPageUrl" : null. "body" : { "text" : "Time to get working".0/chatter/users/005D0000001L3zVIAS". "url" : "/services/data/v25. "companyName" : "Seattle Apps". "photoVersionId" : "729D00000000Fj1IAE". "id" : "0D7D00000000N5rKAE". "photo" : { "largePhotoUrl" : "https://instance_name/profilephoto/729D00000000Fj1/F". "title" : null.000Z". "user" : { "name" : "Pierre Delacruix". Sorts the returned feed either by created date in ascending order. "smallPhotoUrl" : "https://instance_name/profilephoto/729D00000000Fj1/T" }. also in ascending order. "clientInfo" : null. "messageSegments" : [ { "type" : "Text". "text" : "Time to get working" } ] }. "firstName" : "Pierre". Valid values are between 0 and 25. Default value is 3. "currentPageUrl" : null. One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body Flat Feed Example response { "items" : [ { "type" : "Comment". "likes" : { "total" : 0. "item" : { "parent" : { "id" : "005D0000001L3zVIAS".Chatter API Resources News Feed Resources Parameter Name recentCommentCount Type Integer Description Specifies the number of recent comments returned. "likes" : [ ]. or by last modified date.0/chatter/users/005D0000001L3zVIAS" }. "mySubscription" : null. "type" : "User" }. "createdDate" : "2012-03-18T00:03:20. "url" : "/services/data/v25.0/chatter/comments/0D7D00000000N5rKAE". "url" : "/services/data/v25. 110 . "type" : "TextComment". "lastName" : "Delacruix". The default is LastModifiedDateDesc sort String. "trendingTopics" : true. Note: This resource is under the base URL of /services/data/v25. "chatterMessages" : true. "canModifyAllData" : true. Organization Resource /connect/organization HTTP methods GET or HEAD Response body Organization Example response body { "orgId" : "00DD0000000JW3yMAG". "viralInvitesAllowed" : true. "canFollow" : true. not /services/data/v25. "attachment" : null. "userSettings" : { "userId" : "005D0000001Kl6xIAC". Available in versions 24. "feedItem" : { "id" : "0D5D0000000HWC2KAO". "dashboardComponentSnapshots" : false }. "features" : { "files" : false. "canViewAllGroups" : true. "chatterActivity" : true. "myLike" : null.0 and later.0/chatter/feed-items/0D5D0000000HWC2KAO" } } } Organization Resource Information about the current user’s organization and settings. "canViewAllUsers" : true.Chatter API Resources Organization Resource "previousPageUrl" : null }. "url" : "/services/data/v25. "feedPolling" : false. "filesOnComments" : true.0/connect. "chatterGlobalInfluence" : true. "isDeleteRestricted" : false. 111 . "canViewAllData" : true.0/chatter. "canOwnGroups" : true. "externalUser" : false "userLocale" : "en_US". Resource /chatter/feeds/people/me or /chatter/feeds/people/userId Note: userId must be the same as the logged-in user. a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level. that is. Returns a flat feed. "canViewPublicFiles" : true. }. People Feed URL Returns a URL to the feed-items for all the people the current user is following. "accessTimeout" : 0 } People Feed Resources All feed items posted by all of the people the current user follows. HTTP methods GET or HEAD 112 . All items are returned in chronological order. Returns all the feed items from all the people the current user follows.Chatter API Resources People Feed Resources "canViewFullUserProfile" : true. Available resources are: Resource /chatter/feeds/people/me /chatter/feeds/people/me/feed-items /chatter/feeds/people/me/feed-items/flat Description Returns a URL to the feed-items for all the people the current user is following. One of the following: • CreatedDateDesc • LastModifiedDateDesc Description Sorts the returned feed either by created date in ascending order.Chatter API Resources People Feed Resources Request parameters Parameter Name sort Type String. in one of the URL parameters. The default is CreatedDateDesc. Page tokens are returned as part of the response body. or by last modified date. Response body Feed People Feed Items Returns all the feed items from all the people the current user follows. Resource /chatter/feeds/people/me/feed-items or /chatter/feeds/people/userId/feed-items Note: userId must be the same as the logged-in user. 0D5D0000000DSv4KAG" 113 . also in ascending order. HTTP methods GET or HEAD Request parameters Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. such as nextPageURL.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z. for example: "nextPageUrl": "/services/data/v25. Resource /chatter/feeds/people/me/feed-items/flat or /chatter/feeds/people/userId/feed-items/flat Note: userId must be the same as the logged-in user. One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body Feed Item Page People Feed Items Flat Returns a flat feed. Available in versions 25. Valid values are between 1 and 100. Because feed items may include comments.0 and higher. Sorts the returned feed either by created date in ascending order. sort String. the default is 25. Default value is 25. if each feed item has one comment. specifying 25 flat feed items may actually return more.Chatter API Resources People Feed Resources Parameter Name pageSize Type Integer Description Specifies the number of items per page. a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level. HTTP methods GET or HEAD Request parameters Parameter Name numFeedItems Type Integer Description Specifies the number of feed items returned. All items are returned in chronological order. 114 . For example. The default is CreatedDateDesc. also in ascending order. 50 flat feed items are returned. or by last modified date. If you don't specify a size. Valid values are between 0 and 100. and recentCommentCount is greater than 1. that is. which could be a group. that is. a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level. Returns a flat feed. such as nextPageURL. Sorts the returned feed either by created date in ascending order. Default value is 3. person. Returns the feed-items for all the records the current. One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body Flat Feed Record Feed Resource The feed of the specified record. object or file. The default is LastModifiedDateDesc recentCommentCount Integer sort String. in one of the URL parameters. Page tokens are returned as part of the response body. also in ascending order. Available resources are: Resource /chatter/feeds/record/me Description Returns a URL to the feed-items for all the records the current user is following. or a URL to all the feed-items of the specified recordId. Resource /chatter/feeds/record/me 115 . signed-in user is following. All items are returned in chronological order. /chatter/feeds/record/me/feed-items /chatter/feeds/record/me/feed-items/flat Record Feed URL Returns a URL to the feed-items for all the records the current user is following. or all the feed-items of the specified recordId.Chatter API Resources Record Feed Resource Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. or a URL to all the feed-items of the specified recordId. or by last modified date. Specifies the number of recent comments returned. Valid values are between 0 and 25. You can also use this resource to POST a new feed item.Chatter API Resources Record Feed Resource or /chatter/feeds/record/recordId Note: If recordId is a user ID. HTTP methods GET or HEAD Request parameters Parameter Name sort Type String. One of the following: • CreatedDateDesc • LastModifiedDateDesc Description Sorts the returned feed either by created date in ascending order. 116 . it must be the same as the current user. also in ascending order. or by last modified date. or PUT for Input on page 48. See Using POST. Response body Feed Record Feed Items Returns the feed-items for all the records the current. the root XML tag is expected to be <feedItem>. signed-in user is following. Resource /chatter/feeds/record/me/feed-items or /chatter/feeds/record/recordId/feed-items Note: If recordId is a user ID. The default is CreatedDateDesc. it must be the same as the current user. PATCH. or all the feed-items of the specified recordId. HTTP methods GET. POST or HEAD Request body for POST In XML form. originalFeedItemId String Request parameters for POST Use only one of these sets of parameters at a time. or PUT for Input on page 48. Default value is false. See Using POST. You should only share a post or upload a file. such as a file post parameter contentDocumentId. the file post parameters are ignored. If this feed item is shared. For example. For example. Values are: • Attachment Input: Existing Content • Attachment Input: Link • Attachment Input: New File Upload Note: If you’re uploading a new file. you can’t make both a link post and a file post at the same time. you must include a binary file in the multipart request. if you share a post and also try to upload a file.Chatter API Resources Record Feed Resource Name attachment Type Depends on type Description Optional. Sharing posts take precedence over all other types of posts. You can specify only one of these values in the attachment parameter. Note: If you’re uploading a new file. PATCH. the generated feed-item only contains the shared post. File post parameters: 117 . you must include a binary file in the multipart request. body isBookmarkedByCurrentUser Message Body Input Boolean Description of message body Specifies if the new feed item should be bookmarked for the user (true) or not (false. If you post using the sharing parameter originalFeedItemId and any other parameters. this is the original feed item 18-character Id Note: This parameter takes precedence over all other parameters. This parameter is only available for PATCH methods. not both in the same post. Optional. Only used with fileName. Required or Optional Optional Required Optional Share post parameters: Parameter Name originalFeedItemId text Type String String Description Required or Optional ID of the existing feed item Required.0. fileName String Required.0 and later. desc String Description of file being posted. Text of the feed item. Optional. Attention: This parameter should not be used as of version 24. Available in versions 24. text title String String Text of the feed item. feedItemFileUpload String Either contentDocumentId or feedItemFileUpload is required for file posts. Link post parameters: Parameter Name text url urlName Type String String String Description Text of the feed item.0 and later. Available in to share. Contents of file to be uploaded.Chatter API Resources Record Feed Resource Parameter Name contentDocumentId Type String Description ID of an existing file to be posted. File name of a file to be uploaded and posted. Optional. versions 24. Title of the file. Optional. Required or Optional Either contentDocumentId or feedItemFileUpload is required for file posts. Must be an absolute path. Href of the URL. Description name of the URL. Use title instead. Text post parameters: 118 . "memberCount" : 203. Required or Optional Required Request parameters for GET or HEAD Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. in one of the URL parameters. If you don't specify a size. Page tokens are returned as part of the response body. or by last modified date. The default is CreatedDateDesc. "visibility" : "PublicAccess". "canHaveChatterGuests" : false. such as nextPageURL.0/chatter/group-memberships/0FBD00000002kYFOAY" 119 . "url" : "/services/data/v25. 0D5D0000000DSv4KAG" pageSize Integer Specifies the number of items per page.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z. Sorts the returned feed either by created date in ascending order. the default is 25. Valid values are between 1 and 100.s going on with the product!". also in ascending order. sort String.Chatter API Resources Record Feed Resource Parameter Name text Type String Description Text of the feed item. "description" : "Find out everything that&#39. One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body for GET or HEAD Feed Item Page Response body for POST Feed Item Example response body for POST { "parent" : { "name" : "Seattle App Land". "mySubscription" : { "id" : "0FBD00000002kYFOAY". for example: "nextPageUrl": "/services/data/v25. "photoUrl" : "https://instance_name/profilephoto/729D000000007ux/T". that is. "lastName" : "Grant". "largePhotoUrl" : "https://instance_name/profilephoto/729D000000007ux/F" }. "body" : { "text" : "Has everyone seen the latest building proposal?". "url" : "/services/data/v25.000Z". "actor" : { "name" : "Adam Grant". "type" : "TextPost".0/chatter/feed-items/0D5D0000000ItYkKAK". "firstName" : "Adam". "companyName" : "Seattle Apps". "clientInfo" : null. "modifiedDate" : "2011-08-25T19:03:49. "nextPageUrl" : null. "id" : "0F9D00000000BsTKAU". "createdDate" : "2011-08-25T19:03:49.0/chatter/users/005D0000001Gl4rIAC" }.0 and higher. "title" : "Service Engineer". "myLike" : null }.Chatter API Resources Record Feed Resource }. "nextPageUrl" : null. a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level. "url" : "/services/data/v25. "likes" : { "total" : 0. "isLikedByCurrentUser" : false. 120 . "url" : "/services/data/v25.0/chatter/groups/0F9D00000000BsTKAU" }. "event" : false.0/chatter/feed-items/0D5D0000000ItYkKAK/likes". "comments" : { "total" : 0.0/chatter/feed-items/0D5D0000000ItYkKAK/comments" }. "photo" : { "smallPhotoUrl" : "https://instance_name/profilephoto/0F9/T". "myRole" : "GroupOwner". "currentPageUrl" : "/services/data/v25.000Z". All items are returned in chronological order. "comments" : [ ]. "id" : "0D5D0000000ItYkKAK". "mySubscription" : null. "type" : "CollaborationGroup". "currentUserLike" : null. "type" : "User". "id" : "005D0000001Gl4rIAC". "photo" : { "smallPhotoUrl" : "https://instance_name/profilephoto/729D000000007ux/T". "currentPageUrl" : "/services/data/v25. "attachment" : null } Record Feed Items Flat Returns a flat feed. "isChatterGuest" : false. "largePhotoUrl" : "https://instance_name/profilephoto/0F9/F" }. "text" : "Has everyone seen the latest building proposal?" } ] }. Available in versions 25. "messageSegments" : [ { "type" : "Text". "previousPageUrl" : null. "likes" : [ ]. Sorts the returned feed either by created date in ascending order. such as nextPageURL. specifying 25 flat feed items may actually return more. For example. also in ascending order. HTTP methods GET or HEAD Request parameters Parameter Name numFeedItems Type Integer Description Specifies the number of feed items returned. Default value is 3. The default is LastModifiedDateDesc page Token recentCommentCount Integer sort String. Valid values are between 0 and 100. and recentCommentCount is greater than 1. One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body Flat Feed 121 . Valid values are between 0 and 25. Because feed items may include comments. or by last modified date. A generated token that indicates the view of feed items in the feed. Specifies the number of recent comments returned. if each feed item has one comment. 50 flat feed items are returned. Default value is 25. Page tokens are returned as part of the response body.Chatter API Resources Record Feed Resource Resource /chatter/feeds/record/me/feed-items/flat or /chatter/feeds/record/userId/feed-items/flat Note: userId must be the same as the logged-in user. in one of the URL parameters. Resource /chatter/records/recordId/followers 122 . Returns information about the followers of the specified record. a URL to the feed-items for the record. Resource /chatter/records/recordId HTTP methods GET or HEAD Response body Record Summary Example response body { "id": "0F9D00000000BsTKAU".Chatter API Resources Records Resources Records Resources Information about the specified record. the record type. /chatter/records/recordId/followers Record Specifics Returns information about the specific record. including followers. a URL to the feed-items for the record. Available resources are: Resource /chatter/records/recordId Description Returns information about the specific record. use the Record Feed Resource. To obtain a feed for a record. such as the name of the record. "type": "CollaborationGroup". the record type.0/chatter/groups/0F9D00000000BsTKAU" } Record Followers Returns information about the followers of the specified record. "name": "Seattle Apps". such as the name of the record. Note: This is not a feed. and so on. and so on. "url": "/services/data/v25. Valid values are between 1 and 1000. for example. to unfollow a record. such as nextPageURL. such as group summary or user summary. 0D5D0000000DSv4KAG" pageSize Integer Specifies the number of items per page. In addition. or HEAD Response body for GET or HEAD Subscription 123 . for example. Also used to delete a subscription. for example: "nextPageUrl": "/services/data/v25.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z. /records/recordId/followers. the default is 25. If you don't specify a size. Page tokens are returned as part of the response body.Chatter API Resources Subscriptions Resource HTTP methods GET or HEAD Request parameters Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. in one of the URL parameters. DELETE. Resource /chatter/subscriptions/subscriptionId HTTP methods GET. A subscription ID is returned as part of the response body for follower and following resources. subscriptions IDs are also returned in many summary response bodies. Response body Subscription Page Subscriptions Resource Information about the specified subscription. "url": "/services/data/v25. "firstName": "Joe". "subject": { "companyName": "Seattle Apps".0/chatter/users/005D0000001KlmFIAS" }. "mySubscription": null. "photoVersionId": "729D00000000BDV". "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDf/F". "url": "/services/data/v25. "type": "User". "isChatterGuest": false. "name": "Joe Blogs". Returns the feed-items for all @mentions of the logged-in user. "firstName": "Marion". "isChatterGuest": false. Available resources are: Resource /chatter/feeds/to/me /chatter/feeds/to/me/feed-items Description Returns a URL to the feed-items for the feed of the logged-in user.0/chatter/subscriptions/0E8D0000000SV5ZKAW" }. "id": "005D0000001Kl6xIAC". Also used to post to the user's feed. "mySubscription": { "id": "0E8D0000000SV5ZKAW". "title": null.0/chatter/users/005D0000001Kl6xIAC" }. "url": "/services/data/v25. 124 . "title": "Senior Blogger". "url": "/services/data/v25. "lastName": "Raven". "subscriber": { "companyName": "Seattle Apps". "lastName": "Blogs". "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F". "photoVersionId": "729D00000000BDf". "id": "005D0000001KlmFIAS". as well as all posts other users make to the user's feed. "name": "Marion Raven". "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDf/T" }. "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }. "type": "User".Chatter API Resources To Feed Resources Example response body for GET { "id": "0E8D0000000SV5ZKAW".0/chatter/subscriptions/0E8D0000000SV5ZKAW" } To Feed Resources Feed of all @mentions of the current user and posts others make to the logged-in user's feed. HTTP methods GET or HEAD Request parameters Parameter Name sort Type String. as well as all posts other users make to the user's feed. To Feed URL Returns a URL to the feed-items for the feed of the logged-in user. a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level. Resource /chatter/feeds/to/me/feed-items 125 . Response body Feed To Feed Items Returns the feed-items for all @mentions of the logged-in user. One of the following: • CreatedDateDesc • LastModifiedDateDesc Description Sorts the returned feed either by created date in ascending order. or PUT for Input on page 48. The default is CreatedDateDesc. You can also use this resource to POST a new feed item. All items are returned in chronological order. Resource /chatter/feeds/to/me OR /chatter/feeds/to/userId Note: userId must be the same as the logged-in user. or by last modified date. also in ascending order.Chatter API Resources To Feed Resources Resource /chatter/feeds/to/me/feed-items/flat Description Returns a flat feed. PATCH. See Using POST. that is. Chatter API Resources To Feed Resources OR /chatter/feeds/to/userId/feed-items Note: userId must be the same as the logged-in user. body isBookmarkedByCurrentUser Message Body Input Boolean Description of message body Specifies if the new feed item should be bookmarked for the user (true) or not (false. You can specify only one of these values in the attachment parameter. the root XML tag is expected to be <feedItem>. not both in the same post. If this feed item is shared. originalFeedItemId String 126 . POST or HEAD Request body for POST In XML form. you must include a binary file in the multipart request. if you share a post and also try to upload a file. Name attachment Type Depends on type Description Optional. the generated feed-item only contains the shared post. For example. this is the original feed item 18-character Id Note: This parameter takes precedence over all other parameters. Values are: • Attachment Input: Existing Content • Attachment Input: Link • Attachment Input: New File Upload Note: If you’re uploading a new file. This parameter is only available for PATCH methods. Default value is false. You should only share a post or upload a file. HTTP methods GET. Description name of the URL. If you post using the sharing parameter originalFeedItemId and any other parameters. you must include a binary file in the multipart request. Attention: This parameter should not be used as of version 24. Only used with fileName.0. For example. Optional.Chatter API Resources To Feed Resources Request parameters for POST Use only one of these sets of parameters at a time. Title of the file. Must be an absolute path. File name of a file to be uploaded and posted. feedItemFileUpload String Either contentDocumentId or feedItemFileUpload is required for file posts. Required or Optional Either contentDocumentId or feedItemFileUpload is required for file posts. Link post parameters: Parameter Name text url urlName Type String String String Description Text of the feed item. Optional. text title String String Text of the feed item. Required or Optional Optional Required Optional Share post parameters: 127 . PATCH. desc String Description of file being posted. Sharing posts take precedence over all other types of posts. Use title instead. such as a file post parameter contentDocumentId. Available in versions 24. fileName String Required. or PUT for Input on page 48. See Using POST. File post parameters: Parameter Name contentDocumentId Type String Description ID of an existing file to be posted.0 and later. you can’t make both a link post and a file post at the same time. Optional. Href of the URL. Note: If you’re uploading a new file. the file post parameters are ignored. Contents of file to be uploaded. Text post parameters: Parameter Name text Type String Description Text of the feed item. Valid values are between 1 and 100. the default is 25. or by last modified date. Text of the feed item.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z.Chatter API Resources To Feed Resources Parameter Name originalFeedItemId text Type String String Description Required or Optional ID of the existing feed item Required.0 and later. Available in to share. sort String. If you don't specify a size. Required or Optional Required Request parameters for GET or HEAD Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. Sorts the returned feed either by created date in ascending order. Page tokens are returned as part of the response body. versions 24. The default is CreatedDateDesc. for example: "nextPageUrl": "/services/data/v25. Optional. One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body for GET or HEAD Feed Item Page Response body for POST Feed Item 128 . also in ascending order. in one of the URL parameters. 0D5D0000000DSv4KAG" pageSize Integer Specifies the number of items per page. such as nextPageURL. a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level.0 and higher. so the text message segment includes a space. All items are returned in chronological order. Because feed items may include comments. 50 flat feed items are returned. "id" : "005D0000001GpHp" }. Valid values are between 0 and 100. specifying 25 flat feed items may actually return more. and recentCommentCount is greater than 1. "text" : " Did you see the new plans?" } ] } } Note: No spaces are added either before or after the @mention. 129 . if each feed item has one comment. { "type": "text". Resource /chatter/feeds/to/me/feed-items/flat or /chatter/feeds/to/userId/feed-items/flat Note: userId must be the same as the logged-in user.Chatter API Resources To Feed Resources Example request body for an @mention POST { "body" : { "messageSegments" : [ { "type": "mention". Default value is 25. that is. Available in versions 25. HTTP methods GET or HEAD Request parameters Parameter Name numFeedItems Type Integer Description Specifies the number of feed items returned. For example. To Feed Items Flat Returns a flat feed. or by last modified date. Default value is 3.0 and later. Response body Topics 130 . The default is LastModifiedDateDesc recentCommentCount Integer sort String. Sorts the returned feed either by created date in ascending order.Chatter API Resources Topics Resource Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. Available in versions 24. Specifies the number of recent comments returned. also in ascending order. Page tokens are returned as part of the response body. Value must be greater than 0 and less than 100. Valid values are between 0 and 25. One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body Flat Feed Topics Resource Trending Topics List of the trending topics for the organization. in one of the URL parameters. such as nextPageURL. Resource /chatter/topics/trending HTTP methods GET or HEAD Request parameters Parameter Name maxResults Values Integer Description Maximum number of trending topics that get returned. The default is 5. between feed items and comments: Feed items and comments are at the same level. including posts. Resource /chatter/feeds/user-profile/me or /chatter/feeds/user-profile/userId 131 . All items are returned in chronological order. a feed where there is no hierarchy User–Profile Feed URL Returns a URL to the feed-items for the user-profile feed of the signed-in user. Also used to add feed items. /chatter/feeds/user-profile/me/feed-items/flat Returns a flat feed. and record updates. Available resources are: Resource /chatter/feeds/user-profile/me /chatter/feeds/user-profile/me/feed-items Description Returns a URL to the feed-items for the user-profile feed of the signed-in user. logged-in user on all records that can be tracked in a feed.Chatter API Resources User-Profile Feed Resources Example response body { "name": "#UniversalPaper" } { "name": "#caseUpdates" } { "name": "#salesTips" } { "name": "#companypicnic" } { "name": "#AccountExecs" } User-Profile Feed Resources Feed of all actions by the current. This is different than/chatter/feeds/news. Returns the feed-items for all actions by the logged-in user on all records that can be tracked in a feed. group updates. that is. which returns everything in a user's feed. You can specify only one of these values in the attachment parameter. or by last modified date. Response body Feed User–Profile Feed Items Returns the feed-items for all actions by the logged-in user on all records that can be tracked in a feed. or PUT for Input on page 48. the root XML tag is expected to be <feedItem>. also in ascending order. 132 . Resource /chatter/feeds/user-profile/me/feed-items or /chatter/feeds/user-profile/userId/feed-items HTTP methods GET. Name attachment Type Depends on type Description Optional. See Using POST.Chatter API Resources User-Profile Feed Resources HTTP methods GET or HEAD Request parameters Parameter Name sort Type String. You can also use this resource to POST a new feed item. One of the following: • CreatedDateDesc • LastModifiedDateDesc Description Sorts the returned feed either by created date in ascending order. POST or HEAD Request body for POST In XML form. The default is CreatedDateDesc. Values are: • Attachment Input: Existing Content • Attachment Input: Link • Attachment Input: New File Upload Note: If you’re uploading a new file. you must include a binary file in the multipart request. PATCH. you must include a binary file in the multipart request. See Using POST. 133 . you can’t make both a link post and a file post at the same time. This parameter is only available for PATCH methods. Default value is false. For example. Must be an absolute path. if you share a post and also try to upload a file.Chatter API Resources User-Profile Feed Resources Name body isBookmarkedByCurrentUser Type Message Body Input Boolean Description Description of message body Specifies if the new feed item should be bookmarked for the user (true) or not (false. Only used with fileName. You should only share a post or upload a file. desc String Description of file being posted. If you post using the sharing parameter originalFeedItemId and any other parameters. originalFeedItemId String Request parameters for POST Use only one of these sets of parameters at a time. Sharing posts take precedence over all other types of posts. PATCH. Contents of file to be uploaded. not both in the same post. Required or Optional Either contentDocumentId or feedItemFileUpload is required for file posts. the file post parameters are ignored. Optional. If this feed item is shared. or PUT for Input on page 48. this is the original feed item 18-character Id Note: This parameter takes precedence over all other parameters. Note: If you’re uploading a new file. the generated feed-item only contains the shared post. File post parameters: Parameter Name contentDocumentId Type String Description ID of an existing file to be posted. For example. feedItemFileUpload String Either contentDocumentId or feedItemFileUpload is required for file posts. such as a file post parameter contentDocumentId. Required or Optional Required Request parameters for GET or HEAD Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. Text of the feed item. Text post parameters: Parameter Name text Type String Description Text of the feed item. Available in versions 24. Use title instead.0 and later. Optional. Available in to share. Href of the URL. Link post parameters: Parameter Name text url urlName Type String String String Description Text of the feed item. Attention: This parameter should not be used as of version 24.Chatter API Resources User-Profile Feed Resources Parameter Name fileName Type String Description File name of a file to be uploaded and posted. in one of the URL 134 .0.0 and later. text title String String Text of the feed item. Description name of the URL. versions 24. Required or Optional Optional Required Optional Share post parameters: Parameter Name originalFeedItemId text Type String String Description Required or Optional ID of the existing feed item Required. Optional. Title of the file. Optional. Required or Optional Required. Page tokens are returned as part of the response body. the default is 25. or by last modified date. Valid values are between 1 and 100. Resource /chatter/feeds/user-profile/me/feed-items/flat or /chatter/feeds/user-profile/userId/feed-items/flat HTTP methods GET or HEAD 135 .Chatter API Resources User-Profile Feed Resources Parameter Name Type Description parameters. for example: "nextPageUrl": "/services/data/v25. that is. a feed where there is no hierarchy between feed items and comments: Feed items and comments are at the same level. If you don't specify a size. Sorts the returned feed either by created date in ascending order. One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body for GET or HEAD Feed Item Page Response body for POST Feed Item User-Profile Feed Items Flat Returns a flat feed. The default is CreatedDateDesc. All items are returned in chronological order.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z. Available in versions 25. 0D5D0000000DSv4KAG" pageSize Integer Specifies the number of items per page. sort String. such as nextPageURL.0 and higher. also in ascending order. The default is LastModifiedDateDesc page Token recentCommentCount Integer sort String.. A generated token that indicates the view of feed items in the feed. 136 . Valid values are between 0 and 25. Default value is 3. and recentCommentCount is greater than 1. One of the following: • CreatedDateDesc • LastModifiedDateDesc Response body Flat Feed Users Resources Information about the user. Valid values are between 0 and 100. For example. Also used for posting feed items and updating conversation status. if each feed item has one comment. the user’s files or recommendations. Default value is 25. such as who is following the user. specifying 25 flat feed items may actually return more. also in ascending order. such as nextPageURL. Page tokens are returned as part of the response body. or by last modified date. Returns information about one or more of the specified user’s profile.Chatter API Resources Users Resources Request parameters Parameter Name numFeedItems Type Integer Description Specifies the number of feed items returned. Because feed items may include comments. 50 flat feed items are returned. Available resources are: Resource /chatter/users /chatter/users/me /chatter/users/batch/user_list Description Returns information about all users in an organization. Returns information about the logged-in or specified user's Chatter profile. Specifies the number of recent comments returned. Sorts the returned feed either by created date in ascending order. in one of the URL parameters. Returns information about the followers for the specified user. and record recommendations for the logged-in user. Returns information about files that have been shared with the specified user. /chatter/users/me/conversations/unread-count Returns the number of conversations that have unread messages for the logged-in or specified user.0 and later. Returns information about files that a user owns. Returns the groups the specified user is a member of. Returns a list of people. Also used to post photos. Also used to follow records. Also used to search across all conversations. /chatter/users/me/conversations/conversationId /chatter/users/me/conversations/conversationId/mark-read Changes the status of the specified conversation. Available in versions 24. group. Returns the recommendations of the specified action for the logged-in user.0 and later.0 and later. Also used to delete recommendations. files a user follows. Returns a URL to the photo for the logged-in user. Also used to search within a specific conversation. groups. or general organization files. Available in versions 24. file. /chatter/users/me/files/ /chatter/users/me/files/filter/groups /chatter/users/me/files/filter/sharedwithme /chatter/users/me/followers /chatter/users/me/following /chatter/users/me/groups /chatter/users/me/messages /chatter/users/me/messages/messageId /chatter/users/me/photo /chatter/users/me/recommendations /chatter/users/me/recommendations/action /chatter/users/me/recommendations/action/objectCategory Returns the recommendations of the specified 137 . and files that the specified user is following. Returns all the messages for all the private conversations for the logged-in user.Chatter API Resources Users Resources Resource /chatter/users/me/conversations Description Returns all private conversations for the logged–in user. Can also be used to post a file. action and object category for the logged-in user. Returns the user. Available in versions 24. Returns information about the specified private conversation for the logged-in user. Also used to search across all messages and post a message. Returns the specified message.0 and later. Available in versions 24.0 and later. Returns information about files posted to groups that the specified user is a member of. This does not files shared with a user. records. Available in versions 24. Resource /chatter/users HTTP methods GET or HEAD Request parameters Parameter Name page pageSize Type Token Integer Description A generated token that indicates the view of feed items in the feed. The search string must contain at least two characters. titles. /chatter/users/me/status User Information Returns information about all users in an organization.0 and later. q String Note: The query parameter q only searches user names. For more information about wildcards. Specify the string to search. 138 . see Wildcards on page 47. If you don't specify a size. Specifies the number of items per page. not email addresses. the default is 25.Chatter API Resources User Information Resource /chatter/users/me/recommendations/action/objectID Description Returns the recommendation of the specified action and object ID for the logged-in user. and so on. not including any wildcards. Valid values are between 1 and 100. Response body User Page User Profile Information Returns information about the logged-in or specified user's Chatter profile. Also used to delete a recommendation. Returns the most recent user status feed item. Available in versions 24. Also used to update or delete user status. "managerName": "". "likeReceivedCount": 0. "chatterActivity": { "commentCount": 0. "total": 7 }. "phoneNumbers": [{ "number": "(206) 999-2846". "mySubscription": null. "chatterInfluence": { "percentile": "0. "managerId": "000000000000000AAA". "street": "2001 8th Ave".5". "email": "mraven@seattleapps. "type": "Work" }]. "firstName": "Marion".m excited to be part of the team focused on building out our apps business and showing our customers their future. 139 .". "rank": 1 }. "name": "Marion Raven". "isChatterGuest": false. "state": "WA".Chatter API Resources User Profile Information Resource /chatter/users/me or /chatter/users/userId HTTP methods GET or HEAD Response body User Detail Example response body { "aboutMe": "I&#39. "groupCount": 3. "lastName": "Raven". "companyName": "Seattle Apps". "id": "005D0000001Kl6xIAC". "isActive": true.com". "commentReceivedCount": 1. WA 98121\nUS" }. "postCount": 4 }. "followersCount": 1. "zip": "98121" "formattedAdress": "2001 8th Ave\nSeattle. "followingCounts": { "people": 5. "address": { "city": "Seattle". "country": "US". "records": 2. Resource /chatter/users/me/conversations or /chatter/users/userId/conversations Note: userId must be the same as the logged-in user.0/chatter/users/005D0000001Kl6xIAC". "username": "mraven@seattleapps. "type": "User". "photoVersionId": "729D00000000BDV". "url": "/services/data/v25. "title": null. See also User Conversations. HTTP methods GET or HEAD Response body Batch Results User Conversations. General on page 150. Also used to search across all conversations.Chatter API Resources Batch User Information "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F". General Returns all private conversations for the logged–in user. Specific on page 141. Resource /chatter/users/batch/user_list Where user_list is a comma separated list of user IDs. HTTP methods GET or HEAD 140 . "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }. Also see User Messages.com" } Batch User Information Returns information about one or more of the specified user’s profile. For more information about wildcards. see Wildcards on page 47. The search string must contain at least two characters. Note: You can also use the Conversations resource to change the status of a specified conversation. Available in versions 24. Resource /chatter/users/me/conversations/conversationId or /chatter/users/userId/conversations/conversationId 141 . not user names. If you don't specify a size. Response body Conversation Summary Collection User Conversations. Request parameter for GET Parameter Name q (optional) Type String Description Specify the string to search. the default is 25. Valid values are between 1 and 100. and so on. Specific Request parameters for GET or HEAD Parameter Name page pageSize Type Integer Integer Description Specifies the number of the page you want returned.0 and later.Chatter API Resources User Conversations. Also used to search within a specific conversation. See Change Status of Conversations on page 142. Specifies the number of items per page. titles. Note: The query parameter only searches message text bodies. Specific Returns information about the specified private conversation for the logged-in user. not including any wildcards. You can also use PATCH on the conversations resource to change the status of a specified conversation. PATCH. Available in versions 24. In XML form.0 and later. or HEAD Request parameter for GET Parameter Name q (optional) Type String Description Specify the string to search. Response body for GET or HEAD Conversation Detail Change Status of Conversations Changes the status of the specified conversation. HTTP methods GET. not including any wildcards. The search string must contain at least two characters. 142 .0 and later. Name read Type Boolean Description Changes the conversation status to unread (false) or read (true). Note: The query parameter only searches message text bodies. the root XML tag is expected to be <conversation>. Also see Using POST. not user names. Request body for PATCH Available in versions 24. Request parameters for PATCH Parameter Name read Type Boolean Description Changes the conversation status to unread (false) or read (true).Chatter API Resources Change Status of Conversations Note: userId must be the same as the logged-in user. titles. PATCH. and so on. or PUT for Input on page 48. see Wildcards on page 47. For more information about wildcards. Chatter API Resources Get Unread Count for Conversations Resource /chatter/users/me/conversations/conversationId/mark-read HTTP methods POST or PUT Request parameters Parameter Name read Type Boolean Description Changes the conversation status to unread (false) or read (true). This does not files shared with a user. See also Using POST. Get Unread Count for Conversations Returns the number of conversations that have unread messages for the logged-in or specified user. General Returns information about files that a user owns. Important: Be aware that this resource may return a large amount of data and may take a while to process. or general organization files. Available in versions 24.0 and later. Resource /chatter/users/me/files/ 143 . Resource /chatter/users/me/conversations/unread-count OR /chatter/users/userId/conversations/unread-count HTTP methods GET or HEAD Request body Conversation Unread Count Users Files. or PUT for Input on page 48. PATCH. Can also be used to post a file. files a user follows. Valid values are between 1 and 100. the root XML tag is expected to be <fileInput>. In XML form. Describes a new file input. "files": [ 144 . Request parameters for POST Name description fileData title Type String a file Description Description of the file String multipart/form-data for Contents of the file to be uploaded String Title of the file Response body for GET or HEAD File Page Example response body { "currentPageUrl": "/services/data/v25. General or /chatter/users/userId/files/ HTTP methods GET. Specifies the number of items per page.0/chatter/users/005D0000001Kl6xIAC/files". Name description title Type String String Description Description of the file to be uploaded Title of the file Request parameters for GET or HEAD Parameter Name page pageSize Type Integer Integer Description Specifies the number of the page you want returned. the default is 25. POST. Assumes that a file blob is also be provided in a binary form part named fileData. If you don't specify a size.Chatter API Resources Users Files.0 and later. or HEAD Request body for POST Available in versions 24. "firstName": "Marion". "modifiedDate": "2011-11-10T19:53:04. "modifiedDate": "2011-11-18T22:14:23. "origin": "C". "description": null. "thumb240By180RenditionStatus": "SUCCESS". "title": null. "lastName": "Raven". "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F". "url": "/services/data/v25. "description": "Sharing feed items policy. "contentUrl": null.".0/chatter/users/005D0000001Kl6xIAC" }. "title": null. "photoVersionId": "729D00000000BDV". "type": "ContentDocument". "mySubscription": null. "id": "069D00000000xNXIAY". "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }. "name": "Marion Raven". "id": "069D00000000yO6IAI". "thumb120By90RenditionStatus": "SUCCESS". "flashRenditionStatus": "SUCCESS". "owner": { "companyName": "Seattle Apps". "contentUrl": null. "name": "Marion Raven". "id": "005D0000001Kl6xIAC". 145 .0/chatter/users/005D0000001Kl6xIAC" }. "type": "User". "owner": { "companyName": "Seattle Apps". "title": "Web Services API". General { "contentSize": 7193018. "photoVersionId": "729D00000000BDV". "fileType": "PDF". "fileType": "PDF". "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/T" }.Chatter API Resources Users Files.000Z". "isChatterGuest": false. "versionNumber": "1" }. "url": "/services/data/v25. "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000BDV/F". "id": "005D0000001Kl6xIAC". "pdfRenditionStatus": "NA". "mySubscription": null. "flashRenditionStatus": "SUCCESS".0/chatter/files/069D00000000yO6IAI". "firstName": "Marion". "type": "User". "thumb720By480RenditionStatus": "SUCCESS". "url": "/services/data/v25. { "contentSize": 371033. "lastName": "Raven".000Z". "origin": "H". "pdfRenditionStatus": "NA". "isChatterGuest": false. "title": "ReviewForJohn".0 and later. Filtered by Group Returns information about files posted to groups that the specified user is a member of.0/chatter/files/069D00000000xNXIAY". Filtered by Sharing Returns information about files that have been shared with the specified user. Available in versions 24. "previousPageUrl": null } User Files.0 and later. If you don't specify a size. Filtered by Group "thumb120By90RenditionStatus": "SUCCESS".Chatter API Resources User Files. Response body File Page User Files. "thumb720By480RenditionStatus": "SUCCESS". "url": "/services/data/v25. Resource /chatter/users/me/files/filter/groups or /chatter/users/userId/files/filter/groups HTTP methods GET or HEAD Request parameters Parameter Name page pageSize Type Integer Integer Description Specifies the number of the page you want returned. "versionNumber": "2" } ]. Specifies the number of items per page. "nextPageUrl": null. the default is 25. Valid values are between 1 and 100. "type": "ContentDocument". Resource /chatter/users/me/files/filter/shared-with-me 146 . "thumb240By180RenditionStatus": "SUCCESS". Available in versions 24. If you don't specify a size. the default is 25. Specifies the number of items per page. Valid values are between 1 and 100. Page tokens are returned as part of the 147 .Chatter API Resources User Followers OR /chatter/users/userId/files/filter/shared-with-me Note: The resource can also be accessed with final keyword as one word: /chatter/users/me | userid/files/filter/sharedwithme HTTP methods GET or HEAD Request parameters Parameter Name page pageSize Type Integer Integer Description Specifies the number of the page you want returned. Resource /chatter/users/me/followers or /chatter/users/userId/followers HTTP methods GET or HEAD Request parameters Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. Response body File Page User Followers Returns information about the followers for the specified user. PATCH. or HEAD Request body for POST In XML form.Chatter API Resources Following Users Parameter Name Type Description response body. See Using POST. the default is 25. Resource /chatter/users/me/following or /chatter/users/userId/following HTTP methods GET. Note: You can't use the users resource to add a user to a group.0/ chatter/feeds/news/ 005D0000001GLowIAN /feed-items ?page=2011-03-30T17:34:50Z. for example: "nextPageUrl": "/services/data/v25. groups. Valid values are between 1 and 1000. 0D5D0000000DSv4KAG" pageSize Integer Specifies the number of items per page. Use the groups resource instead. in one of the URL parameters. POST. such as nextPageURL. the root XML tag is expected to be <following>. If you don't specify a size. records. Response body Follower Page Following Users Returns a list of people. or PUT for Input on page 48. and files that the specified user is following. Also used to follow records. 148 . This could be a user ID. in one of the URL parameters. If you don't specify a size. You don’t need to generate the key prefixes yourself. a record ID. and so on. the default is 25. User objects have a prefix of 005 and Group objects have a prefix of 0F9. pageSize Integer 149 . for example. Use the List of feeds to see the available key prefixes. Request parameter for POST Parameter Name subjectId Type String Description This request enables the user to follow the specified record. Request parameters for GET or HEAD All parameters are optional. Object IDs are prefixed with three-character codes that specify the type of the object. Parameter Name filterType Type String Description Specifies the key prefix to filter the type of objects returned. Note: Use Group Member Input for adding members to groups. a file ID. Valid values are between 1 and 1000. Specifies the number of items per page. such as nextPageURL. Page tokens are returned as part of the response body. For example.Chatter API Resources Following Users Name subjectId Type String Description The ID of what to follow. a file ID. The key prefix is the three-character prefix code in the object ID. page Token A generated token that indicates the view of feed items in the feed. a user ID. and so on. Valid values are between 1 and 250. General Returns all the messages for all the private conversations for the logged-in user. PATCH. in one of the URL parameters. General on page 140. or PUT for Input on page 48. Resource /chatter/users/me/messages 150 . Also used to search across all messages and post a message. Page tokens are returned as part of the response body. See also User Conversations. Resource /chatter/users/me/groups OR /chatter/users/userId/groups HTTP methods GET or HEAD Request parameters Parameter Name page Type Token Description A generated token that indicates the view of feed items in the feed. Specifies the number of items per page. See Using POST. If you don’t specify a size. the default is 25. pageSize Integer Response body Group Page User Messages.Chatter API Resources User Groups Response body for GET or HEAD Following Page Response body for POST Subscription User Groups Returns the groups the specified user is a member of. such as nextPageURL. HTTP methods GET. You must specify one or the other. Name body inReplyTo Type String String Description Text of the message body ID of an existing message that identifies which conversation this message is part of List of users who are the intended message recipients. General or /chatter/users/userId/messages Note: userId must be the same as the logged-in user.Chatter API Resources User Messages. recipients User Message Recipient List Input Note: Either recipients or inReplyTo is required. "recipients": ["userID". or HEAD Request body for POST In XML form. Comma-separated list of user IDs. "inReplyTo": "messageID" } 151 ."userID"]. Example XML format: <message> <body>Text of the message</body> <recipients> <recipient>userID</recipient> <recipient>userID</recipient> </recipients> <inReplyTo>messageID</inReplyTo> </message> Example JSON format: { "body": "Text of the message". not both. the root XML tag is expected to be <message>. up to 9. POST. Chatter API Resources User Messages. The text of the message. Available in versions 24. Response body for GET or HEAD Message Collection 152 . If you don't specify a size. up to 10. For more information about wildcards. The search string must contain at least two characters. Note: The query parameter only searches message text bodies. not including any wildcards. Comma-separated list of user IDs. Valid values are between 1 and 100. Specifies the number of items per page. and so on. the default is 25. see Wildcards on page 47. up to 9.0 and later. Request parameter for GET Parameter Name q (optional) Type String Description Specify the string to search.000 characters recipients ID userID Either recipients or inReplyTo is required text String Required Request parameters for GET or HEAD Parameter Name page pageSize Type Integer Integer Description Specifies the number of the page you want returned. General Request parameters for POST Parameter Name inReplyTo Type ID messageID Required or Optional Either recipients or inReplyTo is required Description ID of an existing message that identifies which conversation this message is part of List of users who are the intended message recipients. not user names. titles. "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000AQ4/T". "conversationUrl": 153 . "url": "/services/data/v25. "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000KJ6/F". "conversationId": "03MD0000000008KMAQ". "title": null. "sender": { "name": "Uriah Jones". "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000XA5/F".Chatter API Resources User Messages.0/chatter/users/me/messages/03JD000000000GJMAY" "body": { "text": "Bob and Mary. "photoVersionId": "729D00000000AQ4".0/chatter/users/005D0000001GOYpIAO" "title": null. "isChatterGuest": "false".0/chatter/users/005D0000001GLowIAB". "firstName": "Mary". "mySubscription": null. "id": "005D0000001GbdHIAS". "photoVersionId": "729D00000000KJ6". "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000KJ6/T" } "isChatterGuest": "false". "url": "/services/data/v25. "recipients": [ { "name": "Bob Johnson".0/chatter/users/005D0000001GbdHIAS" "type": "User". "lastName": "Smith". "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000XA5/T" } { "name": "Mary Smith". "mySubscription": null. "id": "005D0000001GOYpIAO". General Example response body { "messages": [ { "id": "03JD000000000GJMAY". "url": "/services/data/v25. ]. "title": "Head SE South". "firstName": "Uriah". "messageSegments": [ ]. "url": "/services/data/v25. "lastName": "Jones".". "id": "005D0000001GLowIAB". "firstName": "Bob". "companyName": "Seattle Apps". "companyName": "Seattle Apps". "type": "User". "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000AQ4/F". "companyName": "Seattle Apps". "lastName": "Johnson". I'll schedule the weekly meeting. "sentDate": "2011-03-29T20:54:48.000Z". Specific "/services/data/v25. "conversationId": "03MD00000000080MAA". "createdDate": "2011-03-29T20:16:31.0/chatter/users/me/conversations/03MD00000000080MAA".". "url": "/services/data/v25.0/chatter/users/me/messages/03JD000000000FVMAY" "body": { "text": "Please review the quarterly numbers by Friday.Chatter API Resources User Messages. Specific Returns the specified message. "lastName": "Smith". "firstName": "Mary". "id": "005D0000001GbdHIAS". "companyName": "Seattle Apps". "sender": { "name": "Mary Smith". "lastName": "Jones". "firstName": "Uriah". "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000KJ6/T" "url": "/services/data/v25. } User Messages. "nextPageUrl": null. "url": "/services/data/v25. Resource /chatter/users/me/messages/messageId 154 . "conversationUrl": "/services/data/v25.0/chatter/users/me/messages". "read": "true".0/chatter/users/me/conversations/03MD0000000008KMAQ".0/005D0000001GbdHIAS" "title": null. } ] "currentPageUrl: "/services/data/v25. "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D00000000KJ6/F". "id": "005D0000001GLowIAB". "recipients": [ { "name": "Uriah Jones".0/chatter/users/005D0000001GLowIAB" "title": "Head SE South". "photo": { "largePhotoUrl": "https://instance_name/profilephoto/729D000000008vV/F". "companyName": "Seattle Apps". "messageSegments": [ ]. "smallPhotoUrl": "https://instance_name/profilephoto/729D000000008vV/T" } ]. } { "id": "03JD000000000FVMAY".000Z". the root XML tag is expected to be <photo>.Chatter API Resources User Photos or /chatter/users/userId/messages/messageId Note: userId must be the same as the logged-in user. This helps you to avoid running over limits and may improve mobile client connections. If you’re building an app that needs to display user profile photos in a feed. Resource /chatter/users/me/photo OR /chatter/users/userId/photo HTTP methods GET. you should cache the user photos. 155 . You’ll receive an error if you specify both. POST or HEAD Request body for POST In XML form.0 and higher. Also used to post photos. HTTP methods GET or HEAD Response body Message User Photos Returns a URL to the photo for the logged-in user. Name fileId version Type String Integer Description 18–character Id of an already existing file to be used as the photo Version number of the already existing file Request parameters for POST You can specify either fileUpload or fileId. Then use the photoVersionId to determine when you need to update a photo. Available in versions 25. Resource /chatter/users/me/recommendations OR /chatter/users/userId/recommendations Note: userId must be the same as the logged-in user. and be smaller than 2 MB. group. Available in versions 24. Response body for GET or HEAD Photo Response body for POST Photo User Recommendations.0 and later. fileId Note: Photos are processed asynchronously and may not be visible right away. General Parameter Name fileUpload Type a file Description String multipart/form-data for Contents of file to be uploaded String ID ID of a file already uploaded. default is 10. file. Response body Zero or more Recommendation responses 156 . The file must have a content type of image. and record recommendations for the logged-in user. HTTP methods GET or HEAD Request parameters Parameter Name maxResults Type Integer Description Maximum number of recommendation results. Value must be greater than 0.Chatter API Resources User Recommendations. General Returns the user. "photoVersionId" : "729D000000008vV".Chatter API Resources User Recommendations. "isChatterGuest" : false. "owner" : { "name" : "Marion Raven". "photoVersionId" : "729D00000000BDQ".0/chatter/users/005D0000001AzOAIA0/following?subjectId= 005D0000001GLowIAB" } { "object" : { "name" : "All Seattle Apps". "companyName" : "Seattle Chatter". "actOnUrl" : "/services/data/v25. "id" : "005D0000001GLowIAB". "isChatterGuest" : false. "fileCount" : 0. "mySubscription" : null. "photoVersionId" : "729D00000000BDV". "firstName" : "Uriah". "smallPhotoUrl" : "https://instance_name/profilephoto/729D00000000BDQ/T" }. "myRole" : "NotAMember". "photo" : { "largePhotoUrl" : "https://instance_name/profilephoto/729D00000000BDQ/F". "visibility" : "PublicAccess".0/chatter/users/me/recommendations/follow/005D0000001GLowIAB/ explanation/UserViewingSameRecords". "title" : null. "lastName" : "Raven". "mySubscription" : null. "type" : "UserViewingSameRecords". "photo" : { "largePhotoUrl" : "https://instance_name/profilephoto/729D00000000BDV/F".0/chatter/users/005D0000001Kl6xIAC" "type" : "User". "smallPhotoUrl" : "https://instance_name/profilephoto/729D00000000BDV/T" }. "mySubscription" : null. "lastName" : "Jones". "url" : "/services/data/v25. "explanation" : { "detailsUrl" : "/services/data/v25. "id" : "005D0000001Kl6xIAC". "memberCount" : 15. 157 . }. General Example response body for GET with no request parameters { "object" : { "name" : "Uriah Jones". "description" : "Get company announcements and other important updates". "photo" : { "largePhotoUrl" : "https://instance_name/profilephoto/729D000000008vV/F".000Z". "smallPhotoUrl" : "https://instance_name/profilephoto/729D000000008vV/T" }. "canHaveChatterGuests" : false. "summary" : "Shares interest in 2 records" }. "lastFeedItemPostDate" : "2011-05-06T22:42:34. "companyName" : "Seattle Apps". }. "title" : "Head SE South". "action" : "follow". "firstName" : "Marion".0/chatter/users/005D0000001GLowIAB" "type" : "User". "url" : "/services/data/v25. }.0 and higher. "action" : "join". "url" : "/services/data/v25. "type" : "GroupNew". and records. Response body Zero or more Recommendation responses 158 .Chatter API Resources User Recommendations for a Specific Action "id" : "0F9D00000000FG0KAM". Available in versions 25. "actOnUrl" : "/services/data/v25. files. "summary" : "Created in the last month" }. files. join returns recommendations to join groups. Valid values for action and resulting recommendations: • • • follow returns recommendations to follow users. default is 10. Resource /chatter/users/me/recommendations/action or /chatter/users/userId/recommendations/action Note: userId must be the same as the logged-in user.0 and later. Available in versions 24.0/chatter/groups/0F9D00000000FG0KAM" "type" : "CollaborationGroup". groups. HTTP methods GET or HEAD Request parameters Parameter Name maxResults Type Integer Description Maximum number of recommendation results.0/chatter/groups/0F9D00000000FG0KAM/members?userId= 005D0000001AzOAIA0" } User Recommendations for a Specific Action Returns the recommendations of the specified action for the logged-in user. view returns recommendations to view users. Value must be greater than 0. and records. "explanation" : { "detailsUrl" : null. groups. HTTP methods GET. or records.) • Valid values for object category: ◊ If action is follow. ◊ If action is join. files. object category is users. ◊ If action is view. Request parameters for GET or HEAD Parameter Name maxResults Type Integer Description Maximum number of recommendation results. object category is groups. files. default is 10. or records. DELETE is used to remove a recommendation and is only valid for the following resources: • • • • /chatter/users/me /chatter/users/me /chatter/users/me /chatter/users/me | | | | userId/recommendations/follow/recommendedUserId userId/recommendations/follow/recommendedFileId userId/recommendations/follow/recommendedRecordId userId/recommendations/join/recommendedGroupId Note: userId must be the same as the logged-in user.0 and higher.Chatter API Resources User Recommendations for a Specific Action and Object Category User Recommendations for a Specific Action and Object Category Returns the recommendations of the specified action and object category for the logged-in user. • Valid values for action: ◊ follow ◊ join ◊ view (Available in versions 25. Value must be greater than 0. object category is users. Also used to delete recommendations. Resource /chatter/users/me/recommendations/action/objectCategory or /chatter/users/userId/recommendations/action/objectCategory Note: userId must be the same as the logged-in user. 159 . DELETE.0. or HEAD DELETE is available as of version 24. Chatter API Resources User Recommendations for a Specific Action and Object ID Parameter Name followed Type String Description ID of a user.0 and later. /chatter/users/me/recommendations/view/files?viewed=069D00000000xNXIAY Response body for GET with viewed request parameter Zero or more file Recommendation responses Response body for GET or HEAD without request parameters Zero or more Recommendation responses Response body for DELETE 204: Successful Delete User Recommendations for a Specific Action and Object ID Returns the recommendation of the specified action and object ID for the logged-in user. Provides new recommendations based on the context of this file ID. Provides new recommendations based on the context of this user ID.0 and later. Resource /chatter/users/me/recommendations/action/objectID or /chatter/users/userId/recommendations/action/objectID 160 . Available in versions 24. Available in versions 25. viewed String Example request URL with followed request parameter /chatter/users/me/recommendations/follow/users?followed=005D0000001GLowIAB Response body for GET with followed request parameter Zero or one user Recommendation response Example request URL with viewed request parameter This URL provides a list of files viewed by the same people who have viewed the file you’re viewing. ID of a file. Available in versions 24.0 and higher. Also used to delete a recommendation. This is also the same value displayed in the People Also Viewed area on the file detail page for the given ID. Request parameters for GET or HEAD Parameter Name maxResults Type Integer Description Maximum number of recommendation results. or HEAD DELETE is used to remove a recommendation and is only valid for the following resources: • • • • /chatter/users/me /chatter/users/me /chatter/users/me /chatter/users/me | | | | userId/recommendations/follow/recommendedUserId userId/recommendations/follow/recommendedFileId userId/recommendations/follow/recommendedRecordId userId/recommendations/join/recommendedGroupId Note: userId must be the same as the logged-in user. HTTP methods GET. group ID. • Valid values for action: ◊ follow ◊ join ◊ view (Available in versions 25.0 and higher. or record ID. Value must be greater than 0. object ID is a user ID. object ID is a group ID. ◊ If action is join. file ID. ID of a user. or record ID. ◊ If action is view. object ID is a user ID. default is 10. Available in versions 24.0 and later. followed String Response body for GET or HEAD without request parameters Zero or one Recommendation response Response body for DELETE 204: Successful Delete 161 . DELETE.Chatter API Resources User Recommendations for a Specific Action and Object ID Note: userId must be the same as the logged-in user. Provides new recommendations based on the context of this user ID. file ID.) • Valid values for object ID: ◊ If action is follow. POST or HEAD Request body for POST In XML form. See Using POST.Chatter API Resources User Status User Status Note: This resource is no longer available as of version 25. DELETE. use any feed resource. the root XML tag is expected to be <userStatus>. such as /chatter/feeds/news/me/feed-items. Also used to update or delete user status. Resource /chatter/users/me/status or /chatter/users/userId/status HTTP methods GET. Instead. PATCH.0. Name body Type Message Body Input Description Description of message body Request parameter for POST Name text Type String Text to post Description Text of the item to be posted to the user's status Response body for GET or POST User Status Example response body <?xml version="1.0" encoding="UTF-8"?> <currentStatus> <body> <messageSegments> <segment> <text>Will send you latest updates tonight</text> <type>Text</type> </segment> </messageSegments> <text>Will send you latest updates tonight</text> </body> 162 . with the feed-item. or PUT for Input on page 48. Returns the most recent user status feed item. Chatter API Resources User Status <parentId>005D0000001GLbn</parentId> <url>/services/data/v25.0/chatter/users/005D0000001GLbn/status</url> </currentStatus> 163 Chapter 5 JSON and XML Request Bodies Request bodies should be formatted in either XML or JSON, and included in POST, PATCH, or PUT requests. The following are the top-level request bodies, and can contain one or more of the lower-level request bodies: • • • • • • • • • • • Comment Dashboard Component Snapshot Feed Favorite Feed Item File Following Photo Group Member User Message User Status User Stream (Conversation) Top-level request bodies can contain one or more lower-level request bodies. Attachment Input: Existing Content Name contentDocumentId Type String Description ID of the existing content Attachment Input: Link Name url urlName Type String String Description URL included in the attachment Optional. Name of the URL. If not provided, a name is generated from the domain name of the URL Attachment Input: New File Upload The HTTP request should also carry a file upload part holding the file itself. Note: If you’re uploading a new file, you must include a binary file in the multipart request. 164 JSON and XML Request Bodies Name desc fileName title Type String String String Description Description of the file Name of the file Title of the file Comment Input In XML form, the root XML tag is expected to be <comment>. Name attachment Type Depends on type. Description Optional Values are: • Attachment Input: Existing Content • Attachment Input: Link • Attachment Input: New File Upload Note: If you’re uploading a new file, you must include a binary file in the multipart request. body Message Body Input Description of message body Dashboard Component Snapshot Input Available in versions 25.0 and higher. In XML form, the root XML tag is expected to be <dashboardComponentSnapshot>. Name parentId filterId1 filterId2 filterId3 feedItemBody runningUserId Type String String String String Message Body Input String Description A user, group, or dashboard Id to which you are posting the snapshot. Optional. A dashboard filter item Id. Optional. A second dashboard filter item Id. Optional. A third dashboard filter item Id. Contains the text that accompanies the feed item associated with the dashboard component snapshot. Optional. A user Id from which the view of the dashboard will be created, if other than the creator. Feed Favorite Input Available in versions 24.0 and later. In XML form, the root XML tag is expected to be <favorite>. The following input is valid for the HTTP method POST: 165 JSON and XML Request Bodies Name searchText Type String Description Text of the search that comprises the favorite. This parameter can only be used with saved searches and not list views. The following input is valid for the HTTP method PATCH: Name updateLastViewDate Type Boolean Description Sets the last view date of the specified feed favorite to the current system time. Default value is false. Feed Item Input In XML form, the root XML tag is expected to be <feedItem>. Name attachment Type Depends on type Description Optional. You can specify only one of these values in the attachment parameter. Values are: • Attachment Input: Existing Content • Attachment Input: Link • Attachment Input: New File Upload Note: If you’re uploading a new file, you must include a binary file in the multipart request. body isBookmarkedByCurrentUser Message Body Input Boolean Description of message body Specifies if the new feed item should be bookmarked for the user (true) or not (false. Default value is false. This parameter is only available for PATCH methods. If this feed item is shared, this is the original feed item 18-character Id Note: This parameter takes precedence over all other parameters. For example, if you share a post and also try to upload a file, the generated feed-item only contains the shared post. You should only share a post or upload a file, not both in the same post. originalFeedItemId String 166 the root XML tag is expected to be <following>. 167 .JSON and XML Request Bodies File Input Available in versions 24. If a hash tag is provided as input without whitespace text after it. a file ID. for example. and so on. the root XML tag is expected to be <member>. Note: Use Group Member Input for adding members to groups. If a hash tag is provided as input without whitespace text before it. Describes a new file input. Assumes that a file blob is also be provided in a binary form part named fileData. Name userId Type String Description The user ID of the member to be added to the group Message Body Input Name messageSegments Type Segments[] Description Collection of message segments. Group Member Input In XML form. a space is inserted. the root XML tag is expected to be <fileInput>. Name description title Type String String Description Description of the file to be uploaded Title of the file Following Input In XML form. In XML form. based on type. Segments can be one of the following: • Message Segment Input: Hash Tag • Message Segment Input: Link • Message Segment Input: Mention • Message Segment Input: Text Message Segment Input: Hash Tag Represents an inline hash tag.0 and later. a space is inserted. a record ID. a user ID. Name subjectId Type String Description The ID of what to follow. Available in versions 25. Name fileId version Type String Integer Description 18–character Id of an already existing file to be used as the photo Version number of the already existing file User Message In XML form. No spaces are added. Name type url Type String URL Description Value is Link URL to be used for the link Message Segment Input: Mention Represents an inline mention of a user. Text that looks like a link and is surrounded by space is converted into a link segment. Text prefixed with a # and surrounded by space is converted into a hash tag segment. a space is inserted. Name text type Type String String Description Plain text for this segment Only value is Text Photo In XML form.0 and higher. You must provide a user ID. the root XML tag is expected to be <photo>. 168 . a space is inserted. Name id type Type String String Description ID of the user to be mentioned Value is Mention Message Segment Input: Text Represents plain inline text.JSON and XML Request Bodies Name tag type Type String String Description Text of the hash tag without the hash tag Value is Hashtag Message Segment Input: Link Represents an inline link to a URL. the root XML tag is expected to be <message>. If a link is provided as input without whitespace text before it. If a link is provided as input without whitespace text after it. "recipients": ["userID". Name recipient Type String Description 18-character Id of the user to receive the message User Message Recipient List Input In XML form. the root XML tag is expected to be <recipient>."userID"]. up to 9. recipients User Message Recipient List Input Note: Either recipients or inReplyTo is required Example XML format: <message> <body>Text of the message</body> <recipients> <recipient>userID</recipient> <recipient>userID</recipient> </recipients> <inReplyTo>messageID</inReplyTo> </message> Example JSON format: { "body": "Text of the message". "inReplyTo": "messageID" } User Message Recipient Input In XML form. the root XML tag is expected to be <message>. Comma-separated list of user IDs. Name recipients Type User Message Recipient Input[] Description Collection of recipients to receive the message 169 .JSON and XML Request Bodies Name body inReplyTo Type String String Description Text of the message body ID of an existing message that identifies which conversation this message is part of List of users who are the intended message recipients. JSON and XML Request Bodies User Status Input Note: Setting a user status is no longer available as of version 25.0. the root XML tag is expected to be <conversation>. Name body Type Message Body Input Description Description of message body User Stream (Conversation) Input Available in versions 24. In XML form. Just post feed items to the feed instead. the root XML tag is expected to be <userStatus>. 170 . using Feed Item Input. In XML form. Name read Type Boolean Description Changes the conversation status to unread (false) or read (true).0 and later. province. Value could be one of the following: • Error Message • User Summary for /chatter/users/batch/ userIds 171 . They can also return a response body.0 and higher.Chapter 6 Chatter API Resource Returns The Chatter API resources return an HTTP response code. in either JSON or XML. Name of the state. Response Bodies The following are the response bodies returned by successful execution of a resource. Available in versions 25. Address Name city country formattedAddress state street zip Type String String String String String String Description Name of the city Name of the country Address formatted by locale. or so on Street number Zip or postal code Batch Results Name results Type Batch Result Item[] Description Collection of batch result items Batch Result Item Name result Type Various Description Dependent on the type of batch. 0 and later.Chatter API Resource Returns Response Bodies Name Type Description • Group for /chatter/groups/batch/ userIds statusCode Integer An HTTP status code Chatter Activity Name commentCount commentReceivedCount likeReceivedCount Type Integer Integer Integer Description Total number of comments in the organization made by the user Total number of comments in the organization received by the user Total number of likes on posts and comments in the organization received by the user Total number of posts in the organization made by the user postCount Integer Chatter Directory Available in versions 24. Name feeds groups organization users Type String String String String Description Returns a URL to the general feeds resource for the organization Returns a URL to the general groups resource for the organization Returns a URL to the general connect organization resource Returns a URL to the general users resource for the organization Chatter Influence Available in versions 24. Name percentile Type String Description Percentile value for the user’s influence rank within the organization 172 .0 and later. 000Z Information about the feed item for the comment 18-character Id of the comment Note: This property is no longer available as of version 25. Otherwise. relative to all other users within the organization ClientInfo Name applicationName Type String Description Name of the remote access application used for authentication. 2011-02-25T18:24:31.0. Specifies if the context user can delete the comment body clientInfo Feed Body ClientInfo createdDate feedItem id isDeletable String Reference String Boolean isDeleteRestricted Boolean Returns true if a comment cannot be deleted by the logged in user. possibly the logged in users can 173 . If it returns false. Value from the Info URL field of the remote access application used for authentication applicationUrl String Comment Name attachment Type Depends on type of comment Description If the comment does not contain an attachment or if the attachment. Available in versions 24. returns null. For more information.Chatter API Resource Returns Response Bodies Name rank Type Integer Description Number indicating the user’s influence rank. Use the isDeleteRestricted property instead. see “Remote Access Application Overview” in the online help.0 and later. returns Feed Item Attachment: Content. for example. Message body comment Information about the remote access application used to authenticate the connection ISO8601 date string. the most recent comments. The default is 25 comments per page. Total number of comments across all pages for the parent feed item nextPageUrl String total Integer Conversation Detail Name id members messages read url Type String User Summary[] Message Collection Boolean String Description 18-character Id of the conversation Collection of users participating in this conversation Messages in this conversation Does the context user have unread messages in this conversation? URL to the conversation detail page 174 . that is. Valid values are: • ContentComment—the comment contains an attachment • TextComment—the comment contains only text URL to this comment Information about the comment author parent type Parent String url user String User Summary Comment Page Name comments currentPageUrl Type Comment[] String Description Collection of comments URL to the first page of comments. URL to the next page of comments. Available in versions 25. myLike Reference If the logged-in user has liked the comment.0 and higher. returns a reference to that like or returns null Information about the parent feed-item for this comment Indicates the type of comment.Chatter API Resource Returns Response Bodies Name Type Description delete the comment. Available in versions 24. The default is 25 comments per page.0 and later. that is. older comments. that is. older conversations nextPageUrl String Conversation Unread Count Name hasMore Type Boolean Description true if the actual number of unread conversations is greater than 50. conversations that have unread messages. Is an exact value up to the maximum of 50. that is. and is capped at 50 if the value is greater. the conversations with the most recent messages URL to the next page of messages. such as 501. that is. Error Message Name errorCode message Type String String Description HTTP error code.Chatter API Resource Returns Response Bodies Conversation Summary Name id latestMessage members read url Type String Message User Summary[] Boolean String Description 18-character Id of the conversation The most recent message in this conversation Collection of users participating in the conversation Does the context user have unread messages in this conversation? URL to the conversation detail page Conversation Summary Collection Name conversations currentPageUrl Type Conversation Summary[] String Description Collection of one or more conversations URL to the first page of conversations. and so on Description of error 175 . 404. false otherwise unreadCount Integer Number of unread conversations. summary type String String Favorite Available in versions 24. See Record Summary. • UserFollowsSameUsers–people that both the user and recommended person are following. What is returned depends on the type. Values are: • UserFollowsSameUsers • GroupMembersFollowed • UserViewingSameRecords • RecordParentOfFollowed summary type String String Explanation Summary Name detailsUrl Type String Description URL for explanation details. Available in versions 24. Explanation of recommendation Type of recommendation explanation. See User Summary.Chatter API Resource Returns Response Bodies Explanation Details Available in versions 24. If the recommendation doesn’t have a detailed explanation. • UserViewingSameRecords—records that the user and the recommended person have recently viewed. See Record Summary. Name data Type Various Description More information about the recommendation.0 and later. Explanation of recommendation Type of recommendation explanation. the string “null”. • RecordParentOfFollowed—records that the user is following and that are child records of the recommended record.0 and later. such as UserFollowsSameUsers.0 and later. • GroupMembersFollowed–people that the user is following and that are members of the recommended group. 176 . See User Summary. Available in versions 24.0 and later. contains the search text. Name chatterActivity chatterGlobalActivity chatterMessages feedPolling files Type Boolean Boolean Boolean Boolean Boolean Description Specifies whether the user details include information about Chatter activity Specifies whether the user details include global Chatter activity Specifies whether Chatter messages are enabled for the organization Specifies whether the is-modified resource is enabled for the Chatter API Specifies whether files can act as resources for Chatter API 177 . an empty string An empty string or one of the following values: • listView • search URL to this favorite Information about the user who saved this favorite url user String User Summary Favorites Page Available in versions 24. Name favorites total Type Favorite[] Integer Description Collection of one or more favorites Total number of favorites Features Available in versions 24. for example. if not.0 and later.000Z Name of the favorite If the favorite is from a search. 2011-02-25T18:24:31.0 and later.Chatter API Resource Returns Response Bodies Name createdBy feedUrl id lastViewDate name searchText type Type User Summary String String String String String String Description Information about the original creator of the favorite URL to the feed item for this favorite 18-character Id of the favorite ISO8601 date string. Feed Body Name messageSegments Type Segment[] Description Collection of message segments. based on type.Chatter API Resource Returns Response Bodies Name filesOnComments trendingTopics viralInvitesAllowed Type Boolean Boolean Boolean Description Specifies whether files can be attached to comments Specifies whether trending topics are enabled Specifies whether existing Chatter users can invite people in their company to use Chatter Feed Name feedItemsUrl isFeedModifiedUrl Type String String Description URL of feed items URL of the isFeedModified resource with the polling token prepended. Returns null if feed is not a news feed. This can be an easy summary to use if you don’t want to process the message segments. text String 178 . Segments can be one or more of the following: • Message Segment: Entity Link • Message Segment: Field Change • Message Segment: Field Change Name • Message Segment: Field Change Value • Message Segment: Hashtag • Message Segment: Link • Message Segment: Mention • Message Segment: More Changes • Message Segment: Text Unformatted text of the message. Chatter API Resource Returns Response Bodies Feed Directory Name favorites Type Favorite[] Description Collection of favorites that the logged-in user has saved. Values are: • Record Summary—if a record • User Summary—if a user Depends on the value of the attachment. • ContentPost—Feed Item Attachment: Content or null if the content is unavailable • DashboardComponentAlert—Feed Item Attachment: attachment Depends on type 179 . People. Collection of feed directory items that the logged-in user is allowed to view feeds Feed Directory Item[] Feed Directory Item Name feedItemsUrl Type String Description URL to the resource of the feed items for a specific feed. Groups. Company.0/ chatter/feeds/files/me/feed-items feedUrl String URL to the resource of a specific feed. such as. and so on.0/ chatter/feeds/files/me label String Name of the feed. Values include: • CaseCommentPost—Feed Item Attachment: Case Comment—Available in versions 24.0. For example: /services/data/v25. Available in versions 24. Feed Item Name actor Type Depends on parent Description The entity that created the feed item.0. For example: /services/data/v25.0 and later.0 and later. this property is a reference to the specific like. false otherwise isLikedByCurrentUser Boolean Like Page Reference likes myLike Likes for this feed item If the logged-in user has liked the comment. comments createdDate currentUserLike Comment Page String Reference event Boolean String Boolean true if feed item created due to an event change. for example.0 and later. LinkPost—Feed Item Attachment: Link TrackedChange—Feed Item Attachment: Content if the change is on a document.Chatter API Resource Returns Response Bodies Name Type Description Dashboard—Available in versions 24.0 and later.0 and higher. false otherwise id isBookmarkedByCurrentUser 18-character Id of the feed item true if the current user has bookmarked this feed item. body clientInfo Feed Body ClientInfo Information about the feed item Information about the remote access application used to authenticate the connection Comments for this feed item ISO8601 date string. isDeleteRestricted Boolean Returns true if a feed item cannot be deleted by the logged in user. DashboardComponentSnapshot—Feed Item Attachment: Dashboard—Available in versions 24. Available in versions 25.000Z Note: This property is no longer available as of version 24. false otherwise. null otherwise 180 . Use the myLike property instead. If it returns false. possibly the logged in users can delete the feed item. true if the current user has liked this feed item. 2011-02-25T18:24:31. or null otherwise • • • All other types return null. nullotherwise. Available in versions 24.0. A reference to a like object if applicable.0 and later. 0 and later.Chatter API Resource Returns Response Bodies Name modifiedDate originalFeedItem Type String Reference Description ISO8601 date string. 2011-02-25T18:24:31. • CallLogPost—Available in versions 24.0 and higher.000Z A reference to the original feed item if this feed item is a shared feed item.0 and later. Values are: • File–if parent is a file • Group–if parent is a group • Record Summary–if parent is a record • User Summary–if parent is a user URL of the photo associated with the feed item Values are: • ActivityType • ApprovalPost • AttachArticleEvent—Available in versions 25. • CaseCommentPost—Available in versions 24. • ChangeStatusPost—Available in versions 25. Available in versions 24. • ContentPost • DashboardComponentAlert—Available in versions 24.0 and later. • CollaborationGroupCreated—Available in versions 25. originalFeedItemActor Depends on type parent Depends on type photoUrl type String String 181 .0 and higher. null otherwise.0 and later.0 and later. Available in versions 24.0 and later. Values are: • Record Summary–if original feed item is a record • User Summary–if original feed item is a user • Unauthenticated User—if original feed item is from a user who is not a Salesforce user • null if this feed item is not a shared feed item Value depends on type of parent. Value depends on type of original feed item. for example.0 and higher. • DashboardComponentSnapshot—Available in versions 24. returns unknown. false otherwise true if the file has a PDF preview available. 2011-02-25T18:24:31. Name actorType Type String Description Specifies the type of user who made the comment.0 and later.000Z 18-character Id of case comment Specifies whether the comment has been published Text of the case comment createdBy createdDate id published text User Summary String String Boolean String Feed Item Attachment: Content Name description downloadUrl fileSize Type String String String String Boolean Boolean String Description Description of the attachment URL to the content Size of the file in bytes. false otherwise fileType hasImagePreview hasPdfPreview id 18-character Id of the content 182 . Type of file true if the file has a preview image available. for example. If size cannot be determined.Chatter API Resource Returns Response Bodies Name Type Description • • • • • EmailMessageEvent LinkPost TextPost TrackedChange UserStatus url String URL to this feed item Feed Item Attachment: Case Comment Available in versions 24. Valid values are: • Customer—if a Chatter customer made the comment • CustomerService—if a service representative made the comment Information about the user who created the comment ISO8601 date string. for example. 18-character Id of the dashboard. The text of the last refresh date to be displayed.” Text that should be displayed next to the actor in the body of a feed item.” The user running the dashboard. returns null. “Untitled Component.Chatter API Resource Returns Response Bodies Name mimeType title versionId Type String String String Description MIME type content of the file.0 and later. URL of the full-sized dashboard image ISO8601 date string. This is used instead of the default body text. dashboardBodyText String dashboardId dashboardName fullSizedImageUrl lastRefreshDate String String String String lastRefreshDateDisplayText String runningUserId thumbnailUrl User Summary String Feed Item Attachment: Link Name title url Type String String Description Description of the link URL to the attachment 183 . URL of the thumbnail-sized dashboard image. returns the localized string. “Last refreshed on October 31. and there is no default body text. Name of the dashboard. Title of the file Version number of the file Feed Item Attachment: Dashboard Available in versions 24. such as. If no name is saved with the component.000Z of when this dashboard was last refreshed. 2011-02-25T18:24:31. 2011. If no text is specified. Name componentId componentName Type String String Description 18-character Id of the component Name of the component. Chatter API Resource Returns Response Bodies Feed Item Page Name currentPageUrl isFeedModifiedUrl Type String String Description URL to the first page of feed items URL of the isFeedModified resource with the polling token prepended. Returns null if feed is not a news feed. Collection of one or more feed items URL to the next page of feed items URL to the previous page of feed items items nextPageUrl previousPageUrl Feed Item[] String String Feed Modified Info Name isModified Type Boolean Description true if the feed is a news feed and has been modified since the last time it was polled, false if the news feed hasn’t been modified. Returns null if feed is not a news feed. nextPollUrl String URL to the next set of feed results File Available in versions 24.0 and later. Name contentSize contentUrl description fileType flashRenditionStatus id modifiedDate origin Type Integer String String String String String String String Description Size of the file in bytes If the file is a link, returns the URL, otherwise the string “null” Description of the file Type of file, such as PDF, PowerPoint, and so on Specifies if a flash preview version of the file has been rendered 18-character Id of the file ISO8601 date string, for example, 2011-02-25T18:24:31.000Z Specifies the file source. Valid values are: • Chatter—file came from Chatter • Content—file came from content • FileField—file came from a record or other form 184 Chatter API Resource Returns Response Bodies Name owner name pdfRenditionStatus thumb120By90RenditionStatus thumb240By180RenditionStatus Type User Summary String String String String Description Owner of the file Name of the file Specifies if a PDF preview version of the file has been rendered Specifies if a 120x90–pixel–sized preview image of the file has been rendered Specifies if a 240x180–pixel–sized preview image of the file has been rendered Specifies if a 720x480–pixel–sized preview image of the file has been rendered Title of the file ContentDocument thumb720By480RenditionStatus String title type url versionNumber String String String String URL for the file Version number of the file File Details Available in versions 24.0 and later.Includes all of the File response body with the additional item: Name pageCount Type Integer Description Number of pages for documents that support flash renditions, or the number of slides in a presentation. Returns 0 if the flash rendition fails, or if it isn’t supported for the file type. File Page Available in versions 24.0 and later. Name currentPageUrl files nextPageUrl previousPageUrl Type String File[] String String Description URL for the first page of files Collection of one or more files URL for the next page of files URL for the previous page of files File Shares Page Available in versions 24.0 and later. 185 Chatter API Resource Returns Response Bodies Name currentPageUrl shares nextPageUrl previousPageUrl Type String Shares[] String String Description URL for the first page of file shares Collection of one or more file shares URL for the next page of file shares URL for the previous page of file shares Flat Feed Available in versions 25.0 and higher. Name currentPageUrl items nextPageUrl Type String Flat Feed Item[] String Description URL for the first page of items Collection of one or more flat feed items URL for the next page of items Flat Feed Item Available in versions 25.0 and higher. Name item Type Depends on type Description The flat feed item, depending on the value of type. Valid values are: • If type is Comment—Comment • If type is FeedItem—Feed Item The type of item. Valid values are: • Comment • FeedItem type String Follower Page Name currentPageUrl followers mySubscription Type String Subscription[] Reference Description URL to the current page Collection of one or more followers or subscriptions Note: This field is no longer available as of version 24.0. If the logged-in user is following this user, this contains information about the subscription, else returns null nextPageUrl String URL to the next page 186 Chatter API Resource Returns Response Bodies Name previousPageUrl total Type String Integer Description URL to the previous page Total number of followers Following Counts Name people records total Type Integer Integer Integer Description Number of people user is following Number of records user is following Total number of items user is following Following Page Name currentPageUrl following nextPageUrl previousPageUrl total Type String Subscription[] String String Integer Description URL to the current page Collection of one or more subscriptions URL of the next page URL of the previous page Total number of records being followed Group Name canHaveChatterGuests Type Boolean String Integer String Date Description true if this group allows Chatter customers, false otherwise description fileCount id lastFeedItemPostDate Text-only description of the group Number of files posted to this group. Available in versions 24.0 and later. 18-character Id of the group Date of the most recent feed item posted to the group. Available in versions 24.0 and later. Total number of group members Values are: • GroupOwner • GroupManager • NotAMember • NotAMemberPrivateRequested • StandardMember memberCount myRole Integer String 187 Chatter API Resource Returns Response Bodies Name mySubscription Type Reference Description If the logged-in user is a member of this group.0 and later. or returns null otherwise URL to the next page of members URL to the previous page of members nextPageUrl previousPageUrl String String 188 . Name of the group Name of the owner of the group. Information about the group photo CollaborationGroup. returns information about that membership. Available in versions 24. this contains information about that subscription. or returns null otherwise. name owner photo type url visibility String String Photo String String String Relative URL string to the group Values are: • PrivateAccess • PublicAccess Group Member Name id role Type String String Description 18-character Id of the user Values are: • GroupOwner • GroupManager • NotAMember • NotAMemberPrivateRequested • StandardMember URL to this membership Information about the user who is subscribed to this group url user String User Summary Group Member Page Name currentPageUrl members myMembership Type String Group Member[] Reference Description URL to this page of members Collection of group members If the logged-in user is a member of this group. Chatter API Resource Returns Response Bodies Name totalMemberCount Type Integer Description Total number of group members Group Page Name currentPageUrl groups nextPageUrl previousPageUrl total Type String Group[] String String Integer Description URL to this page of groups Collection of groups URL to the next page of groups URL to the previous page of groups Total number of groups Influence Thresholds Available in versions 24. Name id name type Type String String String String Description 18-character Id of the library Name of the library Type of library. for example. threshold Library Available in versions 24.0 and later. Name name Type String Double Description Description of this influencer category. For example: 0. which means it includes users with an influence rank equal to or greater than the 25th percentile (25%) and less than the next highest category threshold. For example: Active Influencer Number expressed as a raw percentile that defines the bottom threshold for this influencer category.25 defines the cutoff for the Active Influencer category. ContentWorkspace url URL to this library 189 .0 and later. 0. conversationUrl id recipients 190 .Chatter API Resource Returns Response Bodies Like Name id url user Type String String User Summary Description 18-character Id of the like URL to this like Information about the user who liked this item Like Page Name currentPageUrl likes myLike Type String Like[] Reference Description URL to the current page of likes Collection of likes Note: This field is no longer available as of version 24. Either returns a reference to the specific like or returns null nextPageUrl previousPageUrl total String String Integer URL to the next page of likes URL to the previous page of likes Total number of likes for the item Message Name body conversationId Type Feed Body String String String User Summary[] Description Text of this message 18-character Id of the conversation this message is part of URL to the conversation this message is part of 18-character Id of the message Collection of one or more message recipients Note: The collection of recipients is empty for the following resources because the conversation participants are already identified in the conversation’s members property in Conversation Detail and Conversation Summary. Chatter API Resource Returns Response Bodies Name Type Description • • /chatter/users/me/ conversations /chatter/users/me/ conversations/ conversationId sendDate sender url String User Summary String ISO8601 date string. "First Name from Bob to Joe". 2011-02-25T18:24:31. Available in versions 25. for example. for example. that is. Name reference text type Type Reference String String Description Information about the link Plain text output for this segment EntityLink Message Segment: Field Change Represents an inline field change. for example: [ Text("Owner from "). that is. This segment can consist of multiple segments. Text(" to ").000Z Information about the user who sent this message URL to this message Message Collection Name currentPageUrl messages nextPageUrl Type String Message[] String Description URL to the first page of messages. The URL is an object.0 and higher. older messages Message Segment: Entity Link Represents an inline link to a URL. such as a record or a group. the most recent messages Collection of one or more messages URL to the next page of messages. FieldChangeValue("Dave Jones") ] 191 . FieldChangeValue("Bob Smith"). Segments can be one or more of the following: • Message Segment: Entity Link • Message Segment: Field Change • Message Segment: Field Change Name • Message Segment: Field Change Value • Message Segment: Hashtag • Message Segment: Link • Message Segment: Mention • Message Segment: More Changes • Message Segment: Text Formatted text of the change. For example: "City from San Francisco to New Orleans" text String type String Value is FieldChange Message Segment: Field Change Name Represents an inline name of a field change. for example. Possible values include: • the old name of the field • the new name of the field Value is FieldChangeName type String Message Segment: Field Change Value Represents an inline value of a field change. for example. like "Name" or "Description. like "1" or "Bob Smith. Possible values include: • the words a blank value 192 .” Making this a separate segment makes it possible to add special coding. Name text Type String Description Formatted text of the change. to wrap values in anchor tags. Name text Type String Description Formatted text of the change.Chatter API Resource Returns Response Bodies Name segments Type Segments[] Description Collection of message segments. based on type.” Making this a separate segment makes it possible to give special user interface treatments to field names. making a name field bold. Name tag text type url Type String String String String Description Text of the hashtag without the hash symbol (#) Text of the hashtag with the hash symbol (#) Value is Hashtag URL search for the tag in this format: /feed-items?q=tag Message Segment: Link Represents an inline link to a URL Name text type url Type String String String Description Formatted text of the feed item of this segment Value is Link URL value of the link Message Segment: Mention Represents an inline @mention.Chatter API Resource Returns Response Bodies Name Type Description Note: This text is also localized. Name accessible Type Boolean Description Specifies whether the mentioned user would be able to see mention when it was 193 . • • the old value of the field the new value of the field type url String String Value is FieldChangeValue URL value if the field change is to a URL field (such as a web address) Message Segment: Hashtag Represents an inline hashtag. " The more changes segment contains the "3 more changes. 194 . For example: "2 other changes" Note: This value is localized. and made 3 more changes. Message Segment: More Changes In feed items with a large number of tracked changes. null if the logged-in user doesn’t have access. B.0 and later. the message is formatted as: "changed A.Chatter API Resource Returns Response Bodies Name Type Description posted: true if the mentioned user could see the post. Name text Type String Description Formatted text associated with the item. type String Value is MoreChanges Message Segment: Text Represents plain inline text. Possible values include: • formatted text of a comment • the name of the field that has been changed with the word from Value is Text type String Organization Available in versions 24." Name moreChangesCount text Type Integer String Description Number of other changes Formatted text of the number of changes. false otherwise name text type user String String String User Summary Name of the user mentioned Formatted text of the feed item of this segment Value is Mention Information about the mentioned user. The default size is 64x64 pixels. while the length is scaled so the original image proportions are maintained. URL to the small profile picture. photoVersionId String smallPhotoUrl String 195 . 18-character Id to that version of the photo. The default width is 200 pixels.Chatter API Resource Returns Response Bodies Name accessTimeout Type Integer Description Amount of time after which the system prompts users who have been inactive to log out or continue working Information about features available in the organization 18-character Id for the organization Information about the organization permissions for the user features orgId userSettings Features String User Settings Parent Name id url Type String String Description 18-character Id of the parent URL of the parent Phone Number Name number type Type String String Description Phone number Values are: • Fax • Mobile • Work Photo Name largePhotoUrl Type String Description URL to the large profile picture. Available in versions 24.0 and later. such as CustomObject. or join a recommended group. Possible objects are: • File Available in versions 24.0 and higher.0 and later.Chatter API Resource Returns Response Bodies Recommendation Name action Type String Description The recommended action. URL that can be used with an HTTP method POST request to follow a recommended user. Formatted display name Type of record.0 type String Record Summary Name id mySubscription Type String Reference Description 18-character Id of the record If the logged in user is following this record. and so on Relative URL to this record name type String String String url 196 . Values are: • follow • join • view Available in versions 25. this contains information about the subscription. ContentDocument. file. For example: /users/me/following/ ?subjectId=001D000000Iyu2p actOnUrl String explanation object Explanation Summary Various The recommendation explanation The object with which the receiver is recommended to take action. • Group • Record Summary • User Summary No longer available as of version 24. or record. otherwise returns null. • N—no access • V—viewer sharingType String Subscription Name id subject Type String Depends Description 18-character Id of the subscription Information about the parent. Name entity Type Depends on sharing Description Returns information about the user.Chatter API Resource Returns Response Bodies Reference Name id Value String String Description 18-character Id of the object being referenced URL to the resource endpoint url Shares Available in versions 24. but on the library instead. record. This value is also used when the logged-in user is the same as owner of the file. Values are: • C—collaborator • I—sharing permission is determined by location. the thing or person being followed. or group the file is shared with.0 and later. Valid values are: • Group • Record Summary • User Summary 197 . Value is one of the following: • Group • Record Summary • User Summary • Library The permission level of sharing. This generally occurs when the sharing permission is not set on the file. that is. UnauthenticatedUser type String 198 . returns the string “null” Returns information about the subscription. or null the logged-in user is not subscribed. Name name Type String Description Name of the trending topic Unauthenticated User Available in versions 24. Returns the previous page of subscriptions. or the email address from the source email.0 and later.Chatter API Resource Returns Response Bodies Name subscriber Type Depends Description Information about the subscriber. that is. If there is no previous page. If there is no next page.0 and later. returns the string “null” Collection of subscriptions Total number of subscriptions mySubscription Reference previousPageUrl String subscriptions total Subscription[] Integer Topics Available in versions 24. the person following this item. Name name Type String Description Either the name in the From field of the source email. Valid values are: • Group • Record Summary • User Summary Relative URL to this specific subscription url String Subscription Page Name currentPageUrl nextPageUrl Type String String Description Returns the current page of subscriptions Returns the next page of subscriptions. 0. else returns null Locale-based concatenation of user's first and last names Collection of user's phone numbers Information about the user's photos Title of the user User name phoneNumbers photo title type String Phone Number[] Photo String String 199 .Chatter API Resource Returns Response Bodies User Detail Note: This return is returned for regular users only. User Summary is returned for Chatter customers. false otherwise true if user is a Chatter customer. this contains information about the subscription. User's current status email firstName followersCount followingCounts groupCount id isActive isChatterGuest String String Integer Following Counts Integer String Boolean Boolean String String String Reference User's email address User's first name Number of users following this user Information about items the user is following Number of groups user is following 18-character Id of the user true if user is active. false otherwise lastName managerId managerName mySubscription User's last name 18-character Id of the user’s manager Locale-based concatenation of manager's first and last names If the logged-in user is following this user. Name aboutMe address chatterActivity chatterInfluence companyName currentStatus Type String Address Chatter Activity Chatter Influence String User Status Description Text from user's profile Address Chatter activity statistics User’s influence rank Company name Note: This property is no longer available as of version 25. 0 and later. Available in versions 24.com.0. 200 .0 and later. returns the string “null” URL to the previous page. such as Admin@mycompany. Name canFollow canModifyAllData canOwnGroups canViewAllData canViewAllGroups canViewAllUsers canViewFullUserProfile canViewPublicFiles externalUser userId userLocale Type Boolean Boolean Boolean Boolean Boolean Boolean Boolean Boolean Boolean String String Description Organization has Chatter customers User has “Modify all Data” permission User can be a group manager User has “View all Data” permission User has “View all Groups” permission User has “View all Users” permission User can see of other user’s Chatter profiles User can see all files marked as public User is a Chatter customer 18-character Id of the user Locale of user User Status Note: This response is no longer available as of version 25. if there is no previous page. User Settings Available in versions 24. if there is no next page. returns the string “null” Collection of user detail information.0 and later. Available in versions 24. User Page Name currentPageUrl nextPageUrl previousPageUrl users Type String String String User Detail[] Description URL to the current page URL to the next page.Chatter API Resource Returns Response Bodies Name url username Type String String Description URL to the user's Chatter profile User name of the user. developers creating applications that consume Chatter API 201 . isChatterGuest true if user is a Chatter customer.0 and higher. it indicates that the Chatter Expert user is either deactivated or taken over by an administrator. This is a special user that offers tips. and sample posts to help users get started with Chatter. Therefore.Chatter API Resource Returns Response Body Encoding Name body parentId url Type Feed Body[] String String Description Body of the post 18-character Id URL to this user status post User Summary Note: Chatter customers receive this return instead of the User Detail return. Available in versions 25. tricks. false otherwise lastName mySubscription User's last name If the logged-in user is following this user. this contains information about the subscription. or the organization was created before Salesforce introduced the Chatter Expert user. false otherwise. Name companyName firstName id isActive Type String String String Boolean Boolean String Reference Description Name of the company User's first name 18-character Id true if user is active. Response Body Encoding Chatter API serves user-submitted content that is often not filtered at input and may come from many different sources including third-party mobile and web applications. else returns null Locale-based concatenation of first and last names Information about the user's photos Title of the user User name photo title type url String Photo String String String URL to the user's Chatter profile Note: If the user's name is Chatter Expert and the return contains mostly null values. The response body contains the message and errorCode. &gt. but not necessarily in other HTML contexts. Failing to do so may expose their application and their users to Cross Site Scripting (XSS) exploits and other problems that may result in data loss. or groupId being incorrect. See the Open Web Application Security Project for information on how to handle API output in different contexts. the response header contains an HTTP code. feedItemId. or a response is successful. inside script tags and inside CSS all require different encoding and whitelisting. Developers should not assume that the default entity encoding is appropriate for all contexts. inside URLs. In particular. and the query string is HTML-form encoded. the message accompanying that error. usually because of an invalid ID. Chatter API strings are minimally HTML entity encoded by default. We escape the following characters in all strings: Character < > " ' \ & Escaped as &lt. and if appropriate.Chatter API Resource Returns Status Codes and Error Responses output must take care to properly process the output for the context in which they use the data. the field or object where the error occurred. Chatter API response returns are encoded on output. &#39. Chatter API output may be used in many contexts. with javascript. &#92. using Chatter API output inside HTML attribute values. This encoding cannot be turned off. such as native mobile applications. HTTP Response Code 200 201 204 400 401 Description Success with GET or HEAD request Success with POST request Success with DELETE The request could not be understood. For non-HTML contexts. The session ID or OAuth token used has expired or is invalid. &quot. &amp. Chatter API clients may request raw (unencoded) output by setting the X-Chatter-Entity-Encoding HTTP header in your request to false. application failure and exposure of confidential company information. and the response body usually contains the HTTP response code. which is suitable in most cases for display between HTML tags. 202 . Status Codes and Error Responses Either when an errors occur. such as a userId. The main part of the URL is URL-encoded as per RFC2396. Chatter API does special encoding of any URL values included in response payloads. or the resource has been deleted. "errorCode" : "MALFORMED_ID" } • Resource does not exist: Requesting a resource that does not exist.xml) { "fields" : [ "Id" ]. An error has occurred within Force. Too many requests in an hour. Contact salesforce. Either the specified resource was not found.com. or that the context user is not an external user.json or request_body. • Incorrect ID: Using a non-existent ID in a request using JSON or XML (request_body. "errorCode" : "NOT_FOUND" } 203 .com Customer Support. so the request could not be completed. Verify that the context user has the appropriate permissions to access the requested data. Examples The following are examples of what is returned for errors. for example. "message" : "User ID: id value of incorrect type: 001900K0001pPuOAAU".Chatter API Resource Returns Status Codes and Error Responses HTTP Response Code 403 404 500 503 Description The request has been refused. you try to create a record using a misspelled object name { "message" : "The requested resource does not exist". general 143 Follow record example 40 A Access tokens 25 B Batch groups 96 users 140 Bookmarks resources 50 C Chatter API comments resource 57 cURL 15 how to 34 process flow 47 quick reference 34 resources 6 rich input 48 selecting right API 6 using 6 wildcards 47 Chatter resources 57 Comments 73 Comments resource 57 Conversations change status 142 unread count 143 D Dashboard component snapshot resource 62 G Group-memberships resources 91 Groups feed 88 joining example 39 posting example 39 Groups resources batch 96 files 96 information 95 list of groups 92 members 98 photo 100 E Error responses 202 Examples @mentions 41 activity status 38 add comments 35 batch 42 follow record 40 following list 38 get feed items for a record 37 get the news feed 37 Java 107 join group 39 like feed items 36 link post 108 post @mentions 36 post to group 39 recommendations 38 send private message 41 share a feed item 37 unfollow record 40 user name autocomplete 41 I Influence resource 101 J Java example 107 L Likes 76 204 . filtered by groups 146 user files. filtered by sharing 146 user files.Index Index @ me resources 124 F Favorites feed 64 Feed items resources accessing specific feed item 71 comments 73 likes 76 query 70 Feed-items resource 70 Feeds bookmarks 50 company 59 favorites 64 files 81 filter 84 group-memberships resource 91 groups 88 groups resource 92 list resource 68 news resource 103 people 112 record resource 115 share an item 37 to resources 124 topics resource 130 user-profile resources 131 users resource 136 Filer feed 84 Files feed 81 Files resources user files. specific action and object category 159 user profile information 138 user status 162 Q Quick reference 34 Quickstart access token 28 OAuth 28 prerequisites 28 R Recommendations specific action 158 specific action and object category 159 specific action and object ID 160 Record resource 115 Records resource 122 Records.Likes resources 102 Link post examples 108 M Messages user messages. groups 100 POST input 48 PUT input 48 T To resources 124 Tokens 25 Topics resources 130 U Unfollow record example 40 User resources conversations. specific 154 N News feeds resource 103 Resources (continued) groups feed 88 Influence 101 likes 102 organization 111 people feed 112 records 122 relationships 31 response bodies 171 returns 171 subscriptions 123 Response bodies 171 Rich input 48 Index O OAuth authentication 28 user-agent flow 23 Web server flow 18 Organization resource 111 S Search feed items 70 select right API 6 Subscriptions resource 123 P PATCH input 48 People feed 112 Photo. change status 142 user information 138 Users resources batch user information 140 conversations 140 conversations. filtered by groups 146 files. specific 154 photos 155 User-agent OAuth flow 23 User-profile resources 131 Users resource conversations. filtered by sharing 146 followers 147 following records 148 following users 148 groups 150 messages 150 recommendations 156 recommendations for specific action 158 recommendations for specific action and object ID 160 recommendations. following 148 Refresh tokens 25 Request bodies 164 Resources bookmarks 50 Chatter 57 comments 57 company feed 59 dashboard component snapshot 62 error responses 202 favorites 64 feed-items 70 Feeds 68 files 77 files feed 81 filter feed 84 W Web server OAuth flow 18 Wildcards 47 205 . general 143 messages. specific 141 files. unread count 143 files.
Copyright © 2024 DOKUMEN.SITE Inc.