<-- Back

Private Cloud Deploy API returns no environments from /api/v4/apps/{appId}/environments

Issue

Calling the Private Cloud Deploy API endpoint GET /api/v4/apps/{appId}/environments returns an empty response, although the application contains environments that are visible in Mendix Portal and the Personal Access Token (PAT) includes the required API scopes.

Environment

  • Mendix Portal
  • Private Cloud Deploy API
  • Applications hosted in Mendix on Kubernetes

Cause

The authenticated account does not have the required namespace or cluster permissions for the application's deployment.

To retrieve environments through the API, the account must satisfy both of the following requirements:

  • Be invited to the namespace as an Administrator, or to the cluster as a Cluster Manager.
  • Be added to the application in Mendix Portal with a role that includes cloud permissions.

When either permission is absent, the endpoint returns an empty response.

Solution / Workaround

Verify that the account used to authenticate the API request has the required permissions by following these steps:

  1. Invite the account to the namespace where the application is deployed with the Administrator role, or invite the account to the cluster with the Cluster Manager role.
  2. Add the  account to the application in Mendix Portal with a role that includes cloud permissions.
  3. Retry the GET /api/v4/apps/{appId}/environments request.
  4. Confirm that the API response includes the expected environments

Internal information related

  • 278297
  • C0161BEMQ4B/p1779357903970839

Additional information

Mendix documentation:

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.