Newer Version Available
ManagedContentDelivery Class
Namespace
ManagedContentDelivery Methods
getCollectionItemsForChannel(channelId, collectionKeyOrId, language)
API Version
56.0
Available to Guest Users
56.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedContentCollectionItems getCollectionItemsForChannel(String channelId, String collectionKeyOrId, String language)
Parameters
- channelId
- Type: String
- ID of the channel.
- collectionKeyOrId
- Type: String
- Collection key or ID of the collection. A collection key is a unique identifier such as MCA4CCV5QS2BAB5H7YRCRPTCWGZQ.
- language
- Type: String
- Language locale for the managed content, for example, en_US. If the requested translation isn’t available, the language defaults to the channel or site’s default language. If the channel or site’s default language isn’t available, the language defaults to the primary language of the content space.
Return Value
Example
This example gets a collection of a custom content type that includes references to images and uses the ConnectApi.ConnectUtilities.unwrapApexWrapper() utility.
1ConnectApi.ManagedContentCollectionItems collection =
2 ConnectApi.ManagedContentDelivery.getCollectionItemsForChannel('0apXXXXXXXXXXXXXXX','MCVXXXXXXXXXXXXXXXXXXXXXXXXX','en_US');
3
4System.debug(collection.items); //before ApexWrapper is unwrapped
5
6for(ConnectApi.ManagedContentCollectionItem item : collection.items)
7{
8 //unwrap ApexWrapper
9 Map<String,Object> unwrappedItem = (Map<String,Object>)ConnectApi.ConnectUtilities.unwrapApexWrapper(item.body.get('contentBody'));
10
11 //replace the wrapped object with the unwrapped object
12 item.body.put('contentBody', unwrappedItem);
13}
14
15System.debug(collection.items); //after ApexWrapper is unwrappedgetCollectionItemsForSite(siteId, collectionKeyOrId, language)
API Version
56.0
Available to Guest Users
56.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedContentCollectionItems getCollectionItemsForSite(String siteId, String collectionKeyOrId, String language)
Parameters
- siteId
- Type: String
- ID for the Experience Cloud site.
- collectionKeyOrId
- Type: String
- Collection key or ID of the collection. A collection key is a unique identifier such as MCA4CCV5QS2BAB5H7YRCRPTCWGZQ.
- language
- Type: String
- Language locale for the managed content, for example, en_US. If the requested translation isn’t available, the language defaults to the channel or site’s default language. If the channel or site’s default language isn’t available, the language defaults to the primary language of the content space.
Return Value
Example
This example gets a collection of a custom content type that includes references to images and uses the ConnectApi.ConnectUtilities.unwrapApexWrapper() utility.
1ConnectApi.ManagedContentCollectionItems collection =
2 ConnectApi.ManagedContentDelivery.getCollectionItemsForSite('0DMXXXXXXXXXXXXXXX','MCVXXXXXXXXXXXXXXXXXXXXXXXXX','en_US');
3
4System.debug(collection.items); //before ApexWrapper is unwrapped
5
6for(ConnectApi.ManagedContentCollectionItem item : collection.items)
7{
8 //unwrap ApexWrapper
9 Map<String,Object> unwrappedItem = (Map<String,Object>)ConnectApi.ConnectUtilities.unwrapApexWrapper(item.body.get('contentBody'));
10
11 //replace the wrapped object with the unwrapped object
12 item.body.put('contentBody', unwrappedItem);
13}
14
15System.debug(collection.items); //after ApexWrapper is unwrappedgetManagedContentChannel(channelId)
API Version
54.0
Available to Guest Users
54.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedContentChannelDetail getManagedContentChannel(String channelId)
Parameters
- channelId
- Type: String
- ID of the channel.
Return Value
getManagedContentForChannel(channelId, contentKeyOrId, showAbsoluteUrl)
API Version
54.0
Available to Guest Users
54.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedContentDeliveryDocument getManagedContentForChannel(String channelId, String contentKeyOrId, Boolean showAbsoluteUrl)
Parameters
- channelId
- Type: String
- ID of the channel.
- contentKeyOrId
- Type: String
- Content key or ID of the content. A content key is a unique identifier such as MCA4CCV5QS2BAB5H7YRCRPTCWGZQ.
- showAbsoluteUrl
- Type: Boolean
- For public channels only, specifies whether to return the absolute unauthenticatedUrl in the output class. The default value is false.
Return Value
Usage
This method returns content only if it's published in the default language of the channel. If you request content that isn’t published in the default language of the channel, you get a ConnectApi.NotFoundException. To get content for a channel in another language use getManagedContentForChannel(channelId, contentKeyOrId, language, showAbsoluteUrl) or getManagedContentForChannel(channelId, contentKeyOrId, language, showAbsoluteUrl, referenceDepth, expandReferences, referencesAsList).
Example
This example gets a custom content type with an image reference and uses the ConnectApi.ConnectUtilities.unwrapApexWrapper() utility.
1ConnectApi.ManagedContentDeliveryDocument res =
2 ConnectApi.ManagedContentDelivery.getManagedContentForChannel ('0apXXXXXXXXXXXXXXX','MCLXXXXXXXXXXXXXXXXXXXXXXXXX',true);
3
4//before contentBody field ApexWrapper is unwrapped
5system.debug(res.contentBody);
6
7//unwrap contentBody field in res
8Map<String,Object> contentBody = (Map<String,Object>)ConnectApi.ConnectUtilities.unwrapApexWrapper(res.contentBody);
9
10//after contentBody field ApexWrapper is unwrapped, but image field still wrapped
11system.debug(contentBody);
12
13//before image field ApexWrapper is unwrapped
14system.debug(contentBody.get('Image'));
15
16//unwrap Image field in contentBody
17Map<String,Object> Image = (Map<String,Object>)ConnectApi.ConnectUtilities.unwrapApexWrapper(contentBody.get('Image'));
18
19//after image field ApexWrapper is unwrapped
20system.debug(Image);
21
22//replace wrapped primary_image in contentBody with unwrapped version
23contentBody.put('Image', Image);
24
25//after contentBody field ApexWrapper is unwrapped, with image field also unwrapped
26system.debug(contentBody);getManagedContentForChannel(channelId, contentKeyOrId, language, showAbsoluteUrl)
API Version
54.0
Available to Guest Users
54.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedContentDeliveryDocument getManagedContentForChannel(String channelId, String contentKeyOrId, String language, Boolean showAbsoluteUrl)
Parameters
- channelId
- Type: String
- ID of the channel.
- contentKeyOrId
- Type: String
- Content key or ID of the content. A content key is a unique identifier such as MCA4CCV5QS2BAB5H7YRCRPTCWGZQ.
- language
- Type: String
- Language locale for the managed content, for example, en_US. The requested language must be added to the channel, otherwise, you get a ConnectApi.NotFoundException. If the requested translation isn’t available, the language defaults to the channel or site’s default language. If the channel or site’s default language isn’t available, the language defaults to the primary language of the content space.
- showAbsoluteUrl
- Type: Boolean
- For public channels only, specifies whether to return the absolute unauthenticatedUrl in the output class. The default value is false.
Return Value
getManagedContentForChannel(channelId, contentKeyOrId, language, showAbsoluteUrl, referenceDepth, expandReferences, referencesAsList)
API Version
54.0
Available to Guest Users
54.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedContentDeliveryDocument getManagedContentForChannel(String channelId, String contentKeyOrId, String language, Boolean showAbsoluteUrl, Integer referenceDepth, Boolean expandReferences, Boolean referencesAsList)
Parameters
- channelId
- Type: String
- ID of the channel.
- contentKeyOrId
- Type: String
- Content key or ID of the content. A content key is a unique identifier such as MCA4CCV5QS2BAB5H7YRCRPTCWGZQ.
- language
- Type: String
- Language locale for the managed content, for example, en_US. The requested language must be added to the channel, otherwise, you get a ConnectApi.NotFoundException. If the requested translation isn’t available, the language defaults to the channel or site’s default language. If the channel or site’s default language isn’t available, the language defaults to the primary language of the content space.
- showAbsoluteUrl
- Type: Boolean
- For public channels only, specifies whether to return the absolute unauthenticatedUrl in the output class. The default value is false.
- referenceDepth
- Type: Integer
- An integer 0–3 specifying the depth of references. If you specify 0, the references property of the ConnectApi.ManagedContentDeliveryDocument output class is null. If unspecified, the default value is 0.
- expandReferences
- Type: Boolean
- Specifies whether to include details of references (true) or summaries of references (false) in the output class. If unspecified, the default value is false.
- referencesAsList
- Type: Boolean
- Specifies whether to return the references as a list in the referencesList property of the ConnectApi.ManagedContentDeliveryDocument output class (true). If you specify false, the references are returned as key value pairs in the references property. If unspecified, the default value is false.
Return Value
getManagedContentForSite(siteId, contentKeyOrId, showAbsoluteUrl)
API Version
54.0
Available to Guest Users
54.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedContentDeliveryDocument getManagedContentForSite(String siteId, String contentKeyOrId, Boolean showAbsoluteUrl)
Parameters
- siteId
- Type: String
- ID for the Experience Cloud site.
- contentKeyOrId
- Type: String
- Content key or ID of the content. A content key is a unique identifier such as MCA4CCV5QS2BAB5H7YRCRPTCWGZQ.
- showAbsoluteUrl
- Type: Boolean
- For public channels only, specifies whether to return the absolute unauthenticatedUrl in the output class. The default value is false.
Return Value
Example
This example gets a custom content type with an image reference and uses the ConnectApi.ConnectUtilities.unwrapApexWrapper() utility.
1ConnectApi.ManagedContentDeliveryDocument res =
2 ConnectApi.ManagedContentDelivery.getManagedContentForSite ('0DMXXXXXXXXXXXXXXX','MCLXXXXXXXXXXXXXXXXXXXXXXXXX',true);
3
4//before contentBody field ApexWrapper is unwrapped
5system.debug(res.contentBody);
6
7//unwrap contentBody field in res
8Map<String,Object> contentBody = (Map<String,Object>)ConnectApi.ConnectUtilities.unwrapApexWrapper(res.contentBody);
9
10//after contentBody field ApexWrapper is unwrapped, but image field still wrapped
11system.debug(contentBody);
12
13//before image field ApexWrapper is unwrapped
14system.debug(contentBody.get('Image'));
15
16//unwrap Image field in contentBody
17Map<String,Object> Image = (Map<String,Object>)ConnectApi.ConnectUtilities.unwrapApexWrapper(contentBody.get('Image'));
18
19//after image field ApexWrapper is unwrapped
20system.debug(Image);
21
22//replace wrapped primary_image in contentBody with unwrapped version
23contentBody.put('Image', Image);
24
25//after contentBody field ApexWrapper is unwrapped, with image field also unwrapped
26system.debug(contentBody);getManagedContentForSite(siteId, contentKeyOrId, language, showAbsoluteUrl)
API Version
54.0
Available to Guest Users
54.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedContentDeliveryDocument getManagedContentForSite(String siteId, String contentKeyOrId, String language, Boolean showAbsoluteUrl)
Parameters
- siteId
- Type: String
- ID for the Experience Cloud site.
- contentKeyOrId
- Type: String
- Content key or ID of the content. A content key is a unique identifier such as MCA4CCV5QS2BAB5H7YRCRPTCWGZQ.
- language
- Type: String
- Language locale for the managed content, for example, en_US. If the requested translation isn’t available, the language defaults to the channel or site’s default language. If the channel or site’s default language isn’t available, the language defaults to the primary language of the content space.
- showAbsoluteUrl
- Type: Boolean
- For public channels only, specifies whether to return the absolute unauthenticatedUrl in the output class. The default value is false.
Return Value
getManagedContentForSite(siteId, contentKeyOrId, language, showAbsoluteUrl, referenceDepth, expandReferences, referencesAsList)
API Version
54.0
Available to Guest Users
54.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedContentDeliveryDocument getManagedContentForSite(String siteId, String contentKeyOrId, String language, Boolean showAbsoluteUrl, Integer referenceDepth, Boolean expandReferences, Boolean referencesAsList)
Parameters
- siteId
- Type: String
- ID for the Experience Cloud site.
- contentKeyOrId
- Type: String
- Content key or ID of the content. A content key is a unique identifier such as MCA4CCV5QS2BAB5H7YRCRPTCWGZQ.
- language
- Type: String
- Language locale for the managed content, for example, en_US. If the requested translation isn’t available, the language defaults to the channel or site’s default language. If the channel or site’s default language isn’t available, the language defaults to the primary language of the content space.
- showAbsoluteUrl
- Type: Boolean
- For public channels only, specifies whether to return the absolute unauthenticatedUrl in the output class. The default value is false.
- referenceDepth
- Type: Integer
- An integer 0–3 specifying the depth of references. If you specify 0, the references property of the ConnectApi.ManagedContentDeliveryDocument output class is null. If unspecified, the default value is 0.
- expandReferences
- Type: Boolean
- Specifies whether to include details of references (true) or summaries of references (false) in the output class. If unspecified, the default value is false.
- referencesAsList
- Type: Boolean
- Specifies whether to return the references as a list in the referencesList property of the ConnectApi.ManagedContentDeliveryDocument output class (true). If you specify false, the references are returned as key value pairs in the references property. If unspecified, the default value is false.
Return Value
getManagedContentsForChannel(channelId, managedContentIds, contentKeys, contentTypeFQN, language, publishStartDate, publishEndDate, includeContentBody, referenceDepth, expandReferences, referencesAsList, pageParam, pageSize, showAbsoluteUrl)
API Version
58.0
Available to Guest Users
58.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedContentDeliveryDocumentCollection getManagedContentsForChannel(String channelId, List<String> managedContentIds, List<String> contentKeys, String contentTypeFQN, String language, String publishStartDate, String publishEndDate, Boolean includeContentBody, Integer referenceDepth, Boolean expandReferences, Boolean referencesAsList, Integer pageParam, Integer pageSize, Boolean showAbsoluteUrl)
Parameters
- channelId
- Type: String
- ID of the channel.
- managedContentIds
- Type: List<String>
- Comma-separated list of up to 100 managed content IDs. Specify either managed content IDs or content keys.
- contentKeys
- Type: List<String>
- Comma-separated list of up to 50 content keys. Specify either managed content IDs or content keys.
- contentTypeFQN
- Type: String
- Fully qualified name of the managed content type.
- language
- Type: String
- Language locale for the managed content, for example, en_US. If the requested translation isn’t available, the language defaults to the configured fallback language or the channel’s default language. If the content isn’t available in the fallback language and the channel’s default language, we return an error.
- publishStartDate
- Type: String
- ISO 8601 formatted publish start date.
- publishEndDate
- Type: String
- ISO 8601 formatted publish end date.
- includeContentBody
- Type: Boolean
- Specifies whether to return the content body (true) or the content summary (false). If unspecified, the default value is false.
- referenceDepth
- Type: Integer
- An integer 0–3 specifying the depth of references. If you specify 0, the references property of the ConnectApi.ManagedContentDeliveryDocumentCollection output class is null. If unspecified, the default value is 0.
- expandReferences
- Type: Boolean
- Specifies whether to include details of references (true) or summaries of references (false) in the output class. If unspecified, the default value is false.
- referencesAsList
- Type: Boolean
- Specifies whether to return the references as a list in the referencesList property of the ConnectApi.ManagedContentDeliveryDocumentCollection output class (true). If you specify false, the references are returned as key value pairs in the references property. If unspecified, the default value is false.
- pageParam
- Type: Integer
- Number of the page you want returned. Starts at 0. If you pass in null or 0, the first page is returned.
- pageSize
- Type: Integer
- Specifies the number of items per page. Valid values are from 1 through 250. If you pass in null, the default size is 25. If you specify true for expandReferences or includeContentBody, the maximum page size you can specify is 25.
- showAbsoluteUrl
- Type: Boolean
- Specifies whether to show absolute URLs in the output class (true) or not (false). The default value is false.
Return Value
Example
This example gets Event custom content type records and uses the ConnectApi.ConnectUtilities.unwrapApexWrapper() utility.
1ConnectApi.ManagedContentDeliveryDocumentCollection resCol =
2 ConnectApi.ManagedContentDelivery.getManagedContentsForChannel('0apXXXXXXXXXXXXXXX', null, new List<String>{'MCLXXXXXXXXXXXXXXXXXXXXXXXXX'}, 'Event', null, null, null, true, 3, true, false, null, 25, true);
3
4Map<String, Object> contentBodyMap = new Map<String,Object>();
5
6for(ConnectApi.AbstractManagedContentDeliveryDocument res1 : resCol.contents)
7{
8 //cast the abstract object as the ManagedContentDeliveryDocument subclass that contains contentBody
9 ConnectApi.ManagedContentDeliveryDocument res = (ConnectApi.ManagedContentDeliveryDocument)res1;
10
11 //before contentBody field ApexWrapper is unwrapped
12 system.debug(res.contentBody);
13
14 //unwrap contentBody field in res
15 Map<String,Object> contentBody = (Map<String,Object>)ConnectApi.ConnectUtilities.unwrapApexWrapper(res.contentBody);
16
17 //after contentBody field ApexWrapper is unwrapped, but image field still wrapped
18 system.debug(contentBody);
19
20 //before image field ApexWrapper is unwrapped
21 system.debug(contentBody.get('Image'));
22
23 //unwrap Image field in contentBody
24 Map<String,Object> Image = (Map<String,Object>)ConnectApi.ConnectUtilities.unwrapApexWrapper(contentBody.get('Image'));
25
26 //after image field ApexWrapper is unwrapped
27 system.debug(Image);
28
29 //replace wrapped primary_image in contentBody with unwrapped version
30 contentBody.put('Image', Image);
31
32 //after contentBody field ApexWrapper is unwrapped, with image field also unwrapped
33 system.debug(contentBody);
34
35 //put unwrapped contentBody in map
36 contentBodyMap.put(res.contentKey, contentBody);
37
38}
39
40//check unwrapped contentBody map
41System.debug(contentBodyMap);getManagedContentsForSite(siteId, managedContentIds, contentKeys, contentTypeFQN, language, publishStartDate, publishEndDate, includeContentBody, referenceDepth, expandReferences, referencesAsList, pageParam, pageSize, showAbsoluteUrl)
API Version
58.0
Available to Guest Users
58.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedContentDeliveryDocumentCollection getManagedContentsForSite(String siteId, List<String> managedContentIds, List<String> contentKeys, String contentTypeFQN, String language, String publishStartDate, String publishEndDate, Boolean includeContentBody, Integer referenceDepth, Boolean expandReferences, Boolean referencesAsList, Integer pageParam, Integer pageSize, Boolean showAbsoluteUrl)
Parameters
- siteId
- Type: String
- ID for the Experience Cloud site.
- managedContentIds
- Type: List<String>
- Comma-separated list of up to 100 managed content IDs. Specify either managed content IDs or content keys.
- contentKeys
- Type: List<String>
- Comma-separated list of up to 50 content keys. Specify either managed content IDs or content keys.
- contentTypeFQN
- Type: String
- Fully qualified name of the managed content type.
- language
- Type: String
- Language locale for the managed content, for example, en_US. If the requested translation isn’t available, the language defaults to the configured fallback language or the channel’s default language. If the content isn’t available in the fallback language and the channel’s default language, we return an error.
- publishStartDate
- Type: String
- ISO 8601 formatted publish start date.
- publishEndDate
- Type: String
- ISO 8601 formatted publish end date.
- includeContentBody
- Type: Boolean
- Specifies whether to return the content body (true) or the content summary (false). If unspecified, the default value is false.
- referenceDepth
- Type: Integer
- An integer 0–3 specifying the depth of references. If you specify 0, the references property of the ConnectApi.ManagedContentDeliveryDocumentCollection output class is null. If unspecified, the default value is 0.
- expandReferences
- Type: Boolean
- Specifies whether to include details of references (true) or summaries of references (false) in the output class. If unspecified, the default value is false.
- referencesAsList
- Type: Boolean
- Specifies whether to return the references as a list in the referencesList property of the ConnectApi.ManagedContentDeliveryDocumentCollection output class (true). If you specify false, the references are returned as key value pairs in the references property. If unspecified, the default value is false.
- pageParam
- Type: Integer
- Number of the page you want returned. Starts at 0. If you pass in null or 0, the first page is returned.
- pageSize
- Type: Integer
- Specifies the number of items per page. Valid values are from 1 through 250. If you pass in null, the default size is 25. If you specify true for expandReferences or includeContentBody, the maximum page size you can specify is 25.
- showAbsoluteUrl
- Type: Boolean
- Specifies whether to show absolute URLs in the output class (true) or not (false). The default value is false.
Return Value
Example
This example gets custom content type Event records and uses the ConnectApi.ConnectUtilities.unwrapApexWrapper() utility.
1ConnectApi.ManagedContentDeliveryDocumentCollection resCol =
2 ConnectApi.ManagedContentDelivery.getManagedContentsForSite('0DMXXXXXXXXXXXXXXX', null, new List<String>{'MCLXXXXXXXXXXXXXXXXXXXXXXXXX'}, 'Event', null, null, null, true, 3, true, false, null, 25, true);
3
4Map<String, Object> contentBodyMap = new Map<String,Object>();
5
6for(ConnectApi.AbstractManagedContentDeliveryDocument res1 : resCol.contents)
7{
8 //cast the abstract object as the ManagedContentDeliveryDocument subclass that contains contentBody
9 ConnectApi.ManagedContentDeliveryDocument res = (ConnectApi.ManagedContentDeliveryDocument)res1;
10
11 //before contentBody field ApexWrapper is unwrapped
12 system.debug(res.contentBody);
13
14 //unwrap contentBody field in res
15 Map<String,Object> contentBody = (Map<String,Object>)ConnectApi.ConnectUtilities.unwrapApexWrapper(res.contentBody);
16
17 //after contentBody field ApexWrapper is unwrapped, but image field still wrapped
18 system.debug(contentBody);
19
20 //before image field ApexWrapper is unwrapped
21 system.debug(contentBody.get('Image'));
22
23 //unwrap Image field in contentBody
24 Map<String,Object> Image = (Map<String,Object>)ConnectApi.ConnectUtilities.unwrapApexWrapper(contentBody.get('Image'));
25
26 //after image field ApexWrapper is unwrapped
27 system.debug(Image);
28
29 //replace wrapped primary_image in contentBody with unwrapped version
30 contentBody.put('Image', Image);
31
32 //after contentBody field ApexWrapper is unwrapped, with image field also unwrapped
33 system.debug(contentBody);
34
35 //put unwrapped contentBody in map
36 contentBodyMap.put(res.contentKey, contentBody);
37
38}
39
40//check unwrapped contentBody map
41System.debug(contentBodyMap);Retired ManagedContentDelivery Methods
getManagedContentsForChannel(channelId, managedContentIds, contentKeys, contentTypeFQN, language, publishStartDate, publishEndDate, includeContentBody, referenceDepth, expandReferences, referencesAsList, pageParam, pageSize)
API Version
Available to Guest Users
55.0—57.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedContentDeliveryDocumentCollection getManagedContentsForChannel(String channelId, List<String> managedContentIds, List<String> contentKeys, String contentTypeFQN, String language, String publishStartDate, String publishEndDate, Boolean includeContentBody, Integer referenceDepth, Boolean expandReferences, Boolean referencesAsList, Integer pageParam, Integer pageSize)
Parameters
- channelId
- Type: String
- ID of the channel.
- managedContentIds
- Type: List<String>
- Comma-separated list of up to 100 managed content IDs. Specify either managed content IDs or content keys.
- contentKeys
- Type: List<String>
- Comma-separated list of up to 50 content keys. Specify either managed content IDs or content keys.
- contentTypeFQN
- Type: String
- Fully qualified name of the managed content type.
- language
- Type: String
- Language locale for the managed content, for example, en_US. If the requested translation isn’t available, the language defaults to the configured fallback language or the channel’s default language. If the content isn’t available in the fallback language and the channel’s default language, we return an error.
- publishStartDate
- Type: String
- ISO 8601 formatted publish start date.
- publishEndDate
- Type: String
- ISO 8601 formatted publish end date.
- includeContentBody
- Type: Boolean
- Specifies whether to return the content body (true) or the content summary (false). If unspecified, the default value is false.
- referenceDepth
- Type: Integer
- An integer 0–3 specifying the depth of references. If you specify 0, the references property of the ConnectApi.ManagedContentDeliveryDocumentCollection output class is null. If unspecified, the default value is 0.
- expandReferences
- Type: Boolean
- Specifies whether to include details of references (true) or summaries of references (false) in the output class. If unspecified, the default value is false.
- referencesAsList
- Type: Boolean
- Specifies whether to return the references as a list in the referencesList property of the ConnectApi.ManagedContentDeliveryDocumentCollection output class (true). If you specify false, the references are returned as key value pairs in the references property. If unspecified, the default value is false.
- pageParam
- Type: Integer
- Number of the page you want returned. Starts at 0. If you pass in null or 0, the first page is returned.
- pageSize
- Type: Integer
- Specifies the number of items per page. Valid values are from 1 through 250. If you pass in null, the default size is 25. If you specify true for expandReferences or includeContentBody, the maximum page size you can specify is 25.
Return Value
getManagedContentsForSite(siteId, managedContentIds, contentKeys, contentTypeFQN, language, publishStartDate, publishEndDate, includeContentBody, referenceDepth, expandReferences, referencesAsList, pageParam, pageSize)
API Version
Available to Guest Users
55.0—57.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedContentDeliveryDocumentCollection getManagedContentsForSite(String siteId, List<String> managedContentIds, List<String> contentKeys, String contentTypeFQN, String language, String publishStartDate, String publishEndDate, Boolean includeContentBody, Integer referenceDepth, Boolean expandReferences, Boolean referencesAsList, Integer pageParam, Integer pageSize)
Parameters
- siteId
- Type: String
- ID for the Experience Cloud site.
- managedContentIds
- Type: List<String>
- Comma-separated list of up to 100 managed content IDs. Specify either managed content IDs or content keys.
- contentKeys
- Type: List<String>
- Comma-separated list of up to 50 content keys. Specify either managed content IDs or content keys.
- contentTypeFQN
- Type: String
- Fully qualified name of the managed content type.
- language
- Type: String
- Language locale for the managed content, for example, en_US. If the requested translation isn’t available, the language defaults to the configured fallback language or the channel’s default language. If the content isn’t available in the fallback language and the channel’s default language, we return an error.
- publishStartDate
- Type: String
- ISO 8601 formatted publish start date.
- publishEndDate
- Type: String
- ISO 8601 formatted publish end date.
- includeContentBody
- Type: Boolean
- Specifies whether to return the content body (true) or the content summary (false). If unspecified, the default value is false.
- referenceDepth
- Type: Integer
- An integer 0–3 specifying the depth of references. If you specify 0, the references property of the ConnectApi.ManagedContentDeliveryDocumentCollection output class is null. If unspecified, the default value is 0.
- expandReferences
- Type: Boolean
- Specifies whether to include details of references (true) or summaries of references (false) in the output class. If unspecified, the default value is false.
- referencesAsList
- Type: Boolean
- Specifies whether to return the references as a list in the referencesList property of the ConnectApi.ManagedContentDeliveryDocumentCollection output class (true). If you specify false, the references are returned as key value pairs in the references property. If unspecified, the default value is false.
- pageParam
- Type: Integer
- Number of the page you want returned. Starts at 0. If you pass in null or 0, the first page is returned.
- pageSize
- Type: Integer
- Specifies the number of items per page. Valid values are from 1 through 250. If you pass in null, the default size is 25. If you specify true for expandReferences or includeContentBody, the maximum page size you can specify is 25.