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

GET /api/4.0/servers?profileId={id} does not include all profiles #6834

Closed
ericholguin opened this issue May 16, 2022 · 2 comments · Fixed by #6847
Closed

GET /api/4.0/servers?profileId={id} does not include all profiles #6834

ericholguin opened this issue May 16, 2022 · 2 comments · Fixed by #6847
Labels
bug something isn't working as intended low impact affects only a small portion of a CDN, and cannot itself break one Traffic Ops related to Traffic Ops

Comments

@ericholguin
Copy link
Contributor

This Bug Report affects these Traffic Control components:

  • Traffic Ops

Current behavior:

When making a GET request /api/4.0/servers?profileId={id} where id belongs to a profile that is not index 0 in the profileNames array the response will not display that server.

For example if there exists a server with the profileNames:

{
...
 "profileNames": [
                "EDGE_TIER_ATS_CACHE", "MID_TIER_ATS_CACHE"
            ],
...
}

Where the id of the EDGE_TIER_ATS_CACHE profile is 13 and the id of MID_TIER_ATS_CACHE is 12.

If we perform a GET request: /api/4.0/servers?profileId=13 we will see the server above returned in the response, however
if we perform a GET request: /api/4.0/servers?profileId=12 (the following profile - at index 1 in the array) that server will not be included in the response.

Expected behavior:

Should account for all profiles, including profiles not at index 0 in the profileNames array

Steps to reproduce:

Have a server with multiple profiles, make a GET request /api/4.0/servers?profileId={id} where id belongs to the profile NOT at index 0, you will not see the server included in the response

@ericholguin ericholguin added bug something isn't working as intended Traffic Ops related to Traffic Ops low impact affects only a small portion of a CDN, and cannot itself break one labels May 16, 2022
@ocket8888
Copy link
Contributor

profileId should be deprecated as a query string parameter, since Profiles are not represented by their IDs on servers as of APIv4. Should be profileName= instead in APIv4 and later.

@mitchell852
Copy link
Member

Should be profileName= instead in APIv4 and later

yes, i would agree with this. no need for a query param of profileId in v4+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working as intended low impact affects only a small portion of a CDN, and cannot itself break one Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants