Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new endpoint to paginate a Workflow Run task_logs #177

Merged
merged 4 commits into from
Mar 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 104 additions & 1 deletion openapi/workflow_execution_service.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,85 @@ paths:
schema:
$ref: '#/components/schemas/ErrorResponse'
deprecated: false
'/runs/{run_id}/tasks':
get:
tags:
- Workflow Runs
summary: ListTasks
description: >-
This endpoint provides a paginated list of tasks that were executed as part of a given
workflow run. Task ordering should be the same as what would be returned in a
`RunLog` response body.
operationId: ListTasks
parameters:
- name: run_id
in: path
description: ''
required: true
style: simple
schema:
type: string
- name: page_size
in: query
description: >-
OPTIONAL
The preferred number of task logs to return in a page.
If not provided, the implementation should use a default page size.
The implementation must not return more items
than `page_size`, but it may return fewer. Clients should
not assume that if fewer than `page_size` items are
returned that all items have been returned. The
availability of additional pages is indicated by the value
of `next_page_token` in the response.
style: form
explode: true
schema:
type: integer
format: int64
- name: page_token
in: query
description: >-
OPTIONAL
Token to use to indicate where to start getting results. If unspecified, return the first
page of results.
style: form
explode: true
schema:
type: string

responses:
200:
description: ''
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/TaskListResponse'
401:
description: The request is unauthorized.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
403:
description: The requester is not authorized to perform this action.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
404:
description: The requested workflow run wasn't found.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
500:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
deprecated: false
'/runs/{run_id}/cancel':
post:
tags:
Expand Down Expand Up @@ -632,11 +711,20 @@ components:
$ref: '#/components/schemas/State'
run_log:
$ref: '#/components/schemas/Log'
task_logs_url:
type: string
description: A reference to the complete url which may be used to obtain a paginated list of task logs for this workflow
task_logs:
type: array
deprecated: true
nullable: true
items:
$ref: '#/components/schemas/Log'
description: The logs, and other key info like timing and exit code, for each step in the workflow run.
description: >-
The logs, and other key info like timing and exit code, for each step in the workflow run.
This field is deprecated and the `task_logs_url` should be used to retrieve a paginated list
of steps from the workflow run. This field will be removed in the next major version of the
specification (2.0.0)
outputs:
type: object
description: The outputs from the workflow run.
Expand Down Expand Up @@ -693,6 +781,21 @@ components:
type: string
description: an array of one or more acceptable types for the `workflow_type`
description: Available workflow types supported by a given instance of the service.
TaskListResponse:
title: TaskListResponse
type: object
properties:
task_logs:
type: array
items:
$ref: '#/components/schemas/Log'
description: The logs, and other key info like timing and exit code, for each step in the workflow run.
next_page_token:
type: string
description: >-
A token which may be supplied as `page_token` in workflow run task list request to get the next page
of results. An empty string indicates there are no more items to return.
description: The service will return a TaskListResponse when receiving a successful TaskListRequest.
WorkflowEngineVersion:
title: WorkflowEngineVersion
type: object
Expand Down