Skip to content
Snippets Groups Projects
Commit 522e5dfc authored by Erwan Rouchet's avatar Erwan Rouchet Committed by Bastien Abadie
Browse files

Update OpenAPI schema

parent 9b411b87
No related branches found
No related tags found
No related merge requests found
Pipeline #28179 passed
......@@ -13,7 +13,7 @@ info:
name: Teklia
url: https://www.teklia.com/
title: Arkindex API
version: 0.9.5
version: 0.9.6-dev
openapi: 3.0.2
paths:
/api/v1/act/{id}/:
......@@ -100,6 +100,12 @@ paths:
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
responses:
'200':
content:
......@@ -219,12 +225,12 @@ paths:
classifications:
items:
properties:
class_name:
type: string
confidence:
type: number
ml_class:
type: string
required:
- class_name
- ml_class
- confidence
type: array
classifier:
......@@ -245,12 +251,12 @@ paths:
classifications:
items:
properties:
class_name:
type: string
confidence:
type: number
ml_class:
type: string
required:
- class_name
- ml_class
- confidence
type: array
classifier:
......@@ -263,6 +269,256 @@ paths:
- classifications
tags:
- ml
/api/v1/classifications/:
post:
operationId: CreateClassification
parameters: []
requestBody:
content:
application/json:
schema:
properties:
ml_class:
type: string
page:
type: string
required:
- page
- ml_class
x-name: body
responses:
'200':
content:
application/json:
schema:
properties:
ml_class:
type: string
page:
type: string
required:
- page
- ml_class
/api/v1/classifications/{id}/reject/:
put:
operationId: RejectClassification
parameters:
- description: ''
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
properties:
confidence:
nullable: true
type: number
id:
type: string
ml_class:
properties:
id:
type: string
name:
type: string
required:
- name
type: object
source:
properties:
id:
type: string
internal:
type: boolean
revision:
type: string
slug:
type: string
type:
enum:
- classifier
- recognizer
- ner
required:
- type
- slug
- revision
- internal
type: object
state:
enum:
- pending
- validated
- rejected
required:
- source
- ml_class
- state
x-name: body
responses:
'200':
content:
application/json:
schema:
properties:
confidence:
nullable: true
type: number
id:
type: string
ml_class:
properties:
id:
type: string
name:
type: string
required:
- name
type: object
source:
properties:
id:
type: string
internal:
type: boolean
revision:
type: string
slug:
type: string
type:
enum:
- classifier
- recognizer
- ner
required:
- type
- slug
- revision
- internal
type: object
state:
enum:
- pending
- validated
- rejected
required:
- source
- ml_class
- state
/api/v1/classifications/{id}/validate/:
put:
operationId: ValidateClassification
parameters:
- description: ''
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
properties:
confidence:
nullable: true
type: number
id:
type: string
ml_class:
properties:
id:
type: string
name:
type: string
required:
- name
type: object
source:
properties:
id:
type: string
internal:
type: boolean
revision:
type: string
slug:
type: string
type:
enum:
- classifier
- recognizer
- ner
required:
- type
- slug
- revision
- internal
type: object
state:
enum:
- pending
- validated
- rejected
required:
- source
- ml_class
- state
x-name: body
responses:
'200':
content:
application/json:
schema:
properties:
confidence:
nullable: true
type: number
id:
type: string
ml_class:
properties:
id:
type: string
name:
type: string
required:
- name
type: object
source:
properties:
id:
type: string
internal:
type: boolean
revision:
type: string
slug:
type: string
type:
enum:
- classifier
- recognizer
- ner
required:
- type
- slug
- revision
- internal
type: object
state:
enum:
- pending
- validated
- rejected
required:
- source
- ml_class
- state
/api/v1/corpus/:
get:
description: List corpora with their access rights
......@@ -490,6 +746,28 @@ paths:
- name
tags:
- corpora
/api/v1/corpus/{id}/classes/:
get:
operationId: ListCorpusMLClass
parameters:
- description: ''
in: path
name: id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
properties:
id:
type: string
name:
type: string
required:
- name
/api/v1/corpus/{id}/pages/:
get:
description: List all pages in all volumes of a corpus
......@@ -507,20 +785,47 @@ paths:
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
- description: Class
in: query
name: ml_class
required: false
schema:
type: string
- description: ml_class_unvalidated
in: query
name: ml_class_unvalidated
required: false
schema:
type: string
responses:
'200':
content:
application/json:
schema:
properties:
best_classes:
classifications:
items:
properties:
class_name:
type: string
confidence:
nullable: true
type: number
id:
type: string
ml_class:
properties:
id:
type: string
name:
type: string
required:
- name
type: object
source:
properties:
id:
......@@ -542,9 +847,15 @@ paths:
- revision
- internal
type: object
state:
enum:
- pending
- validated
- rejected
required:
- source
- class_name
- ml_class
- state
type: array
direction:
enum:
......@@ -599,7 +910,7 @@ paths:
- page_type
- direction
- image
- best_classes
- classifications
security: []
tags:
- elements
......@@ -620,6 +931,12 @@ paths:
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
responses:
'200':
content:
......@@ -1358,6 +1675,12 @@ paths:
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
responses:
'200':
content:
......@@ -1516,6 +1839,12 @@ paths:
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
responses:
'200':
content:
......@@ -1636,6 +1965,12 @@ paths:
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
responses:
'200':
content:
......@@ -1691,21 +2026,36 @@ paths:
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
best_classes:
classifications:
items:
properties:
class_name:
type: string
confidence:
nullable: true
type: number
source:
id:
type: string
ml_class:
properties:
id:
type: string
name:
type: string
required:
- name
type: object
source:
properties:
id:
type: string
......@@ -1726,9 +2076,15 @@ paths:
- revision
- internal
type: object
state:
enum:
- pending
- validated
- rejected
required:
- source
- class_name
- ml_class
- state
type: array
direction:
enum:
......@@ -1783,7 +2139,7 @@ paths:
- page_type
- direction
- image
- best_classes
- classifications
security: []
tags:
- elements
......@@ -1804,6 +2160,12 @@ paths:
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
responses:
'200':
content:
......@@ -2099,6 +2461,12 @@ paths:
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
responses:
'200':
content:
......@@ -2338,6 +2706,12 @@ paths:
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
responses:
'200':
content:
......@@ -2729,6 +3103,12 @@ paths:
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
responses:
'200':
content:
......@@ -3333,6 +3713,12 @@ paths:
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
responses:
'200':
content:
......@@ -3576,6 +3962,12 @@ paths:
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
responses:
'200':
content:
......@@ -3989,6 +4381,12 @@ paths:
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
responses:
'200':
content:
......@@ -4266,6 +4664,34 @@ paths:
security: []
tags:
- iiif
/api/v1/ml-classes/:
get:
operationId: ListMLClass
parameters:
- description: A page number within the paginated result set.
in: query
name: page
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
id:
type: string
name:
type: string
required:
- name
/api/v1/oauth/credentials/:
get:
description: List all OAuth credentials for the authenticated user
......@@ -4277,6 +4703,12 @@ paths:
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
responses:
'200':
content:
......@@ -4472,11 +4904,20 @@ paths:
classifications:
items:
properties:
class_name:
type: string
confidence:
nullable: true
type: number
id:
type: string
ml_class:
properties:
id:
type: string
name:
type: string
required:
- name
type: object
source:
properties:
id:
......@@ -4498,9 +4939,15 @@ paths:
- revision
- internal
type: object
state:
enum:
- pending
- validated
- rejected
required:
- source
- class_name
- ml_class
- state
type: array
corpus:
properties:
......@@ -4678,6 +5125,12 @@ paths:
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
responses:
'200':
content:
......@@ -4806,11 +5259,20 @@ paths:
classifications:
items:
properties:
class_name:
type: string
confidence:
nullable: true
type: number
id:
type: string
ml_class:
properties:
id:
type: string
name:
type: string
required:
- name
type: object
source:
properties:
id:
......@@ -4832,9 +5294,15 @@ paths:
- revision
- internal
type: object
state:
enum:
- pending
- validated
- rejected
required:
- source
- class_name
- ml_class
- state
type: array
corpus:
properties:
......@@ -5237,6 +5705,12 @@ paths:
required: false
schema:
type: integer
- description: Number of results to return per page.
in: query
name: page_size
required: false
schema:
type: integer
responses:
'200':
content:
......@@ -5560,6 +6034,88 @@ paths:
security: []
tags:
- users
/ponos/v1/agent/:
post:
operationId: CreateAgent
parameters: []
requestBody:
content:
application/json:
schema:
properties:
cpu_cores:
type: integer
cpu_frequency:
type: integer
gpu_count:
type: integer
gpu_names:
type: string
hostname:
type: string
token:
type: string
required:
- token
- hostname
- cpu_cores
- cpu_frequency
- gpu_names
- gpu_count
x-name: body
responses:
'200':
content:
application/json:
schema:
properties:
cpu_cores:
type: integer
cpu_frequency:
type: integer
gpu_count:
type: integer
gpu_names:
type: string
hostname:
type: string
id:
readOnly: true
type: string
token:
type: string
required:
- token
- hostname
- cpu_cores
- cpu_frequency
- gpu_names
- gpu_count
/ponos/v1/agent/actions/:
get:
operationId: RetrieveAgentActions
parameters: []
responses:
'200':
content:
application/json:
schema:
properties:
actions:
items:
properties:
action:
enum:
- start_task
- kill
task_id:
readOnly: true
type: string
required:
- action
type: array
required:
- actions
/ponos/v1/task/{id}/:
get:
description: Retrieve a Ponos task status
......@@ -5578,20 +6134,23 @@ paths:
schema:
properties:
depth:
readOnly: true
type: integer
full_log:
readOnly: true
type: string
id:
readOnly: true
type: string
logs:
type: string
parent:
nullable: true
readOnly: true
type: string
run:
readOnly: true
type: integer
slug:
readOnly: true
type: string
state:
enum:
......@@ -5605,18 +6164,153 @@ paths:
readOnly: true
type: string
required:
- run
- depth
- slug
- state
- logs
- full_log
security: []
tags:
- ponos
/ponos/v1/task/{id}/log/:
patch:
operationId: PartialUpdateTask
parameters:
- description: A UUID string identifying this task.
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
properties:
full_log:
type: string
logs:
type: string
state:
enum:
- unscheduled
- pending
- running
- completed
- failed
- error
x-name: body
responses:
'200':
content:
application/json:
schema:
properties:
depth:
readOnly: true
type: integer
full_log:
type: string
id:
readOnly: true
type: string
logs:
type: string
parent:
readOnly: true
type: string
run:
readOnly: true
type: integer
slug:
readOnly: true
type: string
state:
enum:
- unscheduled
- pending
- running
- completed
- failed
- error
url:
readOnly: true
type: string
required:
- state
- logs
- full_log
put:
operationId: UpdateTask
parameters:
- description: A UUID string identifying this task.
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
properties:
full_log:
type: string
logs:
type: string
state:
enum:
- unscheduled
- pending
- running
- completed
- failed
- error
required:
- state
- logs
- full_log
x-name: body
responses:
'200':
content:
application/json:
schema:
properties:
depth:
readOnly: true
type: integer
full_log:
type: string
id:
readOnly: true
type: string
logs:
type: string
parent:
readOnly: true
type: string
run:
readOnly: true
type: integer
slug:
readOnly: true
type: string
state:
enum:
- unscheduled
- pending
- running
- completed
- failed
- error
url:
readOnly: true
type: string
required:
- state
- logs
- full_log
/ponos/v1/task/{id}/artifacts/:
get:
description: Retrieve the full task log as plain text
operationId: RetrieveTaskLog
operationId: ListTaskArtifacts
parameters:
- description: ''
in: path
......@@ -5628,7 +6322,60 @@ paths:
'200':
content:
application/json:
schema: {}
schema:
properties:
s3_url:
type: string
slug:
readOnly: true
type: string
task_id:
type: string
required:
- task_id
- s3_url
/ponos/v1/task/{id}/definition/:
get:
operationId: RetrieveTask
parameters:
- description: A UUID string identifying this task.
in: path
name: id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
properties:
command:
type: string
env:
type: object
id:
readOnly: true
type: string
image:
type: string
s3_artifacts_put_url:
readOnly: true
type: string
s3_logs_put_url:
readOnly: true
type: string
slug:
readOnly: true
type: string
required:
- image
- command
- env
/ponos/v1/task/{id}/log/:
get:
description: Retrieve the full task log as plain text
operationId: RetrieveTaskLog
security: []
tags:
- ponos
......@@ -5667,15 +6414,19 @@ paths:
items:
properties:
depth:
readOnly: true
type: integer
id:
readOnly: true
type: string
parent:
nullable: true
readOnly: true
type: string
run:
readOnly: true
type: integer
slug:
readOnly: true
type: string
state:
enum:
......@@ -5689,9 +6440,6 @@ paths:
readOnly: true
type: string
required:
- run
- depth
- slug
- state
type: array
required:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment