Merged in feature/jobcrud (pull request #35)
Job CRUD + Collector Integration * startedcreate * openapispec * createjobintegration * jobgetcontroller * jobcreateclient * updatejob * job * collector
This commit is contained in:
+163
-61
@@ -10,6 +10,8 @@ servers:
|
||||
tags:
|
||||
- name: ClientService
|
||||
description: Operations related to clients
|
||||
- name: JobService
|
||||
description: Operations related to jobs
|
||||
- name: JobCollectorService
|
||||
description: Operations related to job collectors
|
||||
- name: QueryService
|
||||
@@ -18,7 +20,7 @@ tags:
|
||||
description: Operations related to exports
|
||||
|
||||
paths:
|
||||
/clients:
|
||||
/client:
|
||||
post:
|
||||
operationId: createClient
|
||||
tags:
|
||||
@@ -41,20 +43,21 @@ paths:
|
||||
'400':
|
||||
description: Invalid request body.
|
||||
|
||||
/clients/{id}:
|
||||
/client/{id}:
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The ID of the client to retrieve.
|
||||
get:
|
||||
operationId: getClient
|
||||
tags:
|
||||
- ClientService
|
||||
summary: Get a client by ID
|
||||
description: Retrieves a specific client by its ID.
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: The ID of the client to retrieve.
|
||||
responses:
|
||||
'200':
|
||||
description: Client details.
|
||||
@@ -72,13 +75,6 @@ paths:
|
||||
- ClientService
|
||||
summary: Update a client
|
||||
description: Updates an existing client with new details.
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: The ID of the client to update.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
@@ -93,7 +89,7 @@ paths:
|
||||
'404':
|
||||
description: Client not found
|
||||
|
||||
/queries:
|
||||
/query:
|
||||
get:
|
||||
operationId: listQueries
|
||||
tags:
|
||||
@@ -133,20 +129,21 @@ paths:
|
||||
'400':
|
||||
description: Invalid request body.
|
||||
|
||||
/queries/{id}:
|
||||
/query/{id}:
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The ID of the query.
|
||||
get:
|
||||
operationId: getQuery
|
||||
tags:
|
||||
- QueryService
|
||||
summary: Get a query by ID
|
||||
description: Retrieves a specific query by its ID.
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: The ID of the query to retrieve.
|
||||
responses:
|
||||
'200':
|
||||
description: Query details.
|
||||
@@ -164,13 +161,6 @@ paths:
|
||||
- QueryService
|
||||
summary: Update a query
|
||||
description: Updates an existing query with new details.
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: The ID of the query to update.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
@@ -185,20 +175,21 @@ paths:
|
||||
'404':
|
||||
description: Query not found.
|
||||
|
||||
/queries/{id}/test:
|
||||
/query/{id}/test:
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The ID of the query.
|
||||
post:
|
||||
operationId: testQuery
|
||||
tags:
|
||||
- QueryService
|
||||
summary: Test a query
|
||||
description: Executes a test run of a query with the provided parameters.
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: The ID of the query to test.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
@@ -214,21 +205,91 @@ paths:
|
||||
$ref: '#/components/schemas/QueryTestResponse'
|
||||
'400':
|
||||
description: Invalid request body.
|
||||
|
||||
/job:
|
||||
post:
|
||||
operationId: createJob
|
||||
tags:
|
||||
- JobService
|
||||
summary: Create a new job
|
||||
description: Creates a new job with the provided details.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/JobCreate'
|
||||
responses:
|
||||
'201':
|
||||
description: Job created successfully.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/IdMessage'
|
||||
'400':
|
||||
description: Invalid request body.
|
||||
|
||||
/job/{id}:
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The job ID.
|
||||
get:
|
||||
operationId: getJob
|
||||
tags:
|
||||
- JobService
|
||||
summary: Get a job by ID
|
||||
description: Retrieves a specific job by its ID.
|
||||
responses:
|
||||
'200':
|
||||
description: Job details.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Job'
|
||||
'400':
|
||||
description: Invalid request parameters.
|
||||
'404':
|
||||
description: Job not found.
|
||||
patch:
|
||||
operationId: updateJob
|
||||
tags:
|
||||
- JobService
|
||||
summary: Update a job
|
||||
description: Updates an existing job with new details.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/JobUpdate'
|
||||
responses:
|
||||
'204':
|
||||
description: Job updated successfully.
|
||||
'400':
|
||||
description: Invalid request body.
|
||||
'404':
|
||||
description: Job not found.
|
||||
|
||||
/job/{id}/collector:
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The job ID for the collector.
|
||||
get:
|
||||
operationId: getJobCollectorByJobId
|
||||
tags:
|
||||
- JobCollectorService
|
||||
summary: Get a job collector by ID
|
||||
description: Retrieves a specific job collector by its ID.
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: The job ID for the collector.
|
||||
responses:
|
||||
'200':
|
||||
description: Job collector details.
|
||||
@@ -244,13 +305,6 @@ paths:
|
||||
- JobCollectorService
|
||||
summary: Update a job collector
|
||||
description: Updates an existing job collector with new details.
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: The ID of the job collector to update.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
@@ -291,19 +345,20 @@ paths:
|
||||
description: Job not found.
|
||||
|
||||
/job/export/{id}:
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The ID of the export.
|
||||
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.
|
||||
@@ -329,6 +384,7 @@ components:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Unique identifier for the query.
|
||||
type:
|
||||
$ref: '#/components/schemas/QueryType'
|
||||
@@ -348,6 +404,7 @@ components:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
format: uuid
|
||||
description: List of required query IDs.
|
||||
required:
|
||||
- id
|
||||
@@ -379,6 +436,7 @@ components:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
format: uuid
|
||||
description: List of required query IDs.
|
||||
required:
|
||||
- type
|
||||
@@ -397,6 +455,7 @@ components:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Updated list of required query IDs.
|
||||
|
||||
QueryTestRequest:
|
||||
@@ -404,6 +463,7 @@ components:
|
||||
properties:
|
||||
document_id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: ID of the document to test against.
|
||||
query_version:
|
||||
type: integer
|
||||
@@ -427,6 +487,7 @@ components:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The client id
|
||||
name:
|
||||
type: string
|
||||
@@ -439,6 +500,42 @@ components:
|
||||
- name
|
||||
- can_sync
|
||||
|
||||
Job:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The job id
|
||||
client_id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The client id the job belongs to
|
||||
can_sync:
|
||||
type: boolean
|
||||
description: Specifies whether the job is actively syncing
|
||||
required:
|
||||
- id
|
||||
- client_id
|
||||
- can_sync
|
||||
|
||||
JobCreate:
|
||||
type: object
|
||||
properties:
|
||||
client_id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The client id the job belongs to
|
||||
required:
|
||||
- client_id
|
||||
|
||||
JobUpdate:
|
||||
type: object
|
||||
properties:
|
||||
can_sync:
|
||||
type: boolean
|
||||
description: Specifies whether the job is actively syncing
|
||||
|
||||
ClientCreate:
|
||||
type: object
|
||||
properties:
|
||||
@@ -463,6 +560,7 @@ components:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Unique identifier for entity.
|
||||
required:
|
||||
- id
|
||||
@@ -472,6 +570,7 @@ components:
|
||||
properties:
|
||||
job_id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The ID of the associated job.
|
||||
active_version:
|
||||
type: integer
|
||||
@@ -535,6 +634,7 @@ components:
|
||||
description: The output field name.
|
||||
query_id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The query id that will populate the result.
|
||||
required:
|
||||
- name
|
||||
@@ -545,6 +645,7 @@ components:
|
||||
properties:
|
||||
job_id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The job id of the query results to be exported.
|
||||
ingestion_filters:
|
||||
type: object
|
||||
@@ -610,6 +711,7 @@ components:
|
||||
properties:
|
||||
job_id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The job id relative to the export.
|
||||
status:
|
||||
$ref: '#/components/schemas/ExportStatus'
|
||||
|
||||
Reference in New Issue
Block a user