mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-15 18:40:40 +00:00
Add prototype
This commit is contained in:
225
vre_manager/swagger/vre_manager.yml
Normal file
225
vre_manager/swagger/vre_manager.yml
Normal file
@ -0,0 +1,225 @@
|
||||
swagger: "2.0"
|
||||
info:
|
||||
contact:
|
||||
email: "p.jentsch@uni-bielefeld.de"
|
||||
name: "Patrick Jentsch"
|
||||
title: "SFB 1288 | INF: Plattformname - ReST API"
|
||||
version: "1.0.0"
|
||||
consumes:
|
||||
- application/json
|
||||
produces:
|
||||
- application/json
|
||||
|
||||
|
||||
basePath: /vre
|
||||
|
||||
|
||||
definitions:
|
||||
# Enums
|
||||
Service:
|
||||
type: string
|
||||
enum: &SERVICES
|
||||
- ocr
|
||||
- nlp
|
||||
Status:
|
||||
type: string
|
||||
enum: &STATUSES
|
||||
- deleted
|
||||
- failed
|
||||
- finished
|
||||
- queued
|
||||
- running
|
||||
Job:
|
||||
type: object
|
||||
properties:
|
||||
file:
|
||||
type: string
|
||||
id:
|
||||
type: string
|
||||
language:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
report:
|
||||
type: string
|
||||
service:
|
||||
type: string
|
||||
enum: *SERVICES
|
||||
status:
|
||||
type: string
|
||||
enum: *STATUSES
|
||||
user:
|
||||
type: string
|
||||
Jobs:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/Job'
|
||||
|
||||
|
||||
paths:
|
||||
/jobs:
|
||||
get:
|
||||
operationId: request_handlers.jobs.get_jobs
|
||||
tags:
|
||||
- jobs
|
||||
summary: Get a list of all jobs matching the filter(s)
|
||||
description: Get a list of all jobs matching the filter(s)
|
||||
parameters:
|
||||
- name: name
|
||||
in: query
|
||||
type: string
|
||||
description: The name to filter for
|
||||
required: False
|
||||
- name: service
|
||||
in: query
|
||||
type: string
|
||||
enum: *SERVICES
|
||||
description: The service to filter for
|
||||
required: False
|
||||
- name: status
|
||||
in: query
|
||||
type: string
|
||||
description: The status to filter for
|
||||
required: False
|
||||
- name: user
|
||||
in: query
|
||||
type: string
|
||||
description: The user to filter for
|
||||
required: False
|
||||
responses:
|
||||
200:
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/Jobs'
|
||||
post:
|
||||
operationId: request_handlers.jobs.create_job
|
||||
tags:
|
||||
- jobs
|
||||
summary: Create a new job
|
||||
description: Create a new job
|
||||
consumes:
|
||||
- multipart/form-data
|
||||
parameters:
|
||||
- name: file
|
||||
in: formData
|
||||
type: file
|
||||
description: File
|
||||
required: True
|
||||
- name: language
|
||||
in: query
|
||||
description: Language
|
||||
type: string
|
||||
required: True
|
||||
- name: name
|
||||
in: query
|
||||
description: Name
|
||||
type: string
|
||||
required: True
|
||||
- name: service
|
||||
in: query
|
||||
description: Service
|
||||
type: string
|
||||
enum: *SERVICES
|
||||
required: True
|
||||
- name: user
|
||||
in: query
|
||||
description: User
|
||||
type: string
|
||||
required: True
|
||||
responses:
|
||||
201:
|
||||
description: Created
|
||||
schema:
|
||||
$ref: '#/definitions/Job'
|
||||
415:
|
||||
description: Unsupported Media Type
|
||||
/jobs/{id}:
|
||||
delete:
|
||||
operationId: request_handlers.jobs.delete_job
|
||||
tags:
|
||||
- jobs
|
||||
summary: Delete job (specified by {job_id})
|
||||
description: Delete job (specified by {job_id})
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
description: Job identifier
|
||||
type: string
|
||||
required: True
|
||||
responses:
|
||||
204:
|
||||
description: No Content
|
||||
404:
|
||||
description: Not Found
|
||||
423:
|
||||
description: Locked
|
||||
get:
|
||||
operationId: request_handlers.jobs.get_job
|
||||
tags:
|
||||
- jobs
|
||||
summary: Get job (specified by {job_id})
|
||||
description: Get job (specified by {job_id})
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
description: Job identifier
|
||||
type: string
|
||||
required: True
|
||||
responses:
|
||||
200:
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/Job'
|
||||
404:
|
||||
description: Not Found
|
||||
put:
|
||||
operationId: request_handlers.jobs.update_job
|
||||
tags:
|
||||
- jobs
|
||||
summary: Update job (specified by {job_id})
|
||||
description: Update job (specified by {job_id})
|
||||
consumes:
|
||||
- multipart/form-data
|
||||
parameters:
|
||||
- name: file
|
||||
in: formData
|
||||
type: file
|
||||
description: File
|
||||
required: False
|
||||
- name: id
|
||||
in: path
|
||||
description: Job identifier
|
||||
type: string
|
||||
required: True
|
||||
- name: language
|
||||
in: query
|
||||
description: Language
|
||||
type: string
|
||||
required: False
|
||||
- name: name
|
||||
in: query
|
||||
description: Name
|
||||
type: string
|
||||
required: False
|
||||
- name: report
|
||||
in: query
|
||||
description: Report
|
||||
type: string
|
||||
required: False
|
||||
- name: status
|
||||
in: query
|
||||
description: Status
|
||||
type: string
|
||||
enum: *STATUSES
|
||||
required: False
|
||||
responses:
|
||||
200:
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/Job'
|
||||
404:
|
||||
description: Not Found
|
||||
415:
|
||||
description: Unsupported Media Type
|
||||
423:
|
||||
description: Locked
|
Reference in New Issue
Block a user