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

feat(admin) change behaviour of GET target requests #3049

Merged
merged 1 commit into from
Dec 15, 2017

Conversation

hbagdi
Copy link
Member

@hbagdi hbagdi commented Nov 23, 2017

Summary

The endpoints to list active and all Targets associated
with an Upstream have been changed as follows:

  • GET /upstreams/:upstream_name_or_id/targets/ now
    lists only the active Targets instead of listing all The targets.
    Previously, active targets were available at the endpoint
    /upstreams/:upstream_name_or_id/targets/active, which is now
    removed.
  • GET /upstreams/:upstream_name_or_id/targets/all endpiont is
    introduced, which returns a list of all the Targets (old and current).

Issues resolved

Fix #2791

TODO

  • Update doc

The endpoints to list active and all Targets associated
with an Upstream have been changed as follows:
* `GET /upstreams/:upstream_name_or_id/targets/` now
lists only the active Targets instead of listing all The targets.
Previously, active targets were available at the endpoint
`/upstreams/:upstream_name_or_id/targets/active`, which is now
removed.
* `GET /upstreams/:upstream_name_or_id/targets/all` endpiont is
introduced, which returns a list of all the Targets (old and current).
Copy link
Member

@thibaultcha thibaultcha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, this looks great, thanks @hbagdi, we'll include it in 0.12!

@thibaultcha thibaultcha merged commit b348085 into Kong:next Dec 15, 2017
thibaultcha pushed a commit that referenced this pull request Jan 16, 2018
Breaking change:

The endpoints to list active and all Targets associated
with an Upstream have been changed as follows:

* `/upstreams/:upstream_name_or_id/targets/active` is
removed.

* `/upstreams/:upstream_name_or_id/targets/` now
only lists the active Targets instead of listing all of them. 

* `/upstreams/:upstream_name_or_id/targets/all` is
introduced, which returns a list of all the Targets (old and
current), as per the previous behavior of the `/targets/`
endpoint.

From #3049 
Closes #2791
thibaultcha pushed a commit that referenced this pull request Jan 19, 2018
Breaking change:

The endpoints to list active and all Targets associated
with an Upstream have been changed as follows:

* `/upstreams/:upstream_name_or_id/targets/active` is
removed.

* `/upstreams/:upstream_name_or_id/targets/` now
only lists the active Targets instead of listing all of them. 

* `/upstreams/:upstream_name_or_id/targets/all` is
introduced, which returns a list of all the Targets (old and
current), as per the previous behavior of the `/targets/`
endpoint.

From #3049 
Closes #2791
hanhui870 pushed a commit to hanhui870/kong-dashboard that referenced this pull request Jan 27, 2018
To reduce confusion, the /upstreams/:upstream_name_or_id/targets/ has been updated to not show the full list of Targets anymore, but only the ones that are currently active in the load balancer. To retrieve the full history of Targets, you can now query /upstreams/:upstream_name_or_id/targets/all. The /upstreams/:upstream_name_or_id/targets/active endpoint has been removed. Thanks @hbagdi for tackling this backlog item! Kong/kong#3049
@hbagdi hbagdi deleted the bugfix-2791 branch December 6, 2018 18:45
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

Successfully merging this pull request may close these issues.

2 participants