1

I'm trying to find out if the WorkflowPolicySet policy is configured from the Sitecore XP side of things. There seems to be an API to retrieve PolicySets:

 {{OpsApiHost}}/{{ShopsApi}}/PolicySets

However, the /PolicySets request that should return all policy sets never returns anything. You can also request a policy set by name:

{{OpsApiHost}}/{{ShopsApi}}/PolicySets('WorkflowPolicySet')

Which works, but only if you pass the Ops environment. This doesn't work from Sitecore XP, because you always work with Authoring or Shops in that context.

How is this suppose to work? Is there any other way to find out what policies are configured for a certain environment?

  • did you try with environment.Policies? environment variable is based on class CommerceEnvironment – Vlad Iobagiu Feb 22 at 14:13
  • @VladIobagiu I'm trying to do this using the service proxy – Jonne Kats Feb 22 at 14:36
1

Use Postman:

{{OpsApiHost}}/{{OpsApi}}/Environments('{{Environment}}')?$expand=Components

You'll find this request under SitecoreCommerce_DevOps/Environment Management

  • 1
    Thanks, I know about this postman call. Is there a way to use this from my sitecore code? Using the service proxy? – Jonne Kats Feb 26 at 10:10
2

According to Sitecore support, there is no way to do this with the service proxy and you will have to call the above API yourself (Using HttpClient or any other http library)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.