From 0d3631c246618b4a58f067d056684b968f64ee43 Mon Sep 17 00:00:00 2001
From: manon blanco <blanco@teklia.com>
Date: Fri, 15 Nov 2019 15:12:47 +0000
Subject: [PATCH] add new endpoint to select element

---
 arkindex/schema.yml | 251 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 251 insertions(+)

diff --git a/arkindex/schema.yml b/arkindex/schema.yml
index 2285928..0da06c3 100644
--- a/arkindex/schema.yml
+++ b/arkindex/schema.yml
@@ -3431,6 +3431,257 @@ paths:
       security: []
       tags:
       - search
+  /api/v1/elements/selection/:
+    delete:
+      description: Remove a specific element or delete any selection
+      operationId: RemoveSelection
+      parameters: []
+      requestBody:
+        content:
+          application/json:
+            schema:
+              properties:
+                id:
+                  format: uuid
+                  type: string
+        x-name: body
+      responses:
+        '204':
+          description: ''
+      tags:
+      - elements
+    get:
+      description: List all elements selected
+      operationId: ListSelection
+      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:
+                  count:
+                    example: 123
+                    type: integer
+                  next:
+                    nullable: true
+                    type: string
+                  number:
+                    example: 123
+                    type: integer
+                  previous:
+                    nullable: true
+                    type: string
+                  results:
+                    items:
+                      properties:
+                        corpus:
+                          properties:
+                            id:
+                              format: uuid
+                              type: string
+                            name:
+                              maxLength: 250
+                              type: string
+                            public:
+                              type: boolean
+                          readOnly: true
+                          required:
+                          - name
+                          type: object
+                        id:
+                          format: uuid
+                          readOnly: true
+                          type: string
+                        name:
+                          maxLength: 250
+                          type: string
+                        thumbnail_put_url:
+                          readOnly: true
+                          type: string
+                        thumbnail_url:
+                          readOnly: true
+                          type: string
+                        type:
+                          type: string
+                        zone:
+                          properties:
+                            center:
+                              items:
+                                type: integer
+                              type: array
+                            id:
+                              format: uuid
+                              type: string
+                            image:
+                              properties:
+                                height:
+                                  readOnly: true
+                                  type: integer
+                                id:
+                                  format: uuid
+                                  readOnly: true
+                                  type: string
+                                path:
+                                  readOnly: true
+                                  type: string
+                                s3_url:
+                                  readOnly: true
+                                  type: string
+                                status:
+                                  enum:
+                                  - checked
+                                  - unchecked
+                                  - error
+                                url:
+                                  readOnly: true
+                                  type: string
+                                width:
+                                  readOnly: true
+                                  type: integer
+                              required:
+                              - status
+                              type: object
+                            polygon:
+                              items:
+                                type: array
+                              type: array
+                            url:
+                              readOnly: true
+                              type: string
+                          readOnly: true
+                          required:
+                          - polygon
+                          - center
+                          - image
+                          type: object
+                      required:
+                      - type
+                      - name
+                    type: array
+                type: object
+          description: ''
+      tags:
+      - elements
+    post:
+      description: Add a specific element
+      operationId: AddSelection
+      parameters: []
+      requestBody:
+        content:
+          application/json:
+            schema:
+              properties:
+                id:
+                  format: uuid
+                  type: string
+              required:
+              - id
+        x-name: body
+      responses:
+        '200':
+          content:
+            application/json:
+              schema:
+                properties:
+                  corpus:
+                    properties:
+                      id:
+                        format: uuid
+                        type: string
+                      name:
+                        maxLength: 250
+                        type: string
+                      public:
+                        type: boolean
+                    readOnly: true
+                    required:
+                    - name
+                    type: object
+                  id:
+                    format: uuid
+                    readOnly: true
+                    type: string
+                  name:
+                    maxLength: 250
+                    type: string
+                  thumbnail_put_url:
+                    readOnly: true
+                    type: string
+                  thumbnail_url:
+                    readOnly: true
+                    type: string
+                  type:
+                    type: string
+                  zone:
+                    properties:
+                      center:
+                        items:
+                          type: integer
+                        type: array
+                      id:
+                        format: uuid
+                        type: string
+                      image:
+                        properties:
+                          height:
+                            readOnly: true
+                            type: integer
+                          id:
+                            format: uuid
+                            readOnly: true
+                            type: string
+                          path:
+                            readOnly: true
+                            type: string
+                          s3_url:
+                            readOnly: true
+                            type: string
+                          status:
+                            enum:
+                            - checked
+                            - unchecked
+                            - error
+                          url:
+                            readOnly: true
+                            type: string
+                          width:
+                            readOnly: true
+                            type: integer
+                        required:
+                        - status
+                        type: object
+                      polygon:
+                        items:
+                          type: array
+                        type: array
+                      url:
+                        readOnly: true
+                        type: string
+                    readOnly: true
+                    required:
+                    - polygon
+                    - center
+                    - image
+                    type: object
+                required:
+                - type
+                - name
+          description: ''
+      tags:
+      - elements
   /api/v1/elements/{id}/:
     get:
       description: List all parents and children of a single element
-- 
GitLab