Navigation Menu

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

[management] Get an API by its context-path doesn't seem to work on latest version #5298

Closed
sdavid-ssg opened this issue Mar 25, 2021 · 0 comments

Comments

@sdavid-ssg
Copy link

sdavid-ssg commented Mar 25, 2021

Hello,

On the version 3.5.0, I used to get an API by its context-path with this GET request: [APIMURL]/management/organizations/DEFAULT/environments/DEFAULT/apis/?context-path=

But on the latest version this parameter doesn't seem to work anymore.

To give more context, I can use an example.

I have one API return by GET request [APIMURL]/management/organizations/DEFAULT/environments/DEFAULT/apis/ as we can see below:

[
    {
        "id": "add12a5a-7fd8-4906-912a-5a7fd809064c",
        "name": "Gravitee API Management",
        "version": "1",
        "description": "API pour contacter Gravitee",
        "visibility": "private",
        "state": "started",
        "numberOfRatings": 0,
        "tags": [],
        "created_at": 1616664276454,
        "updated_at": 1616664353050,
        "owner": {
            "id": "15083c8b-912e-401b-883c-8b912e501bc2",
            "displayName": "admin"
        },
        "picture_url": "[APIMURL]/management/organizations/DEFAULT/environments/DEFAULT/apis/add12a5a-7fd8-4906-912a-5a7fd809064c/picture?hash=1616664353050",
        "virtual_hosts": [
            {
                "path": "/management"
            }
        ],
        "lifecycle_state": "created",
        "context_path": "/management"
    }
]

Expected Behavior

On the 3.5.0 version, when I add the path param context-path with a value, like this [APIMURL]/management/organizations/DEFAULT/environments/DEFAULT/apis/?context-path=/test, I get this :

[]

Current Behavior

But on the latest version of 3.5 and above I get this :

[
    {
        "id": "add12a5a-7fd8-4906-912a-5a7fd809064c",
        "name": "Gravitee API Management",
        "version": "1",
        "description": "API pour contacter Gravitee",
        "visibility": "private",
        "state": "started",
        "numberOfRatings": 0,
        "tags": [],
        "created_at": 1616664276454,
        "updated_at": 1616664353050,
        "owner": {
            "id": "15083c8b-912e-401b-883c-8b912e501bc2",
            "displayName": "admin"
        },
        "picture_url": "[APIMURL]/management/organizations/DEFAULT/environments/DEFAULT/apis/add12a5a-7fd8-4906-912a-5a7fd809064c/picture?hash=1616664353050",
        "virtual_hosts": [
            {
                "path": "/management"
            }
        ],
        "lifecycle_state": "created",
        "context_path": "/management"
    }
]

Context

This problem doesn't seem to affect other path param like name or label as far as I can say but only context-path.
This issue affect my project because, we use this method to check if the context-path of the created API already exists under an other API before creating it. Now it always returns a result and therefor this check always returning false.

Your Environment

Thanks for your help.

Sacha DAVID

@NicolasGeraud NicolasGeraud added this to the APIM - 3.5.x milestone Apr 19, 2021
@RachidKelidou RachidKelidou modified the milestones: APIM - 3.5.x, 3.5.11 Apr 19, 2021
@phiz71 phiz71 self-assigned this Apr 29, 2021
@phiz71 phiz71 changed the title [GRAVITEE][APIM] Get an API by its context-path doesn't seem to work on latest version [management] Get an API by its context-path doesn't seem to work on latest version Apr 29, 2021
phiz71 added a commit to gravitee-io/gravitee-repository that referenced this issue Apr 29, 2021
phiz71 added a commit to gravitee-io/gravitee-repository-test that referenced this issue Apr 29, 2021
phiz71 added a commit to gravitee-io/gravitee-repository-jdbc that referenced this issue Apr 29, 2021
phiz71 added a commit to gravitee-io/gravitee-repository-mongodb that referenced this issue Apr 29, 2021
phiz71 added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Apr 29, 2021
phiz71 added a commit to gravitee-io/gravitee-repository-jdbc that referenced this issue Apr 29, 2021
phiz71 added a commit to gravitee-io/gravitee-repository-mongodb that referenced this issue Apr 29, 2021
phiz71 added a commit to gravitee-io/release that referenced this issue Apr 29, 2021
phiz71 added a commit to gravitee-io/release that referenced this issue May 4, 2021
ytvnr pushed a commit to gravitee-io/gravitee-repository that referenced this issue May 4, 2021
ytvnr pushed a commit to gravitee-io/gravitee-repository-test that referenced this issue May 4, 2021
ytvnr pushed a commit to gravitee-io/gravitee-repository-jdbc that referenced this issue May 4, 2021
ytvnr pushed a commit to gravitee-io/gravitee-repository-mongodb that referenced this issue May 4, 2021
ytvnr pushed a commit to gravitee-io/gravitee-management-rest-api that referenced this issue May 4, 2021
ytvnr pushed a commit to gravitee-io/release that referenced this issue May 4, 2021
@ytvnr ytvnr closed this as completed May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants