ManagedContentDelivery Class

Get channels. Get collection items. Get managed content. Get a managed content rendition.

ConnectApi

These methods are for ManagedContentDelivery. All methods are static.

Get managed content delivery channels for the context user.

62.0

62.0

No

public static ConnectApi.ManagedContentDeliveryChannelsRepresentation getChannels(Integer pageParam, Integer pageSize)

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.

Type: ConnectApi.ManagedContentDeliveryChannelsRepresentation

Get collection items for a channel.

56.0

56.0

No

public static ConnectApi.ManagedContentCollectionItems getCollectionItemsForChannel(String channelId, String collectionKeyOrId, String language)

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.

Type: ConnectApi.ManagedContentCollectionItems

This example gets a collection of a custom content type that includes references to images and uses the ConnectApi.ConnectUtilities.unwrapApexWrapper() utility.

Get a page of collection items for a channel.

63.0

63.0

No

public static ConnectApi.ManagedContentCollectionItems getCollectionItemsForChannel(String channelId, String collectionKeyOrId, String language, Integer pageToken, Integer pageSize)

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.

pageToken

Type: Integer

Integer specifying a page token of items. If you pass in null, the default value is 0, which returns the first page token.

pageSize

Type: Integer

Number of items per page. Valid values are from 1 through 250. If you pass in null, the default size is 50.

Type: ConnectApi.ManagedContentCollectionItems

Get collection items for an Experience Cloud site.

56.0

56.0

No

public static ConnectApi.ManagedContentCollectionItems getCollectionItemsForSite(String siteId, String collectionKeyOrId, String language)

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.

Type: ConnectApi.ManagedContentCollectionItems

This example gets a collection of a custom content type that includes references to images and uses the ConnectApi.ConnectUtilities.unwrapApexWrapper() utility.

Get a page of collection items for an Experience Cloud site.

63.0

63.0

No

public static ConnectApi.ManagedContentCollectionItems getCollectionItemsForSite(String siteId, String collectionKeyOrId, String language, Integer pageToken, Integer pageSize)

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.

pageToken

Type: Integer

Integer specifying a page token of items. If you pass in null, the default value is 0, which returns the first page token.

pageSize

Type: Integer

Number of items per page. Valid values are from 1 through 250. If you pass in null, the default size is 50.

Type: ConnectApi.ManagedContentCollectionItems

Get collection metadata for a channel.

68.0

No

public static ConnectApi.ManagedContentCollectionMetadata getCollectionMetadataForChannel(String channelId, String collectionKeyOrId, Boolean expandMetadata, String language)

channelId

Type: String

ID of a channel.

collectionKeyOrId

Type: String

Collection key or ID of the collection. A collection key is a unique identifier such as MCA4CCV5QS2BAB5H7YRCRPTCWGZQ.

expandMetadata

Type: Boolean

Specifies whether to expand the type metadata and get the schema (true) or not (false). If unspecified, the default value is false.

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.

Type: ConnectApi.ManagedContentCollectionMetadata

Get collection metadata for a site.

68.0

No

public static ConnectApi.ManagedContentCollectionMetadata getCollectionMetadataForSite(String siteId, String collectionKeyOrId, Boolean expandMetadata, String language)

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.

expandMetadata

Type: Boolean

Specifies whether to expand the type metadata and get the schema (true) or not (false). If unspecified, the default value is false.

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.

Type: ConnectApi.ManagedContentCollectionMetadata

Get a managed content delivery channel.

62.0

62.0

No

public static ConnectApi.ManagedContentDeliveryChannelRepresentation getManagedContentDeliveryChannel(String channelId)

channelId

Type: String

ID of the channel.

Type: ConnectApi.ManagedContentDeliveryChannelRepresentation

Get a piece of published content for a channel.

54.0

54.0

No

public static ConnectApi.ManagedContentDeliveryDocument getManagedContentForChannel(String channelId, String contentKeyOrId, Boolean showAbsoluteUrl)

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.

Type: ConnectApi.ManagedContentDeliveryDocument

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).

This example gets a custom content type with an image reference and uses the ConnectApi.ConnectUtilities.unwrapApexWrapper() utility.

Get a piece of published content in a specified language for a channel.

54.0

54.0

No

public static ConnectApi.ManagedContentDeliveryDocument getManagedContentForChannel(String channelId, String contentKeyOrId, String language, Boolean showAbsoluteUrl)

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.

Type: ConnectApi.ManagedContentDeliveryDocument

Get a piece of published content in a specified language with references for a channel.

