Many ConnectApi methods include communityId as the first argument. If you do not have communities enabled, use 'internal' or null for this argument.
If you have communities enabled, the communityId argument specifies whether to execute a method in the context of the default community (by specifying 'internal' or null) or in the context of a specific community (by specifying a community ID). Any entity, such as a comment, a feed item, and so on, referred to by other arguments in the method must be located in the specified community. The specified community ID is used in all URLs returned in the output.
To access the data in a partner portal or a Customer Portal, use a community ID for the communityId argument. You cannot use 'internal' or null.
Most URLs returned in ConnectApi output objects are Chatter REST API resources.
/connect/communities/communityId/resource
/connect/communities/internal/resource
/chatter/resource /connect/resource