SfSkills Domains Docs GitHub

Home / integration / connect-rest-api-patterns

connect-rest-api-patterns

Use Connect REST API for Chatter, feeds, communities, and CMS content instead of querying underlying SObjects. NOT for custom business object CRUD — use integration/graphql-api-patterns.

Open the skill folder on GitHub


Connect REST API Patterns

Connect REST API exposes Chatter feeds, CMS content, Experience Cloud, and moderation APIs with richer shapes and side-effects than raw SObject access. Use it when the business operation is 'post a feed item with mentions' or 'publish CMS content' rather than 'insert FeedItem row'.

Adoption Signals

Chatter posts with mentions / rich text, CMS content authoring, community moderation, reports filters at scale.

  1. Identify the Connect resource (/connect/communities/{id}/chatter/feed-elements).
  2. Prefer ConnectApi Apex namespace over REST when inside Apex — same capability, better typing.
  3. Pagination via nextPageUrl — don't compute offsets manually.
  4. Authenticate with Named Credential + OAuth for external callers.
  5. Test with low-privilege users to catch perm gaps before go-live.

Key Considerations

Worked Examples (see references/examples.md)

Common Gotchas (see references/gotchas.md)

Top LLM Anti-Patterns (full list in references/llm-anti-patterns.md)

Official Sources Used

Package files