Newer Version Available

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

Build the Resource URL

Access Connect REST API resources by using the URI for your company's instance, combined with version and Experience Cloud site information, and the URI for the resource.
For example, building a URL without Experience Cloud sites, your instance is:
1https://instance_name
And the version information is:
1/services/data/v65.0
And the resource is:
1/chatter/feeds/news/me/feed-elements
Put together, the full URL is:
1https://instance_name/services/data/v65.0/chatter/
2feeds/news/me/feed-elements
To access resources that are part of an Experience Cloud site, use this path after the version information and before the resource:
1/connect/communities/communityId
For example, the following full URL accesses a news feed resource in a site:
1https://instance_name/services/data/v65.0/connect
2/communities/communityId/chatter/feeds/news/me/feed-elements
To access resources in the default Experience Cloud site, use the internal shortcut as the site ID:
1/connect/communities/internal

You can use the internal shortcut even if digital experiences isn’t enabled. For example, if you’re developing an application for multiple orgs, not all of which use Experience Cloud sites, you can use this shortcut.

The response bodies include URLs with /connect/communities/internal. This format enables you to perform string interpolation when referencing Experience Cloud sites.

To access resources in the default Experience Cloud site, you can also use the /chatter resources directly (without /connect/communities/internal). The response bodies don’t include URLs with /connect/communities/internal.

In addition, you can use your org’s URL for an Experience Cloud site to access resources in it. For example:
1https://MyDomainName.my.site.com/sitepath/services/data/v65.0/connect
2/communities/communityId/chatter/feeds/news/me/feed-elements

To query resources from your Salesforce org where Experience Cloud sites have same-named objects, such as Groups, you must make the request from your Experience Cloud site. My Domain name or site-specific resources are returned.

Note