AEM Cloud service version in Model | Community
Skip to main content
Level 3
January 12, 2024

AEM Cloud service version in Model

  • January 12, 2024
  • 4 replies
  • 1148 views

Hello All,

We have a requirement to send the AEM Cloud service version to other system. I was trying to find a solution for this.

Currently we configure in code and send. Do we have any API which gives us this .

Basically i am looking at the below info in my Model

 

 

Thanks

Arun

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
January 16, 2024

No one that I am aware of.

 

Alternatively, you could explore the Cloud Manager API to leverage an environment variable that can be accessed without extra code. Then, you will have to keep this variable up to date. Here are some standard variables that are not accessible through the CM API but might be used to fill your custom variable: Link to Standard Variables

Esteban Bustamante
narendragandhi
Community Advisor
Community Advisor
January 18, 2024
user70744Author
Level 3
January 29, 2024

Thanks @narendragandhi . Seems like ProductInfo is deprecated

import org.osgi.annotation.versioning.ProviderType; /** * <code>ProductInfoService</code> provides access to all {@link ProductInfo}s registered by {@link * ProductInfoProvider}s throughout the system. * @deprecated This interface is deprecated without a replacement */ @Deprecated @ProviderType public interface ProductInfoService { /** * Returns all registered {@link ProductInfo}s * * @return the product infos. At least one product info is returned. */ ProductInfo[] getInfos(); /** * Return the {@link License} registered for * * @return the license or <code>null</code> */ License getLicense(); }

 

kautuk_sahni
Community Manager
Community Manager
January 29, 2024

@user70744 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni
user70744Author
Level 3
January 29, 2024

hi @kautuk_sahni 

Unfortunately could not find a library yet. Hence we decided to have it as an environment variable in the pipline so it can be changed when required

 

The solution by @narendragandhi  is good. however this is deprecated 

 

Thanks

Arun

narendragandhi
Community Advisor
Community Advisor
January 30, 2024

Hi @user70744 

 

I looked at the implementation of the About page that you provided in the screenshot above and found that it uses the ProductInfoService. If it is deprecated then I would also not recommend to use it.

 

Thanks

Narendra