54.0

54.0

No

public static ConnectApi.ManagedContentDeliveryDocument getManagedContentForChannel(String channelId, String contentKeyOrId, String language, Boolean showAbsoluteUrl, Integer referenceDepth, Boolean expandReferences, Boolean referencesAsList)

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.

Type: ConnectApi.ManagedContentDeliveryDocument

Get a piece of published content for an Experience Cloud site.

54.0

54.0

No

public static ConnectApi.ManagedContentDeliveryDocument getManagedContentForSite(String siteId, String contentKeyOrId, Boolean showAbsoluteUrl)

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.

Type: ConnectApi.ManagedContentDeliveryDocument

This example gets a custom content type with an image reference and uses the ConnectApi.ConnectUtilities.unwrapApexWrapper() utility.

Get a piece of published content in a specified language for an Experience Cloud site.

54.0

54.0

No

public static ConnectApi.ManagedContentDeliveryDocument getManagedContentForSite(String siteId, String contentKeyOrId, String language, Boolean showAbsoluteUrl)

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.

Type: ConnectApi.ManagedContentDeliveryDocument

Get a piece of published content in a specified language with references for an Experience Cloud site.

54.0

54.0

No

public static ConnectApi.ManagedContentDeliveryDocument getManagedContentForSite(String siteId, String contentKeyOrId, String language, Boolean showAbsoluteUrl, Integer referenceDepth, Boolean expandReferences, Boolean referencesAsList)

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.

Type: ConnectApi.ManagedContentDeliveryDocument

Get a collection of published contents for a channel.

58.0

58.0

No

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)

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.

Type: ConnectApi.ManagedContentDeliveryDocumentCollection

This example gets Event custom content type records and uses the ConnectApi.ConnectUtilities.unwrapApexWrapper() utility.

Get a collection of published contents for an Experience Cloud site.

58.0

58.0

No

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)

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.

Type: ConnectApi.ManagedContentDeliveryDocumentCollection

This example gets custom content type Event records and uses the ConnectApi.ConnectUtilities.unwrapApexWrapper() utility.

Get a managed content rendition for a channel.

68.0

68.0

No

public static ConnectApi.ManagedContentDeliveryRendition getManagedContentRenditionForChannel(String channelId, String contentKeyOrId, String renditionType)

channelId

Type: String

ID of the channel.

contentKeyOrId

Type: String

Collection key or ID of the collection. A collection key is a unique identifier such as MCA4CCV5QS2BAB5H7YRCRPTCWGZQ.

renditionType

Type: String

Type of rendition.

Type: ConnectApi.ManagedContentDeliveryRendition

Get a managed content rendition in a specified language for a channel.

68.0

68.0

No

public static ConnectApi.ManagedContentDeliveryRendition getManagedContentRenditionForChannel(String channelId, String contentKeyOrId, String renditionType, String language)

channelId

Type: String

ID of the channel.

contentKeyOrId

Type: String

Collection key or ID of the collection. A collection key is a unique identifier such as MCA4CCV5QS2BAB5H7YRCRPTCWGZQ.

renditionType

Type: String

Type of rendition.

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.

Type: ConnectApi.ManagedContentDeliveryRendition

These methods for ManagedContentDelivery are retired.

Get a managed content delivery channel.

54.0–61.0

In version 62.0 and later, use getManagedContentDeliveryChannel(channelId) to get a managed content delivery channel.

54.0

No

public static ConnectApi.ManagedContentChannelDetail getManagedContentChannel(String channelId)

channelId

Type: String

ID of the channel.

Type: ConnectApi.ManagedContentChannelDetail

Get a collection of published contents for a channel.

55.0—57.0

In version 58.0 and later, use getManagedContentsForChannel(channelId, managedContentIds, contentKeys, contentTypeFQN, language, publishStartDate, publishEndDate, includeContentBody, referenceDepth, expandReferences, referencesAsList, pageParam, pageSize, showAbsoluteUrl).

55.0—57.0

No

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)

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.

Type: ConnectApi.ManagedContentDeliveryDocumentCollection

Get a collection of published contents for an Experience Cloud site.

55.0—57.0

In version 58.0 and later, use getManagedContentsForSite(siteId, managedContentIds, contentKeys, contentTypeFQN, language, publishStartDate, publishEndDate, includeContentBody, referenceDepth, expandReferences, referencesAsList, pageParam, pageSize, showAbsoluteUrl).

55.0—57.0

No

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)

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.

Type: ConnectApi.ManagedContentDeliveryDocumentCollection