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

[management-api] Full export of an API, including members, pages, ... #164

Closed
NicolasGeraud opened this Issue Jul 21, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@NicolasGeraud
Member

NicolasGeraud commented Jul 21, 2016

Feature :

Add members and pages when exporting/importing an api.
With this feature, an api configured on a staging environment, could be more easily promoted to production automatically.

Question :
Currently, the api is exported like this:

{
  "name": "test",
  "version": "1",
  "description": "my awesome api",
  "visibility": "PRIVATE",
  "tags": [],
  "proxy": { ... },
  "paths": { ... },
  "properties": {
    "prop1": "value1"
  },
  "services": {},
  "resources": [ ... ]
}

Members and pages should be added to the existing json like this :

{
  "name": "test",
  "version": "1",
  "description": "my awesome api",
  "visibility": "PRIVATE",
  "tags": [],
  "proxy": { ... },
  "paths": { ... },
  "properties": { 
    "prop1": "value1"
  },
  "services": {},
  "resources": [ ... ],
  "members": [ ... ],
  "pages": [ ... ]
}

or in a new format :

{
  "definition": {
    "name": "test",
    "version": "1",
    "description": "my awesome api",
    "visibility": "PRIVATE",
    "tags": [],
    "proxy": { ... },
    "paths": { ... },
    "properties": {
      "prop1": "value1"
    },
    "services": {},
    "resources": [ ... ]
  },
 "pages": [ ... ],
 "members": [ ... ]
}

With the first format, we don't break anything. What do you think ?

@brasseld brasseld changed the title from [management-api] export members and pages in addition to definition to [management-api] Full export of an API, including members, pages, ... Jul 21, 2016

NicolasGeraud added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Jul 21, 2016

@NicolasGeraud NicolasGeraud self-assigned this Jul 21, 2016

NicolasGeraud added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Jul 25, 2016

NicolasGeraud added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Jul 25, 2016

@brasseld brasseld added this to the 0.18.0 milestone Jul 26, 2016

NicolasGeraud added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Jul 26, 2016

brasseld added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Jul 26, 2016

@helmuthva

This comment has been minimized.

helmuthva commented Aug 5, 2018

Hi,

I just started experimenting with gravitee but could not find a mention of the following behavior in issues or the documentation of the Mgmt. API:

When importing an api export when the resp. API already exists the following error is thrown:

curl -uadmin:admin -d @api.json http://localhost:8005/management/apis/import { "message" : "The api context path [/testauth/] already exists.", "http_status" : 400

  • Is this intended behavior?
  • If so, what is the recommended procedure to promote an update of an API definition e.g. from dev->test->staging->production?

Best

@brasseld

This comment has been minimized.

Member

brasseld commented Aug 5, 2018

Hi @helmuthva

I think you're looking for this service: https://docs.gravitee.io/apim/api/1.17/#operation/updateWithDefinition

Using this one, you are able to update API definition from a previously exported definition, including pages, plans, members, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment