| openapi: 3.0.0 | |
| info: | |
| version: 1.0.0 | |
| title: APP4MC Migration API | |
| description: APP4MC Model Migration API to migrate older model versions to the current one | |
| servers: | |
| - url: http://localhost:8080/app4mc/migration | |
| - url: https://app4mc.eclipseprojects.io/app4mc/migration | |
| paths: | |
| /: | |
| post: | |
| summary: Upload the file to migrate and start the migration process asynchronously | |
| requestBody: | |
| content: | |
| multipart/form-data: | |
| schema: | |
| type: object | |
| properties: | |
| file: | |
| type: string | |
| format: binary | |
| version: | |
| type: string | |
| description: The version to which the model should be converted to. Parameter is optional and defaults to the latest supported version in this service. | |
| responses: | |
| '201': | |
| description: Upload succeeded and migration process started | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| id: | |
| type: string | |
| description: ID of the created migration resource | |
| headers: | |
| Location: | |
| schema: | |
| type: string | |
| format: uri | |
| description: The URI to the status URL | |
| links: | |
| status: | |
| operationId: getStatus | |
| parameters: | |
| statusId: '$response.body#/id' | |
| description: > | |
| The `id` value returned in the response can be used as | |
| the `statusId` parameter in `GET /{statusId}`. | |
| '400': | |
| description: No model file provided as upload | |
| '404': | |
| description: Upload failed | |
| /{statusId}: | |
| get: | |
| summary: Get the status of the triggered migration process | |
| operationId: getStatus | |
| parameters: | |
| - in: path | |
| name: statusId | |
| required: true | |
| schema: | |
| type: string | |
| responses: | |
| '200': | |
| description: Processing finished successfully | |
| headers: | |
| Cache-Control: | |
| schema: | |
| type: string | |
| enum: | |
| - private, no-store, no-cache, must-revalidate | |
| links: | |
| result: | |
| operationId: getDownload | |
| parameters: | |
| statusId: $request.path.statusId | |
| '202': | |
| description: Migration process in progress | |
| headers: | |
| Cache-Control: | |
| schema: | |
| type: string | |
| enum: | |
| - private, no-store, no-cache, must-revalidate | |
| '204': | |
| description: Processing finished with an error | |
| headers: | |
| Cache-Control: | |
| schema: | |
| type: string | |
| enum: | |
| - private, no-store, no-cache, must-revalidate | |
| links: | |
| result: | |
| operationId: getError | |
| parameters: | |
| statusId: $request.path.statusId | |
| '404': | |
| description: Resource not available | |
| delete: | |
| summary: Delete the uploaded and transformed resource from the server | |
| operationId: deleteResource | |
| parameters: | |
| - in: path | |
| name: statusId | |
| required: true | |
| schema: | |
| type: string | |
| responses: | |
| '200': | |
| description: Resource deleted successfully | |
| '404': | |
| description: Resource not available | |
| /{statusId}/download: | |
| get: | |
| summary: Download the migrated model file | |
| operationId: getDownload | |
| parameters: | |
| - in: path | |
| name: statusId | |
| required: true | |
| schema: | |
| type: string | |
| responses: | |
| '200': | |
| description: Migration result available | |
| content: | |
| application/octet-stream: | |
| schema: | |
| type: string | |
| format: binary | |
| links: | |
| delete: | |
| operationId: deleteResource | |
| parameters: | |
| statusId: $request.path.statusId | |
| '404': | |
| description: Progress still running / Resource not available / No result available | |
| content: | |
| application/json: | |
| schema: | |
| type: string | |
| /{statusId}/error: | |
| get: | |
| summary: Download the error file of the migration process | |
| operationId: getError | |
| parameters: | |
| - in: path | |
| name: statusId | |
| required: true | |
| schema: | |
| type: string | |
| responses: | |
| '200': | |
| description: Error occured | |
| content: | |
| application/octet-stream: | |
| schema: | |
| type: string | |
| format: binary | |
| links: | |
| delete: | |
| operationId: deleteResource | |
| parameters: | |
| statusId: $request.path.statusId | |
| '404': | |
| description: Resource not available / No error occured | |
| content: | |
| application/json: | |
| schema: | |
| type: string | |
| /config: | |
| get: | |
| summary: Get the configuration definition of the service | |
| responses: | |
| '200': | |
| description: The configuration definition of the service | |
| content: | |
| application/json: | |
| schema: | |
| type: string |