openapi: 3.2.0 info: title: Genialis base Task API version: 0.0.0 description: Backend of the Genialis platform. servers: - url: https://app.genialis.com description: Base URL declared by the provider in apis.yml (roadmap#122). tags: - name: Task paths: /api/task: get: operationId: api_task_list description: 'Observable task viewset. It exposes standard observable endpoints so user can subscribe to it plus it lists all the background tasks for a current user.' parameters: - in: query name: id schema: type: integer - in: query name: id__in schema: type: array items: type: integer description: Multiple values may be separated by commas. explode: false style: form - name: limit required: false in: query description: Number of results to return per page. schema: type: integer - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer - name: ordering required: false in: query description: Which field to use when ordering the results. schema: type: string - in: query name: status schema: type: string enum: - ER - OK - PR - WT description: '* `WT` - Waiting * `PR` - Processing * `OK` - Done * `ER` - Error' - in: query name: status__in schema: type: array items: type: string description: Multiple values may be separated by commas. explode: false style: form tags: - Task security: - cookieAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedBackgroundTaskList' description: '' summary: Api task list x-summary-source: derived /api/task/{id}: get: operationId: api_task_retrieve description: 'Observable task viewset. It exposes standard observable endpoints so user can subscribe to it plus it lists all the background tasks for a current user.' parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this background task. required: true tags: - Task security: - cookieAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/BackgroundTask' description: '' summary: Api task retrieve x-summary-source: derived /api/task/subscribe: post: operationId: api_task_subscribe_create description: Register an Observer for a resource. tags: - Task requestBody: content: application/json: schema: $ref: '#/components/schemas/ObserverSubscribeRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ObserverSubscribeRequest' multipart/form-data: schema: $ref: '#/components/schemas/ObserverSubscribeRequest' required: true security: - cookieAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/ObserverSubscription' description: '' summary: Api task subscribe create x-summary-source: derived /api/task/unsubscribe: post: operationId: api_task_unsubscribe_create description: Unregister a subscription. tags: - Task requestBody: content: application/json: schema: $ref: '#/components/schemas/ObserverSubscription' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ObserverSubscription' multipart/form-data: schema: $ref: '#/components/schemas/ObserverSubscription' required: true security: - cookieAuth: [] - {} responses: '200': description: No response body summary: Api task unsubscribe create x-summary-source: derived components: schemas: PaginatedBackgroundTaskList: type: object required: - count - results properties: count: type: integer example: 123 next: type: - string - 'null' format: uri example: http://api.example.org/accounts/?offset=400&limit=100 previous: type: - string - 'null' format: uri example: http://api.example.org/accounts/?offset=200&limit=100 results: type: array items: $ref: '#/components/schemas/BackgroundTask' BackgroundTask: type: object description: Serialize the BackgroundTask model. properties: id: type: integer readOnly: true started: type: - string - 'null' format: date-time finished: type: - string - 'null' format: date-time status: $ref: '#/components/schemas/BackgroundTaskStatusEnum' description: type: string maxLength: 256 output: {} required: - description - id ObserverSubscription: type: object description: Serializer for the subscribe response. properties: subscription_id: type: string format: uuid required: - subscription_id BackgroundTaskStatusEnum: enum: - WT - PR - OK - ER type: string description: '* `WT` - Waiting * `PR` - Processing * `OK` - Done * `ER` - Error' ObserverSubscribeRequest: type: object description: Serializer for the subscribe endpoint. properties: ids: type: - array - 'null' items: type: integer session_id: type: string required: - session_id securitySchemes: cookieAuth: type: apiKey in: cookie name: sessionid