diff --git a/arkindex/schema.yml b/arkindex/schema.yml index 0da06c3a1ef435e49ab3bb9bd77956d87489fb2c..8ae2a000ad4876e19e8e1ccad72c90933f242e98 100644 --- a/arkindex/schema.yml +++ b/arkindex/schema.yml @@ -121,6 +121,43 @@ paths: description: '' tags: - ml + /api/v1/classifications/selection/: + post: + description: Create multiple classifications at once for a list of selected + elements for a specific corpus. + operationId: CreateClassificationsSelection + parameters: [] + requestBody: + content: + application/json: + schema: + properties: + corpus_id: + format: uuid + type: string + ml_class: + type: string + required: + - ml_class + - corpus_id + x-name: body + responses: + '200': + content: + application/json: + schema: + properties: + corpus_id: + format: uuid + type: string + ml_class: + type: string + required: + - ml_class + - corpus_id + description: '' + tags: + - ml /api/v1/classifications/{id}/reject/: put: description: Reject an existing classification. @@ -3435,7 +3472,19 @@ paths: delete: description: Remove a specific element or delete any selection operationId: RemoveSelection - parameters: [] + parameters: + - 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 requestBody: content: application/json: @@ -3448,6 +3497,7 @@ paths: responses: '204': description: '' + security: &id001 [] tags: - elements get: @@ -3466,6 +3516,25 @@ paths: 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 + - description: List best classifications for each element. If not set, elements + best_classes field will always be null + in: query + name: best_classes + required: false + schema: + type: boolean responses: '200': content: @@ -3487,6 +3556,71 @@ paths: results: items: properties: + best_classes: + items: + properties: + best: + readOnly: true + type: boolean + confidence: + readOnly: true + type: number + id: + format: uuid + readOnly: true + type: string + ml_class: + properties: + id: + format: uuid + type: string + name: + maxLength: 100 + type: string + required: + - name + type: object + source: + properties: + id: + format: uuid + type: string + internal: + type: boolean + name: + maxLength: 100 + type: string + revision: + maxLength: 100 + type: string + slug: + maxLength: 100 + type: string + type: + enum: + - classifier + - recognizer + - ner + - dla + - word-segmenter + required: + - type + - slug + - name + - revision + - internal + type: object + state: + enum: + - pending + - validated + - rejected + required: + - source + - ml_class + - state + readOnly: true + type: array corpus: properties: id: @@ -3573,6 +3707,7 @@ paths: type: array type: object description: '' + security: *id001 tags: - elements post: @@ -3596,6 +3731,71 @@ paths: application/json: schema: properties: + best_classes: + items: + properties: + best: + readOnly: true + type: boolean + confidence: + readOnly: true + type: number + id: + format: uuid + readOnly: true + type: string + ml_class: + properties: + id: + format: uuid + type: string + name: + maxLength: 100 + type: string + required: + - name + type: object + source: + properties: + id: + format: uuid + type: string + internal: + type: boolean + name: + maxLength: 100 + type: string + revision: + maxLength: 100 + type: string + slug: + maxLength: 100 + type: string + type: + enum: + - classifier + - recognizer + - ner + - dla + - word-segmenter + required: + - type + - slug + - name + - revision + - internal + type: object + state: + enum: + - pending + - validated + - rejected + required: + - source + - ml_class + - state + readOnly: true + type: array corpus: properties: id: @@ -3680,6 +3880,7 @@ paths: - type - name description: '' + security: *id001 tags: - elements /api/v1/elements/{id}/: @@ -10117,7 +10318,7 @@ paths: - analyser - regions description: '' - tags: &id001 + tags: &id002 - ml put: description: Add new regions from a machine learning tool; if this tool already @@ -10189,7 +10390,7 @@ paths: - analyser - regions description: '' - tags: *id001 + tags: *id002 /api/v1/region/{id}/: get: description: Retrieve detailed information about a region @@ -10450,7 +10651,7 @@ paths: - recognizer - transcriptions x-name: body - responses: &id002 + responses: &id003 '201': description: All transcriptions have been created. tags: @@ -10500,7 +10701,7 @@ paths: - recognizer - transcriptions x-name: body - responses: *id002 + responses: *id003 tags: - ml /api/v1/transcription/{id}/entities/: