30.03.2014 Views

Database.com Chatter REST API Developer's Guide - Salesforce.com

Database.com Chatter REST API Developer's Guide - Salesforce.com

Database.com Chatter REST API Developer's Guide - Salesforce.com

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Introducing <strong>Chatter</strong> <strong>REST</strong> <strong>API</strong><br />

Building the <strong>Chatter</strong> <strong>API</strong> Resource URL<br />

application. When polling for feed updates or private messages, use the /feeds/news/me |userId/is-modified<br />

endpoint and do not exceed one poll per minute.<br />

Note: Though the Is-Modified resource is generally available, your organization may not have permission to<br />

use it automatically. If you can’t access this resource, contact your salesforce.<strong>com</strong> representative and ask about<br />

the “Enabled <strong>Chatter</strong> Feed Polling” permission.<br />

If an application uses a regular session ID for authentication instead of an OAuth token, that application's requests count<br />

against a general allocation of requests where there is no associated OAuth consumer key. However, any other application<br />

the user accesses, that is also authenticating with session IDs, is contending for the same allocation of requests . For<br />

example, your app connects a user to <strong>Database</strong>.<strong>com</strong> using a regular session ID. This user now has the same number of<br />

requests regardless of the app they are using. They no longer have a separate request limit per application: all applications<br />

are now using the same limit. Because of this, we re<strong>com</strong>mend clients use OAuth tokens whenever feasible.<br />

Note: Stated limits aren't a promise that the specified resource is available at its limit in all circumstances. For<br />

example, load, performance and other system issues might prevent some limits from being reached. The stated<br />

limit may change without notice. Applications should make efficient use of available requests and gracefully<br />

handle the 503 error code.<br />

Default HTML Entity Encoding<br />

<strong>Chatter</strong> <strong>API</strong> strings are minimally HTML entity encoded by default, which is suitable in most cases for display between<br />

HTML tags, but not necessarily in other HTML contexts.<br />

For non-HTML contexts, such as native mobile applications, <strong>Chatter</strong> <strong>API</strong> clients may request raw (unencoded) output<br />

by setting the X-<strong>Chatter</strong>-Entity-Encoding HTTP header in your request to false.<br />

For more information, see Response Body Encoding on page 262.<br />

Feed Item Templates<br />

Feed item templates make feed items easier to render by defining their layout. The Feed Item Attachment: Basic Template<br />

is currently used for feed items that announce the creation of a group (the CollaborationGroupCreated feed item<br />

type). However, <strong>Salesforce</strong> may reflect other events in the Basic Template in the future.<br />

Building the <strong>Chatter</strong> <strong>API</strong> Resource URL<br />

Note: Communities are available as a pilot program. Contact your salesforce.<strong>com</strong> representative to find out if your<br />

organization qualifies for the <strong>com</strong>munity pilot.<br />

Access all <strong>Chatter</strong> <strong>API</strong> resources by using the URI for your <strong>com</strong>pany's instance, <strong>com</strong>bined with version information, and the<br />

URI for the resource.<br />

For example, building a URL, if your instance is:<br />

https://na1.database.<strong>com</strong>/<br />

And the version information is:<br />

/services/data/v27.0/<br />

7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!