blob: 78d049109fc21b07a2848a022076a01b9a855cae [file] [log] [blame]
openapi: 3.0.0
info:
version: 0.9.9
title: APP4MC Migration API
description: APP4MC Model Migration API to migrate older model versions to the current one
servers:
- url: http://localhost:8080/app4mc/converter
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
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