Skip to content

Dev Tools should support PATCH method #2343

Description

@peternied

Reproduction:

  • Find some documentation about a scenario in OpenSearch APIs that use a PATCH command, like
  • Get excited to try it out in your own cluster
  • Open Dashboards, login as an admin user
  • Navigate to Dev Tools
  • Paste the following into the console window
PATCH _plugins/_security/api/roles/my_role
[
  {
    "op": "replace", "path": "/index_permissions/0/fls", "value": ["myfield1", "myfield2"]
  },
  {
    "op": "remove", "path": "/index_permissions/0/dls"
  }
]
  • Select that text and hit the 'send request' button

Expected:

The request should succeed

Actual:

An error message appears in the response window:

{"statusCode":400,"error":"Bad Request","message":"[request query.method]: Method must be one of, case insensitive ['HEAD', 'GET', 'POST', 'PUT', 'DELETE']. Received 'PATCH'."}

Be sad you can't use this great tool to vet the scenario called out in the documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions