arazzo: 1.0.1
info:
title: WakaTime Goals Review
summary: List the user's coding goals, then load the detailed progress for the first goal.
description: >-
Reviews the authenticated user's coding goals. It lists all goals and, when
at least one goal exists, fetches the full progress detail for the first
goal returned. When the user has no goals the workflow ends cleanly. Every
step spells out its request inline, including HTTP Basic authentication with
the WakaTime API key as the username, so the flow can be read and executed
without opening the underlying OpenAPI description.
version: 1.0.0
sourceDescriptions:
- name: goalsApi
url: ../openapi/wakatime-goals-api-openapi.yml
type: openapi
workflows:
- workflowId: goals-review
summary: List coding goals and load the first goal's progress detail.
description: >-
Lists the authenticated user's coding goals and drills into the first goal's
progress when one exists.
inputs:
type: object
required:
- apiKeyBasicAuth
properties:
apiKeyBasicAuth:
type: string
description: Base64 of "<api_key>:" for HTTP Basic auth (WakaTime API key as username).
steps:
- stepId: listGoals
description: List the authenticated user's coding goals.
operationId: listGoals
parameters:
- name: Authorization
in: header
value: Basic $inputs.apiKeyBasicAuth
successCriteria:
- condition: $statusCode == 200
outputs:
goals: $response.body#/data
firstGoalId: $response.body#/data/0/id
onSuccess:
- name: hasGoals
type: goto
stepId: getGoal
criteria:
- context: $response.body
condition: $.data.length > 0
type: jsonpath
- name: noGoals
type: end
criteria:
- context: $response.body
condition: $.data.length == 0
type: jsonpath
- stepId: getGoal
description: Load the full progress detail for the first goal returned.
operationId: getGoal
parameters:
- name: Authorization
in: header
value: Basic $inputs.apiKeyBasicAuth
- name: goal
in: path
value: $steps.listGoals.outputs.firstGoalId
successCriteria:
- condition: $statusCode == 200
outputs:
goalTitle: $response.body#/data/title
goalStatus: $response.body#/data/status
chartData: $response.body#/data/chart_data
outputs:
goals: $steps.listGoals.outputs.goals
goalTitle: $steps.getGoal.outputs.goalTitle
goalStatus: $steps.getGoal.outputs.goalStatus
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.