[Internal]: Workflows HTTP step: add an example using `query` and note that query strings can't go in `path`

Aperta Adatta ai principianti
#9,560 1 commento 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
markdown, yaml
Ambito
documentation

Direzione di ricerca

Modifica explore-analyze/workflows/steps/external-systems-apps.md, partendo dalla tabella dei parametri e dagli esempi delle azioni HTTP. Aggiungi l'esempio di query e poi una nota che indica che un ? in path non viene interpretato come query string. Verifica le issue di Kibana collegate per indicare i tipi di valore accettati per query in ogni versione. È completato quando la pagina viene visualizzata con esempio e nota allineati a elastic/kibana#286882.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Team:SKI triaged
Description

What: The HTTP actions section of the workflows "External systems and apps steps" page lists query ("an object with key-value pairs for query string parameters") and path ("the path appended to the configured connector's base URL") but no example uses query. Users who need a query string put it in path, and the request fails.

Why: Reproduced on Kibana 9.5.6 (Elastic Cloud Hosted), HTTP connector with a REST API base URL:

Step config Result
path: "/deployments/<id>?show_plans=true" 404 ConnectorExecutionError: [404] Not Found
path: "/deployments/<id>" with query: { show_plans: "true" } 200, parameter applied
query: { show_plans: true } (unquoted boolean) Rejected on save: "Invalid input: expected string, received boolean"

The connector's Test tab behaves the same way: a ? in the path returns a 404, while the query parameters field works.

Requested changes (page: https://www.elastic.co/docs/explore-analyze/workflows/steps/external-systems-apps, source explore-analyze/workflows/steps/external-systems-apps.md):

  1. Add an example using query with a configured connector:

    steps:
      - name: get_deployment
        type: http
        connector-id: "my-api-connector"
        with:
          path: "/deployments/<deployment-id>"
          method: "GET"
          query:
            show_plans: "true"
            show_settings: "true"
    
  2. Add a note under the parameter table: put query string parameters in query, not in path. A ? inside path is not parsed as a query string and the request fails.

  3. State the accepted query value types per version. On 9.5.6 values must be strings; unquoted booleans and numbers fail validation. elastic/kibana#286851 extends query to numbers, booleans and arrays (labeled 9.6.0, backport:skip). This should be coordinated with elastic/kibana#286882, which already tracks documenting that change.

  4. Optionally mention the Test tab's query parameters field in the HTTP connector docs.

Resources
Which deployment methods does this change impact?

Elastic On-Prem and Cloud (all)

Feature differences

Verified only on ECH 9.5.6. The behavior is in the Kibana workflows HTTP step, so it is expected to be the same on other deployment types, but that is untested.

What Elastic Stack release is this request related to?

N/A

Serverless release

No response

Collaboration model

Unknown

Point of contact.

Main contact: @

Stakeholders:

Lingua principale
Nessun dato sulla lingua
Stelle
50
Fork
269
Merge medio
4g 4h
PR unite (30g)
238

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di elastic/docs-content

Tutte le issue di elastic/docs-content

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.