Merged in feature/apitidyup (pull request #24)
Export API Clean Up * exportapi
This commit is contained in:
@@ -229,7 +229,7 @@ paths:
|
||||
'404':
|
||||
description: Job collector not found.
|
||||
|
||||
/exports/trigger:
|
||||
/export:
|
||||
post:
|
||||
operationId: triggerExport
|
||||
tags:
|
||||
@@ -251,6 +251,32 @@ paths:
|
||||
$ref: '#/components/schemas/IdMessage'
|
||||
'400':
|
||||
description: Invalid request body.
|
||||
'404':
|
||||
description: Job not found.
|
||||
|
||||
/export/{id}:
|
||||
get:
|
||||
operationId: exportState
|
||||
tags:
|
||||
- ExportService
|
||||
summary: Check export state.
|
||||
description: Checks the current state of an export.
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: The ID of the export.
|
||||
responses:
|
||||
'200':
|
||||
description: Export has been completed.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ExportDetails'
|
||||
'404':
|
||||
description: Export job not found.
|
||||
|
||||
|
||||
components:
|
||||
@@ -366,7 +392,7 @@ components:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier.
|
||||
description: Unique identifier for entity.
|
||||
required:
|
||||
- id
|
||||
|
||||
@@ -397,7 +423,81 @@ components:
|
||||
ExportTrigger:
|
||||
type: object
|
||||
properties:
|
||||
example_property:
|
||||
job_id:
|
||||
type: string
|
||||
description: Example property for ExportTrigger.
|
||||
description: The job id of the query results to be exported.
|
||||
ingestion_filters:
|
||||
type: object
|
||||
description: Filter the scope based on ingestion parameters.
|
||||
properties:
|
||||
start_date:
|
||||
type: string
|
||||
description: This first date of ingestion.
|
||||
end_date:
|
||||
type: string
|
||||
description: The last date of ingestion.
|
||||
field_filters:
|
||||
type: array
|
||||
description: Filter the scope based on field output values.
|
||||
items:
|
||||
$ref: '#/components/schemas/FieldFilter'
|
||||
description: Payload for triggering an export.
|
||||
required:
|
||||
- job_id
|
||||
|
||||
FieldFilter:
|
||||
type: object
|
||||
properties:
|
||||
field_name:
|
||||
type: string
|
||||
description: The name of the field in question.
|
||||
condition:
|
||||
$ref: "#/components/schemas/FieldFilterCondition"
|
||||
values:
|
||||
type: array
|
||||
description: The values useful to the filter.
|
||||
items:
|
||||
type: string
|
||||
description: Filtering a column
|
||||
required:
|
||||
- field_name
|
||||
- condition
|
||||
- values
|
||||
|
||||
FieldFilterCondition:
|
||||
type: string
|
||||
enum:
|
||||
- less_than
|
||||
- greater_than
|
||||
- closed_interval
|
||||
- open_interval
|
||||
- left_closed_interval
|
||||
- right_closed_interval
|
||||
- include
|
||||
- exclude
|
||||
description: The possible field filtering conditions.
|
||||
|
||||
ExportStatus:
|
||||
type: string
|
||||
enum:
|
||||
- completed
|
||||
- in_progress
|
||||
- failed
|
||||
description: The possible export job states.
|
||||
|
||||
ExportDetails:
|
||||
type: object
|
||||
properties:
|
||||
job_id:
|
||||
type: string
|
||||
description: The job id relative to the export.
|
||||
status:
|
||||
$ref: '#/components/schemas/ExportStatus'
|
||||
output_location:
|
||||
type: string
|
||||
description: The location in which the export zip file will be found.
|
||||
example: s3://{bucket}/{clientid}/{jobid}/{timestamp}_{exportid}.zip
|
||||
description: Payload for export trigger response.
|
||||
required:
|
||||
- id
|
||||
- status
|
||||
|
||||
Reference in New Issue
Block a user