Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensions are not deployed upon creation. #99

Open
kurtkanaskie opened this issue Oct 2, 2020 · 0 comments
Open

Extensions are not deployed upon creation. #99

kurtkanaskie opened this issue Oct 2, 2020 · 0 comments

Comments

@kurtkanaskie
Copy link
Contributor

kurtkanaskie commented Oct 2, 2020

When creating an extension you cannot specify "state": "DEPLOYED" as the Edge API returns an error. You must specify "state": "UNDEPLOYED" or omit all together.
You can include credentials on the create.

POST https://api.enterprise.apigee.com/v1/organizations/$ORG/environments/$ENV/extensions
[
   {
      "name":"test-extension",
      "description":"Testing",
      "packageName":"gcp-auth",
      "version":"1.0.2",
      "credentials": "ewogICJ0...udC5jb20iCn0",
      "state": "UNDEPLOYED"
   }
]

To deploy using the plugin you must send a PATCH request with at least the following or the complete create request.

PATCH  https://api.enterprise.apigee.com/v1/organizations/$ORG/environments/$ENV/extensions/$EXT_ID
[
   {
      "name":"test-extension",
      "state": "DEPLOYED"
   }
]

NOTE: that the Edge API does not require the name but the maven plugin does.

Consequently, the plugin does not allow the extension to be undeployed, since the plugin requires a name but the Edge API does not allow the name when setting state to UNDEPLOYED.

The Edge API can deploy using

PATCH  https://api.enterprise.apigee.com/v1/organizations/$ORG/environments/$ENV/extensions/$EXT_ID
{
    "state": "DEPLOYED"
}

The Edge API can undeploy using

PATCH  https://api.enterprise.apigee.com/v1/organizations/$ORG/environments/$ENV/extensions/$EXT_ID
{
    "state": "UNDEPLOYED"
}

Edge API: https://apidocs.apigee.com/extensions-management-api/apis/patch/v1/organizations/%7Borg%7D/environments/%7Benv%7D/extensions/%7Bid%7D-0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant