Skip to content

Commit

Permalink
Add API to support getting the log and snapshot content
Browse files Browse the repository at this point in the history
  • Loading branch information
Subhajit97 committed Oct 11, 2023
1 parent 6da0157 commit d67ff5a
Show file tree
Hide file tree
Showing 17 changed files with 2,994 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ api_variable.go
client.go
configuration.go
docs/CmdPipeline.md
docs/ExecutionSnapshot.md
docs/ExecutionSnapshotLayout.md
docs/ExecutionSnapshotPanel.md
docs/ExecutionSnapshotPanelData.md
docs/ExecutionSnapshotPanelDataColumn.md
docs/FpPipeline.md
docs/FpTrigger.md
docs/ListPipelineResponse.md
Expand All @@ -22,6 +27,7 @@ docs/PerrErrorModel.md
docs/PipelineApi.md
docs/Process.md
docs/ProcessApi.md
docs/ProcessEventLog.md
docs/ProcessOutputData.md
docs/TriggerApi.md
docs/Variable.md
Expand All @@ -30,6 +36,11 @@ git_push.sh
go.mod
go.sum
model_cmd_pipeline.go
model_execution_snapshot.go
model_execution_snapshot_layout.go
model_execution_snapshot_panel.go
model_execution_snapshot_panel_data.go
model_execution_snapshot_panel_data_column.go
model_fp_pipeline.go
model_fp_trigger.go
model_list_pipeline_response.go
Expand All @@ -41,6 +52,7 @@ model_modconfig_pipeline_output.go
model_perr_error_detail_model.go
model_perr_error_model.go
model_process.go
model_process_event_log.go
model_process_output_data.go
model_variable.go
response.go
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ Class | Method | HTTP request | Description
*PipelineApi* | [**Get**](docs/PipelineApi.md#get) | **Get** /pipeline/{pipeline_name} | Get pipeline
*PipelineApi* | [**List**](docs/PipelineApi.md#list) | **Get** /pipeline | List pipelines
*ProcessApi* | [**Get**](docs/ProcessApi.md#get) | **Get** /process/{process_id} | Get process
*ProcessApi* | [**GetLog**](docs/ProcessApi.md#getlog) | **Get** /process/:process_id/log/process.jsonl | Get process logs
*ProcessApi* | [**GetOutput**](docs/ProcessApi.md#getoutput) | **Get** /process/{process_id}/output | Get process output
*ProcessApi* | [**GetSnapshot**](docs/ProcessApi.md#getsnapshot) | **Get** /process/:process_id/log/process.sps | Get process snapshot
*ProcessApi* | [**List**](docs/ProcessApi.md#list) | **Get** /process | List processs
*TriggerApi* | [**Get**](docs/TriggerApi.md#get) | **Get** /trigger/{trigger_name} | Get trigger
*TriggerApi* | [**List**](docs/TriggerApi.md#list) | **Get** /trigger | List triggers
Expand All @@ -95,6 +97,11 @@ Class | Method | HTTP request | Description
## Documentation For Models

- [CmdPipeline](docs/CmdPipeline.md)
- [ExecutionSnapshot](docs/ExecutionSnapshot.md)
- [ExecutionSnapshotLayout](docs/ExecutionSnapshotLayout.md)
- [ExecutionSnapshotPanel](docs/ExecutionSnapshotPanel.md)
- [ExecutionSnapshotPanelData](docs/ExecutionSnapshotPanelData.md)
- [ExecutionSnapshotPanelDataColumn](docs/ExecutionSnapshotPanelDataColumn.md)
- [FpPipeline](docs/FpPipeline.md)
- [FpTrigger](docs/FpTrigger.md)
- [ListPipelineResponse](docs/ListPipelineResponse.md)
Expand All @@ -106,6 +113,7 @@ Class | Method | HTTP request | Description
- [PerrErrorDetailModel](docs/PerrErrorDetailModel.md)
- [PerrErrorModel](docs/PerrErrorModel.md)
- [Process](docs/Process.md)
- [ProcessEventLog](docs/ProcessEventLog.md)
- [ProcessOutputData](docs/ProcessOutputData.md)
- [Variable](docs/Variable.md)

Expand Down
270 changes: 270 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,126 @@ paths:
summary: List processs
tags:
- Process
/process/:process_id/log/process.jsonl:
get:
description: Get process logs
operationId: process_get_log
parameters:
- description: The id of the process
explode: false
in: path
name: process_id
required: true
schema:
format: "^[a-z]{0,32}$"
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/ProcessEventLog'
description: OK
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/perr.ErrorModel'
description: Bad Request
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/perr.ErrorModel'
description: Unauthorized
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/perr.ErrorModel'
description: Forbidden
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/perr.ErrorModel'
description: Not Found
"429":
content:
application/json:
schema:
$ref: '#/components/schemas/perr.ErrorModel'
description: Too Many Requests
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/perr.ErrorModel'
description: Internal Server Error
summary: Get process logs
tags:
- Process
/process/:process_id/log/process.sps:
get:
description: Get process snapshot
operationId: process_get_snapshot
parameters:
- description: The id of the process
explode: false
in: path
name: process_id
required: true
schema:
format: "^[a-z]{0,32}$"
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/execution.Snapshot'
description: OK
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/perr.ErrorModel'
description: Bad Request
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/perr.ErrorModel'
description: Unauthorized
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/perr.ErrorModel'
description: Forbidden
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/perr.ErrorModel'
description: Not Found
"429":
content:
application/json:
schema:
$ref: '#/components/schemas/perr.ErrorModel'
description: Too Many Requests
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/perr.ErrorModel'
description: Internal Server Error
summary: Get process snapshot
tags:
- Process
/process/{process_id}:
get:
description: Get process
Expand Down Expand Up @@ -842,6 +962,23 @@ components:
status:
type: string
type: object
ProcessEventLog:
example:
event_type: event_type
payload:
- 0
- 0
ts: ts
properties:
event_type:
type: string
payload:
items:
type: integer
type: array
ts:
type: string
type: object
ProcessOutputData:
example:
output: "{}"
Expand All @@ -863,6 +1000,139 @@ components:
type:
type: string
type: object
execution.Snapshot:
example:
layout:
children:
- null
- null
panel_type: panel_type
name: name
schema_version: schema_version
start_time: start_time
panels:
key:
display_type: display_type
data:
columns:
- data_type: data_type
name: name
- data_type: data_type
name: name
rows:
- null
- null
panel_type: panel_type
name: name
width: 0
title: title
dashboard: dashboard
properties: "{}"
status: status
end_time: end_time
properties:
end_time:
type: string
layout:
$ref: '#/components/schemas/execution.SnapshotLayout'
panels:
additionalProperties:
$ref: '#/components/schemas/execution.SnapshotPanel'
type: object
schema_version:
type: string
start_time:
type: string
type: object
execution.SnapshotLayout:
example:
children:
- null
- null
panel_type: panel_type
name: name
properties:
children:
items:
$ref: '#/components/schemas/execution.SnapshotLayout'
type: array
name:
type: string
panel_type:
type: string
type: object
execution.SnapshotPanel:
example:
display_type: display_type
data:
columns:
- data_type: data_type
name: name
- data_type: data_type
name: name
rows:
- null
- null
panel_type: panel_type
name: name
width: 0
title: title
dashboard: dashboard
properties: "{}"
status: status
properties:
dashboard:
type: string
data:
$ref: '#/components/schemas/execution.SnapshotPanelData'
display_type:
type: string
name:
type: string
panel_type:
type: string
properties:
properties: {}
type: object
status:
type: string
title:
type: string
width:
type: integer
type: object
execution.SnapshotPanelData:
example:
columns:
- data_type: data_type
name: name
- data_type: data_type
name: name
rows:
- null
- null
properties:
columns:
items:
$ref: '#/components/schemas/execution.SnapshotPanelDataColumn'
type: array
rows:
items:
$ref: '#/components/schemas/execution.SnapshotPanelDataRow'
type: array
type: object
execution.SnapshotPanelDataColumn:
example:
data_type: data_type
name: name
properties:
data_type:
type: string
name:
type: string
type: object
execution.SnapshotPanelDataRow:
type: object
modconfig.Pipeline:
example:
outputs:
Expand Down
Loading

0 comments on commit d67ff5a

Please sign in to comment.