You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2022/05/16 17:30:44 UTC

[GitHub] [trafficcontrol] ericholguin opened a new issue, #6834: GET /api/4.0/servers?profileId={id} does not include all profiles

ericholguin opened a new issue, #6834:
URL: https://github.com/apache/trafficcontrol/issues/6834

   <!--
   ************ STOP!! ************
   If this issue identifies a security vulnerability, DO NOT submit it! Instead, contact
   the Apache Traffic Control Security Team at security@trafficcontrol.apache.org and follow the
   guidelines at https://apache.org/security regarding vulnerability disclosure.
   
   - For *SUPPORT QUESTIONS*, use the #traffic-control channel on the ASF slack (https://s.apache.org/tc-slack-request)
   or the Traffic Control Users mailing list (send an email to users-subscribe@trafficcontrol.apache.org to subscribe).
   - Before submitting, please **SEARCH GITHUB** for a similar issue or PR
       * https://github.com/apache/trafficcontrol/issues
       * https://github.com/apache/trafficcontrol/pulls
   -->
   
   <!-- Do not submit security vulnerabilities or support requests here - see above -->
   ## This Bug Report affects these Traffic Control components:
   <!-- delete all those that don't apply -->
   
   - Traffic Ops
   
   
   ## Current behavior:
   <!-- Describe how the bug happens -->
   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`:
   ```json
   {
   ...
    "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:
   <!-- Describe what the behavior would be without the bug -->
   
   Should account for all profiles, including profiles not at index 0 in the profileNames array
   
   ## Steps to reproduce:
   <!-- If the current behavior is a bug, please provide the *STEPS TO REPRODUCE* and
   include the applicable TC version.
   -->
   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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] ocket8888 closed issue #6834: GET /api/4.0/servers?profileId={id} does not include all profiles

Posted by GitBox <gi...@apache.org>.
ocket8888 closed issue #6834: GET /api/4.0/servers?profileId={id} does not include all profiles
URL: https://github.com/apache/trafficcontrol/issues/6834


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] mitchell852 commented on issue #6834: GET /api/4.0/servers?profileId={id} does not include all profiles

Posted by GitBox <gi...@apache.org>.
mitchell852 commented on issue #6834:
URL: https://github.com/apache/trafficcontrol/issues/6834#issuecomment-1129007580

   > Should be `profileName=` instead in APIv4 and later
   
   yes, i would agree with this. no need for a query param of profileId in v4+


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] ocket8888 commented on issue #6834: GET /api/4.0/servers?profileId={id} does not include all profiles

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #6834:
URL: https://github.com/apache/trafficcontrol/issues/6834#issuecomment-1128034575

   `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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org