About this blueprint
Getting Started Git Outputs API
A common use-case may be to retrieve a specific field from a JSON payload in an API request and use that further downstream.
In this simple example we will query the number of stars for a given Github repo and then output it as a message.
yaml
id: stars
namespace: company.team
inputs:
- id: repo
type: STRING
defaults: kestra-io/kestra
tasks:
- id: api_query
type: io.kestra.plugin.core.http.Request
contentType: application/json
headers:
User-Agent: kestra
uri: https://api.github.com/repos/{{inputs.repo}}
- id: get_stars
type: io.kestra.plugin.core.log.Log
message: ✨✨✨ Total GitHub stars {{json(outputs.api_query.body).stargazers_count
}} ✨✨✨
More Related Blueprints