Skip to content

Instantly share code, notes, and snippets.

@rssnyder
Last active June 16, 2026 16:15
Show Gist options
  • Select an option

  • Save rssnyder/a61c30a4dc6e7d2dd045151440f0f0a8 to your computer and use it in GitHub Desktop.

Select an option

Save rssnyder/a61c30a4dc6e7d2dd045151440f0f0a8 to your computer and use it in GitHub Desktop.
show_context_data workflow
apiVersion: harness.io/v1
kind: Workflow
name: collecting data from api
identifier: collecting_data_from_api
type: test
owner: snyder
projectIdentifier: rssnyder
orgIdentifier: default
metadata: {}
spec:
output:
text:
- title: Output value
content: |
Parameter **name** is `${{ parameters.name }}`
lifecycle: dev
parameters:
- title: Service Details
properties:
token:
title: Harness Token
type: string
ui:widget: password
ui:field: HarnessAuthToken
gitUsername:
title: Repository Owner Username
description: Enter the repository owner username
type: string
customValidate:
type: string
ui:field: ValidateAndFetch
ui:options:
button:
title: Fetch Data
path: proxy/github-raw/LearnWebCode/json-example/master/pet-of-the-day.json
setContextData:
returnData: name
request:
method: GET
name:
title: Collected Name
description: The name collected from the api endpoint
type: string
ui:field: ContextViewer
readonly: true
ui:options:
getContextData: ${{formContext.returnData}}
formContext:
title: Live Form Context
description: DEBUG Context
type: string
ui:field: ContextViewer
ui:options:
getContextData: ${{formContext}}
steps:
- action: debug:log
id: write-debug-line
name: Show Return Data
input:
message: ${{parameters.name}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment