2019-07-17 20:03:10 +00:00
|
|
|
openapi: 3.0.0
|
|
|
|
|
|
|
|
info:
|
|
|
|
title: Docspell JOEX
|
2021-01-11 22:27:47 +00:00
|
|
|
version: 0.19.0-SNAPSHOT
|
2019-07-17 20:03:10 +00:00
|
|
|
|
|
|
|
servers:
|
|
|
|
- url: /api/v1
|
|
|
|
description: Current host
|
|
|
|
|
|
|
|
paths:
|
2021-01-15 17:04:02 +00:00
|
|
|
/api/info/version:
|
2019-07-22 22:53:30 +00:00
|
|
|
get:
|
2020-06-25 06:43:02 +00:00
|
|
|
tags: [ Api Info ]
|
2019-07-22 22:53:30 +00:00
|
|
|
summary: Get basic information about this software.
|
|
|
|
description: |
|
|
|
|
Returns the version and project name and other properties of the build.
|
|
|
|
responses:
|
|
|
|
200:
|
2020-06-25 06:43:02 +00:00
|
|
|
description: Ok
|
2019-07-22 22:53:30 +00:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: "#/components/schemas/VersionInfo"
|
|
|
|
/api/v1/notify:
|
|
|
|
post:
|
2020-06-25 06:43:02 +00:00
|
|
|
tags: [ Job Executor ]
|
2019-07-22 22:53:30 +00:00
|
|
|
summary: Notify the job executor.
|
|
|
|
description: |
|
|
|
|
Notifies the job executor to wake up and look for jobs in th queue.
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Ok
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: "#/components/schemas/BasicResult"
|
|
|
|
/api/v1/running:
|
|
|
|
get:
|
2020-06-25 06:43:02 +00:00
|
|
|
tags: [ Job Executor ]
|
2019-07-22 22:53:30 +00:00
|
|
|
summary: Get a list of currently executing jobs.
|
|
|
|
description: |
|
|
|
|
Returns all jobs this executor is currently executing.
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Ok
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: "#/components/schemas/JobList"
|
|
|
|
/api/v1/shutdownAndExit:
|
|
|
|
post:
|
2020-06-25 06:43:02 +00:00
|
|
|
tags: [ Job Executor ]
|
2019-07-22 22:53:30 +00:00
|
|
|
summary: Stops this component and exits.
|
|
|
|
description: |
|
|
|
|
Gracefully stops the scheduler and also stops the process.
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Ok
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: "#/components/schemas/BasicResult"
|
|
|
|
/api/v1/job/{id}:
|
|
|
|
get:
|
2020-06-25 06:43:02 +00:00
|
|
|
tags: [ Current Jobs ]
|
2019-07-22 22:53:30 +00:00
|
|
|
summary: Get a job by its id.
|
|
|
|
description: |
|
|
|
|
Returns details about a job given the id.
|
2020-06-25 06:43:02 +00:00
|
|
|
parameters:
|
|
|
|
- $ref: "#/components/parameters/id"
|
2019-07-22 22:53:30 +00:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Ok
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2020-06-25 06:43:02 +00:00
|
|
|
$ref: "#/components/schemas/JobAndLog"
|
2019-07-22 22:53:30 +00:00
|
|
|
/api/v1/job/{id}/cancel:
|
|
|
|
post:
|
2020-06-25 06:43:02 +00:00
|
|
|
tags: [ Current Jobs ]
|
2019-07-22 22:53:30 +00:00
|
|
|
summary: Request to cancel a running job.
|
|
|
|
description: |
|
|
|
|
Requests to cancel the running job. This will try to cancel
|
|
|
|
the execution but it is not guaranteed that it can immediately
|
|
|
|
abort. The job is then removed from the queue.
|
2020-06-25 06:43:02 +00:00
|
|
|
parameters:
|
|
|
|
- $ref: "#/components/parameters/id"
|
2019-07-22 22:53:30 +00:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Ok
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: "#/components/schemas/BasicResult"
|
2019-07-17 20:03:10 +00:00
|
|
|
|
|
|
|
components:
|
|
|
|
schemas:
|
2019-07-22 22:53:30 +00:00
|
|
|
JobAndLog:
|
|
|
|
description: |
|
|
|
|
Some more details about the job.
|
|
|
|
required:
|
|
|
|
- job
|
|
|
|
- logs
|
|
|
|
properties:
|
|
|
|
job:
|
|
|
|
$ref: "#/components/schemas/Job"
|
|
|
|
logs:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: "#/components/schemas/JobLogEvent"
|
|
|
|
JobLogEvent:
|
|
|
|
description: |
|
|
|
|
A log output line.
|
|
|
|
required:
|
|
|
|
- time
|
|
|
|
- level
|
|
|
|
- message
|
|
|
|
properties:
|
|
|
|
time:
|
|
|
|
description: DateTime
|
|
|
|
type: integer
|
|
|
|
format: date-time
|
|
|
|
level:
|
|
|
|
type: string
|
|
|
|
format: loglevel
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
JobList:
|
|
|
|
description: |
|
|
|
|
A list of jobs.
|
|
|
|
required:
|
|
|
|
- items
|
|
|
|
properties:
|
|
|
|
items:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: "#/components/schemas/Job"
|
|
|
|
Job:
|
|
|
|
description: |
|
|
|
|
Data about a running job.
|
|
|
|
required:
|
|
|
|
- id
|
|
|
|
- name
|
|
|
|
- submitted
|
|
|
|
- priority
|
|
|
|
- retries
|
|
|
|
- progress
|
|
|
|
- started
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: string
|
|
|
|
format: ident
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
submitted:
|
|
|
|
description: DateTime
|
|
|
|
type: integer
|
|
|
|
format: date-time
|
|
|
|
priority:
|
|
|
|
type: integer
|
|
|
|
format: priority
|
|
|
|
retries:
|
|
|
|
type: integer
|
|
|
|
format: int32
|
|
|
|
progress:
|
|
|
|
type: integer
|
|
|
|
format: int32
|
|
|
|
started:
|
|
|
|
description: DateTime
|
|
|
|
type: integer
|
|
|
|
format: date-time
|
2019-07-17 20:03:10 +00:00
|
|
|
VersionInfo:
|
|
|
|
description: |
|
|
|
|
Information about the software.
|
|
|
|
required:
|
|
|
|
- version
|
|
|
|
- builtAtMillis
|
|
|
|
- builtAtString
|
|
|
|
- gitCommit
|
|
|
|
- gitVersion
|
|
|
|
properties:
|
|
|
|
version:
|
|
|
|
type: string
|
|
|
|
builtAtMillis:
|
|
|
|
type: integer
|
|
|
|
format: int64
|
|
|
|
builtAtString:
|
|
|
|
type: string
|
|
|
|
gitCommit:
|
|
|
|
type: string
|
|
|
|
gitVersion:
|
|
|
|
type: string
|
2019-07-22 22:53:30 +00:00
|
|
|
BasicResult:
|
|
|
|
description: |
|
|
|
|
Some basic result of an operation.
|
|
|
|
required:
|
|
|
|
- success
|
|
|
|
- message
|
|
|
|
properties:
|
|
|
|
success:
|
|
|
|
type: boolean
|
|
|
|
message:
|
|
|
|
type: string
|
2020-06-25 06:43:02 +00:00
|
|
|
parameters:
|
|
|
|
id:
|
|
|
|
name: id
|
|
|
|
in: path
|
|
|
|
description: An identifier
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|