cloudfoundry / korifi

Cloud Foundry on Kubernetes
Apache License 2.0
318 stars 65 forks source link

Add GET /v3/apps/:guid/environment_variables endpoint #3583

Closed gogolok closed 2 weeks ago

gogolok commented 3 weeks ago

Is there a related GitHub Issue?

Fixes #2332

What is this change about?

It adds the missing endpoint GET /v3/apps/:guid/environment_variables.

Does this PR introduce a breaking change?

No.

Acceptance Steps

On a running Korifi instance push an app, set a env variable (via cf set-env), get the app guid and then run the cf curl /v3/apps/:guid/environment_variables command. It should output something similar to:

{
   "links" : {
      "app" : {
         "href" : "https://localhost/v3/apps/a6cb4e95-65a1-475a-b905-4ce6fac4cf88"
      },
      "self" : {
         "href" : "https://localhost/v3/apps/a6cb4e95-65a1-475a-b905-4ce6fac4cf88/environment_variables"
      }
   },
   "var" : {
      "key0" : "value"
   }
}