blob: 3e4124250311389063f3db980b17ea40ee82f98d [file] [log] [blame]
openapi: 3.0.0
info:
version: 0.1.0
title: APP4MC amlt to SystemC Transformation API
description: APP4MC Transformation API to transform an Amalthea model file into simulation code.
servers:
- url: http://localhost:8080/app4mc/validation
- url: https://app4mc.eclipseprojects.io/app4mc/amlt2systemc
paths:
/:
post:
summary: Upload the file to transform and start the transformation process asynchronously
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
responses:
'201':
description: Upload succeeded and transformation process started
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: ID of the created transformation 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 transformation 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: Transformation 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 result 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 transformation result file
operationId: getDownload
parameters:
- in: path
name: statusId
required: true
schema:
type: string
responses:
'200':
description: Transformation successful
content:
application/octet-stream:
schema:
type: string
format: binary
links:
delete:
operationId: deleteResource
parameters:
statusId: $request.path.statusId
'400':
description: Transformation finished with errors
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 transformation 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