Newer Version Available

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

Accessing ConnectApi Data in Experience Cloud Sites

Most ConnectApi methods work within the context of a single Experience Cloud site.

Many ConnectApi methods include communityId as the first argument. If you don’t have digital experiences enabled, use 'internal' or null for this argument.

If you have digital experiences enabled, the communityId argument specifies whether to execute a method in the context of the default Experience Cloud site (by specifying 'internal' or null) or in the context of a specific site (by specifying an ID). Any entity, such as a comment or a feed item, referred to by other arguments in the method must be located in the specified site. The ID is used in all URLs returned in the output.

Most URLs returned in ConnectApi output objects are Connect REST API resources.

If you specify an ID, URLs returned in the output use the following format:
1/connect/communities/communityId/resource
If you specify 'internal', URLs returned in the output use the same format:
1/connect/communities/internal/resource
If you specify null, URLs returned in the output use one of these formats:
1/chatter/resource
2
3/connect/resource