Search code examples
mulemulesoftanypoint-platform

Unable to download application from OnPrem Servers


I need to change a Mule Proxy API created by the Anypoint portal. To download it I am following the this official guide.

To get the JAR file I need to invoke CURL like this:

curl -X GET \
 https://anypoint.mulesoft.com/hybrid/api/v1/applications/<APP_ID>/artifact \
 -H 'Authorization: bearer <BEARER_TOKEN>' \
 -H 'X-ANYPNT-ENV-ID: <ENVIRONMENT_ID>' \
 -H 'X-ANYPNT-ORG-ID: <ORGANIZATION_ID>' \
 -o '<DOWNLOAD_PATH>'

I got:

  • App_ID from the url as posted in the guide.
  • the token successfully using endpoint https://anypoint.mulesoft.com/accounts/login
  • X-ANYPNT-ORG-ID header from field Business Group ID at the Access Management->Business Group. The guide points to the Organization Id field but that seems to be replaced by Business Group ID;
  • X-ANYPNT-ENV-ID header from field Client ID at Access Management->Business Group-> tab Environments-> tab Settings.

Yet, when i try to get the JAR file using CURL i get:

{"message":"Please provide correct header tokens for Authorization, Organization, and Environment."}

I can't figure it out which one element is wrong. I already reviewed each one a few times. Messing with authorization gives the same message that messing with any other element.

Maybe worth mention, my organization is a sub organization from the corporate organization, which is not available to me.

If there is other way to get the JAR that could be acceptable too.


Solution

  • Using that procedure should work but it is meant to download the current application deployed through Runtime Manager. If you want to download an autogenerated proxy created in API Manager you can simply download it from API Manager following the procedure in the documentation:

    You can download a proxy that you generated in API Manager by following this procedure.

    1. Navigate to Anypoint Platform > API Manager.
    2. In API Administration, click the API instance whose proxy you want to download.
    3. Click Actions and select Download Proxy.

    Note that the link you shared is a Knowledge Article created by MuleSoft Support team in base to actual experience, not a formal documentation link.