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

[BUG] Inconsistent usage of POST vs. PUT #1470

Open
dblock opened this issue Dec 10, 2024 · 2 comments
Open

[BUG] Inconsistent usage of POST vs. PUT #1470

dblock opened this issue Dec 10, 2024 · 2 comments
Labels
bug Something isn't working v3.0

Comments

@dblock
Copy link
Member

dblock commented Dec 10, 2024

What is the bug?

Plugin uses PUT to start replication, but POST to pause, resume and stop. Seems inconsistent.

POST /_plugins/_replication/{index}/_pause
POST /_plugins/_replication/{index}/_resume
PUT /_plugins/_replication/{index}/_start
POST /_plugins/_replication/{index}/_stop

What is the expected behavior?

All these APIs should be either PUT or POST. Feels like POST.

@dblock dblock added bug Something isn't working untriaged labels Dec 10, 2024
@dblock dblock removed the untriaged label Jan 6, 2025
@dblock
Copy link
Member Author

dblock commented Jan 6, 2025

[Catch All Triage - 1, 2, 3, 4, 5, 6]

@dblock dblock added the v3.0 label Jan 6, 2025
@soosinha
Copy link
Member

soosinha commented Jan 7, 2025

PUT method is used to create or update the resource. Here PUT is used for start replication as it "creates" the replication tasks and adds the replication metadata in the replication system index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v3.0
Projects
None yet
Development

No branches or pull requests

2 participants