blob: a37ec13751f72db68c3744c74eb16a91e0ae7536 [file] [log] [blame]
openapi: 3.0.0
info:
title: Eclipse Vorto Repository API
description: |-
The Eclipse Vorto Repository API is a pure read-only API and allows you to interact with models managed by the Repository. To create and modify models, please use the <a href="https://vorto.eclipse.org">Vorto Repository</a> Web Interface. Refer to the <a target="_blank" href="">Getting started Guide</a> for further details.
contact:
name: Eclipse Vorto Team
url: https://www.eclipse.org/vorto
email: vorto-development@bosch-si.com
version: '1.0'
servers:
- url: https://vorto-dev.eclipse.org/api/v1
description: Eclipse Vorto Repository
tags:
- name: Models
description: Explore models
- name: Generators
description: Generic API for generating code from models
- name: Plugins
description: Invoke official generator plugins
- name: Attachments
description: Explore attachments of models, such as images etc.
security:
- BoschID: []
- GithubID: []
- GithubBearerAuth: []
paths:
'/search/models':
get:
tags:
- Models
summary: Search for models
description: "This resource can be used to search for models. It allows free-text search using the model's *Display name*, *Name* or *Description* attributes. These values can be set using the Model Editor in the Model Details page, e.g. if there are models with names: *Light* and *Lightbulb*, searching with keyword *light* will fetch both. If you want to include unpublished or private models in search, you must login."
operationId: SearchForModels
parameters:
- name: expression
in: query
description: Free-text search expression
required: true
style: form
explode: true
schema:
type: string
responses:
200:
description: Successful retrieval of search result
headers: {}
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ModelInfo'
description: Successful retrieval of search result
400:
description: The request could not be completed, invalid search expression.
deprecated: false
'/generators/{serviceKey}':
get:
tags:
- Generators
summary: Retrieve information for a specific generator
description: Returns information corresponding to a specific generator identified using its 'servicekey'.
operationId: RetrieveInformationForASpecificGenerator
parameters:
- name: serviceKey
in: path
description: ServiceKey of the generator
required: true
style: simple
explode: false
schema:
type: string
responses:
200:
description: OK
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/GeneratorInfo'
deprecated: false
'/generators':
get:
tags:
- Generators
summary: List all registered generators
description: Returns a list of all generators registered with the Vorto Repository. The generators are grouped under 'production', 'infra' and 'demo' tags.
parameters:
- name: orderBy
in: query
description: Order results using the tag of your choice
style: form
explode: true
schema:
$ref: '#/components/schemas/orderBy'
responses:
200:
description: Retrieved generators successfully
headers: {}
content:
text/plain:
schema:
type: object
description: Retrieved generators successfully
deprecated: false
'/models/{modelId}':
get:
tags:
- Models
summary: Retrieve the meta-info of a model
description: Returns the meta information of the model using its `modelId`. If you want to search unpublished or private models, you must login.
parameters:
- name: modelId
in: path
description: The identifier of vorto model, e.g. com.bosch.bcds:XDK:2.0.0
required: true
style: simple
explode: false
schema:
type: string
responses:
200:
description: Successful retrieval of model info
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ModelInfo'
400:
description: The request could not be completed, invalid input.
401:
description: The request could not be completed, invalid authentication.
403:
description: The request could not be completed, unauthorized.
404:
description: The request could not be completed, resource not found.
deprecated: false
'/models/{modelId}/content':
get:
tags:
- Models
summary: Retrieve model content
description: Returns the complete model content including all resolved references for a given `modelId`. If you want to retrieve an unpublished or private model, you must login.
operationId: RetrieveModelContent
parameters:
- name: modelId
in: path
description: The identifier of Vorto model, e.g. com.bosch.bcds:XDK:2.0.0
required: true
style: simple
explode: false
schema:
type: string
responses:
200:
description: Successful retrieval of model content
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ModelContent'
400:
description: The request could not be completed, invalid input.
401:
description: The request could not be completed, invalid authentication.
404:
description: The request could not be completed, resource not found.
deprecated: false
'/generators/{serviceKey}/models/{modelId}':
get:
tags:
- Generators
summary: Invoke generator for a model
description: Invoke a generator for a specific model using the `service key` and `modelId`.
operationId: InvokeGeneratorForAModel
parameters:
- name: modelId
in: path
description: The identifier of the vorto model in *namespace.name:version* format, e.g. com.mycompany:Car:1.0.0
required: true
style: simple
explode: false
schema:
type: string
- name: serviceKey
in: path
description: ServiceKey of the generator
required: true
style: simple
explode: false
schema:
type: string
responses:
200:
description: Code was successfully generated.
headers: {}
content:
application/octet-stream:
schema:
type: string
format: binary
400:
description: The request could not be completed, invalid input.
404:
description: The request could not be completed, resource not found.
deprecated: false
'/plugins/generators/openapi/models/{modelId}':
get:
tags:
- Plugins
summary: Creates OpenAPI Specification
description: Generates an OpenAPI V3 specification for the given `modelId`.
parameters:
- name: modelId
in: path
description: The identifier of the vorto model in *namespace.name:version* format, e.g. com.mycompany:Car:1.0.0
required: true
style: simple
explode: false
schema:
type: string
- name: digitaltwin
in: query
required: true
description: The target Digital Twin Service for the OpenAPI Spec
style: form
explode: true
schema:
$ref: '#/components/schemas/digitaltwin'
responses:
200:
description: Code was successfully generated.
headers: {}
content:
application/octet-stream:
schema:
type: string
format: binary
400:
description: The request could not be completed, invalid input.
404:
description: The request could not be completed, resource not found.
deprecated: false
'/plugins/generators/openapi':
get:
tags:
- Plugins
summary: Meta-Information about plugin
description: Gives meta - information about the plugin.
responses:
200:
description: Successful retrieval of Plugin information
content:
application/json:
schema:
$ref: '#/components/schemas/GeneratorInfo'
400:
description: The request could not be completed, invalid input.
404:
description: The request could not be completed, resource not found.
deprecated: false
'/plugins/generators/boschiotsuite/models/{modelId}/connectivity':
get:
tags:
- Plugins
summary: Connect device via MQTT
description: Generates code to connect the device for the `modelId` to Bosch IoT Suite via MQTT.
parameters:
- name: modelId
in: path
description: The identifier of the vorto model in *namespace.name:version* format, e.g. com.mycompany:Car:1.0.0
required: true
style: simple
explode: false
schema:
type: string
- name: language
in: query
required: true
description: Language of the source code
style: form
explode: true
schema:
$ref: '#/components/schemas/language'
responses:
200:
description: Code was successfully generated.
headers: {}
content:
application/octet-stream:
schema:
type: string
format: binary
400:
description: The request could not be completed, invalid input.
404:
description: The request could not be completed, resource not found.
deprecated: false
'/plugins/generators/boschiotsuite/models/{modelId}/provision':
get:
tags:
- Plugins
summary: Provision the device
description: Generates a script to provision the device for `modelId` in the Bosch IoT Suite.
parameters:
- name: modelId
in: path
description: The identifier of the vorto model in *namespace.name:version* format, e.g. com.mycompany:Car:1.0.0
required: true
style: simple
explode: false
schema:
type: string
responses:
200:
description: Code was successfully generated.
headers: {}
content:
application/octet-stream:
schema:
type: string
format: binary
400:
description: The request could not be completed, invalid input.
404:
description: The request could not be completed, resource not found.
deprecated: false
'/plugins/generators/boschiotsuite':
get:
tags:
- Plugins
summary: Meta-Information about plugin
description: Gives meta - information about the plugin.
responses:
200:
description: Successful retrieval of Plugin information
content:
application/json:
schema:
$ref: '#/components/schemas/GeneratorInfo'
400:
description: The request could not be completed, invalid input.
404:
description: The request could not be completed, resource not found.
deprecated: false
'/plugins/generators/eclipsehono/models/{modelId}/connectivity':
get:
tags:
- Plugins
summary: Connect device to Hono MQTT Adapter
description: Generates code to connect the device for the `modelId` to Eclipse Hono MQTT Adapter.
parameters:
- name: modelId
in: path
description: The identifier of the vorto model in *namespace.name:version* format, e.g. com.mycompany:Car:1.0.0
required: true
style: simple
explode: false
schema:
type: string
- name: language
in: query
required: true
description: Language of the source code
style: form
explode: true
schema:
$ref: '#/components/schemas/language'
responses:
200:
description: Code was successfully generated.
headers: {}
content:
application/octet-stream:
schema:
type: string
format: binary
400:
description: The request could not be completed, invalid input.
404:
description: The request could not be completed, resource not found.
deprecated: false
'/plugins/generators/eclipsehono':
get:
tags:
- Plugins
summary: Meta-Information about plugin
description: Gives meta - information about the plugin.
responses:
200:
description: Successful retrieval of Plugin information
content:
application/json:
schema:
$ref: '#/components/schemas/GeneratorInfo'
400:
description: The request could not be completed, invalid input.
404:
description: The request could not be completed, resource not found.
deprecated: false
'/plugins/generators/eclipseditto/models/{modelId}':
get:
tags:
- Plugins
summary: Eclipse Ditto JSON Schema
description: Generates JSON-schema for the given `modelId` compliant for Eclipse Ditto.
parameters:
- name: modelId
in: path
description: The identifier of the vorto model in *namespace.name:version* format, e.g. com.mycompany:Car:1.0.0
required: true
style: simple
explode: false
schema:
type: string
responses:
200:
description: Code was successfully generated.
headers: {}
content:
application/octet-stream:
schema:
type: string
format: binary
400:
description: The request could not be completed, invalid input.
404:
description: The request could not be completed, resource not found.
deprecated: false
'/plugins/generators/eclipseditto':
get:
tags:
- Plugins
summary: Meta-Information about plugin
description: Gives meta - information about the plugin.
responses:
200:
description: Successful retrieval of Plugin information
content:
application/json:
schema:
$ref: '#/components/schemas/GeneratorInfo'
400:
description: The request could not be completed, invalid input.
404:
description: The request could not be completed, resource not found.
deprecated: false
'/models/{modelId}/content/{targetplatformKey}':
get:
tags:
- Models
summary: Retrieve model content for a platform
description: Returns the complete model content including all resolved references and platform specific attributes for a given `modelId`. Platform specific attributes can be defined using mappings. If there are no platform specific attributes available the call will return 404. If you want to retrieve an unpublished or private model, you must login.
operationId: RetrieveModelContentForAPlatform
parameters:
- name: modelId
in: path
description: The modelId of vorto model, e.g. com.ipso.smartobjects:Pressure:1.1.0
required: true
style: simple
explode: false
schema:
type: string
- name: targetplatformKey
in: path
description: The key of the targetplatform, e.g. lwm2m
required: true
style: simple
explode: false
schema:
type: string
responses:
200:
description: Successful retrieval of model content
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ModelContent'
400:
description: The request could not be completed, invalid input.
401:
description: The request could not be completed, invalid authentication.
404:
description: The request could not be completed, resource not found.
deprecated: false
'/models/{modelId}/file':
get:
tags:
- Models
summary: Download a model
description: Downloads the desired model using its `modelId`. If you also require the dependencies set `includeDependencies` flag to `true`. If you want to download an unpublished or private model, you must login.
operationId: DownloadAModel
parameters:
- name: modelId
in: path
description: The identifier of vorto model, e.g. com.bosch.bcds:XDK:2.0.0
required: true
style: simple
explode: false
schema:
type: string
- name: includeDependencies
in: query
description: Optional parameter, set it to `true` if you also require the dependencies.
style: form
explode: true
schema:
$ref: '#/components/schemas/includeDependencies'
responses:
200:
description: Successful download of model file
headers: {}
content:
application/octet-stream:
schema:
type: string
format: binary
400:
description: The request could not be completed, invalid parameters.
401:
description: The request could not be completed, missing authentication.
404:
description: The request could not be completed, model not found.
deprecated: false
'/attachments/{modelId}/files/{filename}':
get:
tags:
- Attachments
summary: Retrieve a specific attachment
description: Returns a specific attachment from a model by using`modelId` and `filename`. If you want to perform this operation for an unpublished or private model, you must login.
operationId: RetrieveASpecificAttachment
parameters:
- name: modelId
in: path
description: The identifier of the vorto model in *namespace.name:version* format, e.g. com.bosch.bcds:XDK:2.0.0
required: true
style: simple
explode: false
schema:
type: string
- name: filename
in: path
description: The name of the attached file that you want to retrieve
required: true
style: simple
explode: false
schema:
type: string
responses:
200:
description: Successfully retrieved the attachment
headers: {}
content:
application/octet-stream:
schema:
type: string
format: binary
404:
description: The request could not be completed, resource not found.
deprecated: false
'/attachments/{modelId}':
get:
tags:
- Attachments
summary: List all attachments for a model
description: Returns list of attachments related to a model identified using its `modelId`. If you want to retrieve the list of attachments for an unpublished or private model, you must login.
operationId: ListAllAttachmentsForAModel
parameters:
- name: modelId
in: path
description: The ID of the vorto model in *namespace.name:version* format, e.g. com.bosch.bcds:XDK:2.0.0
required: true
style: simple
explode: false
schema:
type: string
responses:
200:
description: Successfully retrieved list of attachments
headers: {}
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Attachment'
description: Successfully retrieved list of attachments
404:
description: The request could not be completed, resource not found.
deprecated: false
components:
schemas:
ModelInfo:
title: ModelInfo
type: object
properties:
author:
type: string
creationDate:
type: string
format: date-time
description:
type: string
displayName:
type: string
fileName:
type: string
hasImage:
type: boolean
id:
$ref: '#/components/schemas/ModelId'
imported:
type: boolean
mappingReference:
$ref: '#/components/schemas/ModelId'
modificationDate:
type: string
format: date-time
platformMappings:
type: object
additionalProperties:
$ref: '#/components/schemas/ModelId'
referencedBy:
type: array
items:
$ref: '#/components/schemas/ModelId'
references:
type: array
items:
$ref: '#/components/schemas/ModelId'
released:
type: boolean
state:
type: string
stereotypes:
type: array
items:
$ref: '#/components/schemas/Stereotype'
targetPlatformKey:
type: string
type:
$ref: '#/components/schemas/ModelType'
vortolang:
type: string
ModelContent:
title: ModelContent
type: object
properties:
models:
type: object
additionalProperties:
$ref: '#/components/schemas/Model'
root:
$ref: '#/components/schemas/ModelId'
BaseModel:
title: BaseModel
type: object
properties:
targetPlatformKey:
type: string
stereotypes:
type: array
items:
$ref: '#/components/schemas/Stereotype'
mappingReference:
$ref: '#/components/schemas/ModelId'
vortolang:
type: string
id:
$ref: '#/components/schemas/ModelId'
type:
$ref: '#/components/schemas/ModelType'
modelType:
type: string
displayName:
type: string
description:
type: string
fileName:
type: string
references:
type: array
items:
$ref: '#/components/schemas/ModelId'
Model:
title: Model
type: object
allOf:
- $ref: '#/components/schemas/BaseModel'
oneOf:
- $ref: '#/components/schemas/EnumModel'
- $ref: '#/components/schemas/EntityModel'
- $ref: '#/components/schemas/FunctionblockModel'
- $ref: '#/components/schemas/Infomodel'
discriminator:
propertyName: modelType
EnumModel:
title: EnumModel
allOf:
- $ref: '#/components/schemas/Model'
- type: object
properties:
literals:
type: array
items:
$ref: '#/components/schemas/EnumLiteral'
EnumLiteral:
title: EnumLiteral
type: object
properties:
name:
type: string
parent:
$ref: '#/components/schemas/ModelId'
EntityModel:
title: EntityModel
allOf:
- $ref: '#/components/schemas/Model'
- type: object
properties:
properties:
type: array
items:
$ref: '#/components/schemas/ModelProperty'
ModelProperty:
title: ModelProperty
type: object
properties:
targetPlatformKey:
type: string
stereotypes:
type: array
items:
$ref: '#/components/schemas/Stereotype'
mappingReference:
$ref: '#/components/schemas/ModelId'
mandatory:
type: boolean
name:
type: string
description:
type: string
type:
type: object
constraints:
type: array
items:
$ref: '#/components/schemas/Constraint'
attributes:
type: array
items:
type: object
primitive:
type: boolean
multiple:
type: boolean
Constraint:
title: Constraint
type: object
properties:
type:
$ref: '#/components/schemas/ConstraintType'
value:
type: string
FunctionblockModel:
title: FunctionblockModel
allOf:
- $ref: '#/components/schemas/Model'
- type: object
properties:
configurationProperties:
type: array
items:
$ref: '#/components/schemas/ModelProperty'
statusProperties:
type: array
items:
$ref: '#/components/schemas/ModelProperty'
faultProperties:
type: array
items:
$ref: '#/components/schemas/ModelProperty'
events:
type: array
items:
$ref: '#/components/schemas/ModelEvent'
operations:
type: array
items:
$ref: '#/components/schemas/Operation'
ModelEvent:
title: ModelEvent
type: object
properties:
name:
type: string
properties:
type: array
items:
$ref: '#/components/schemas/ModelProperty'
Operation:
title: Operation
type: object
properties:
targetPlatformKey:
type: string
stereotypes:
type: array
items:
$ref: '#/components/schemas/Stereotype'
mappingReference:
$ref: '#/components/schemas/ModelId'
name:
type: string
description:
type: string
result:
$ref: '#/components/schemas/ReturnType'
params:
type: array
items:
$ref: '#/components/schemas/Param'
breakable:
type: boolean
ReturnType:
title: ReturnType
type: object
properties:
type:
$ref: '#/components/schemas/ModelId'
primitive:
type: boolean
multiple:
type: boolean
Param:
title: Param
type: object
properties:
targetPlatformKey:
type: string
stereotypes:
type: array
items:
$ref: '#/components/schemas/Stereotype'
mappingReference:
$ref: '#/components/schemas/ModelId'
mandatory:
type: boolean
name:
type: string
description:
type: string
type:
$ref: '#/components/schemas/ModelId'
constraints:
type: array
items:
$ref: '#/components/schemas/Constraint'
primitive:
type: boolean
multiple:
type: boolean
Infomodel:
title: Infomodel
allOf:
- $ref: '#/components/schemas/Model'
- type: object
properties:
functionblocks:
type: array
items:
$ref: '#/components/schemas/ModelProperty'
ConstraintType:
title: ConstraintType
enum:
- MIN
- MAX
- STRLEN
- REGEX
- MIMETYPE
- SCALING
- DEFAULT
- NULLABLE
type: string
example: MIN
Stereotype:
title: Stereotype
type: object
properties:
attributes:
type: object
additionalProperties:
type: string
name:
type: string
Attachment:
title: Attachment
type: object
properties:
filename:
type: string
modelId:
$ref: '#/components/schemas/ModelId'
tags:
type: array
items:
$ref: '#/components/schemas/Tag'
Tag:
title: Tag
type: object
properties:
id:
type: string
label:
type: string
GeneratorInfo:
title: GeneratorInfo
type: object
properties:
amountOfDownloads:
type: integer
format: int32
configKeys:
type: array
items:
type: string
configTemplate:
type: string
creator:
type: string
description:
type: string
documentationUrl:
type: string
image144x144:
type: string
image32x32:
type: string
infoUrl:
type: string
key:
type: string
name:
type: string
tags:
type: array
items:
type: string
ModelId:
title: ModelId
type: object
properties:
name:
type: string
namespace:
type: string
prettyFormat:
type: string
version:
type: string
includeDependencies:
title: includeDependencies
enum:
- false
- true
type: string
example: false
orderBy:
title: orderBy
enum:
- demo
- infra
- production
type: string
example: demo
language:
title: language
enum:
- python
- arduino
- java
digitaltwin:
title: Digital Twin Service
enum:
- boschiotthings
ModelType:
title: ModelType
enum:
- Functionblock
- InformationModel
- Datatype
- Mapping
type: string
example: Functionblock
securitySchemes:
BoschID:
type: oauth2
description: |-
Use either "OAuth2.0" with your Bosch-ID or the "Basic authentication"
below with a Demo user. Select the following checkbox in order to grant
Bosch IoT Things to access your Bosch-ID.
flows:
authorizationCode:
authorizationUrl: 'https://identity.bosch.com/connect/authorize'
tokenUrl: 'https://identity.bosch.com/connect/token'
scopes:
openid: Access your Bosch-ID
GithubID:
type: oauth2
description: |-
Use either "OAuth2.0" with your Github-ID.
Select the following checkbox in order to grant
Eclipse Vorto Repository to access your Github ID.
flows:
authorizationCode:
authorizationUrl: 'https://github.com/login/oauth/authorize'
tokenUrl: 'https://github.com/login/oauth/access_token'
scopes:
openid: user:email
GithubBearerAuth:
type: http
scheme: bearer
bearerFormat: Github token
description: |-
A token issued by Github