Tech Adapter API
Read this page in wide view mode from here
Tech Adapter API (2.6.3)
A Tech Adapter is responsible for integrating a specific technology into Witboost.
By implementing this Open API contract, the Tech Adapter microservice can be used by the Witboost platform to deploy, undeploy, and eventually manage the access control list of the technology components.
Once you deploy the Tech Adapter microservice, you can register it in the Witboost platform using the Builder API. The API is also used to validate the provisioning descriptors and to execute reverse provisioning operations.
Validate a provisioning request (async)
Start a validation process with the input descriptor and return a token that can be used to check the status of the validation process.
You want to implement this endpoint to assess that the provided resource descriptor conforms to the expected structure and has all the necessary information to be deployed on the infrastructure.
Implementing the asynchronous endpoint rather than the synchronous one is highly recommended even if the validation operation is not time-consuming.
Request Body schema: application/jsonrequired
Details of a provisioning request to be validated
| descriptorKind required | string (DescriptorKind) Enum: "DATAPRODUCT_DESCRIPTOR" "COMPONENT_DESCRIPTOR" "DATAPRODUCT_DESCRIPTOR_WITH_RESULTS" It can change according to the descriptor kind:
|
| descriptor required | string Resource descriptor in YAML format. Its structure changes according to If a component is dependent on another one, the COMPONENT_DESCRIPTOR descriptor will be enriched with the Provisioning Info of the dependency component. This does NOT apply to validation endpoints |
| latestEnrichedDescriptor | string Filled only in case of provision/unprovision requests. System descriptor enriched with provisioning info generated during the latest (successful or failed) provisioning/unprovisioning operation for each component. If available, provisioning information is reported in the Please note that the information contained in a |
| removeData required | boolean Default: false If true, when a component is undeployed, its underlying data will also be deleted |
Responses
Request samples
- Payload
{- "descriptorKind": "DATAPRODUCT_DESCRIPTOR",
- "descriptor": "dataProduct:\n id: urn:dmb:dp:finance:a-system:0\n components: \n - id: urn:dmb:dp:finance:a-system:0:component:0\n name: S3 storage\n description: A system that does something\n kind: storage\n version: 0.0.1\n - id: urn:dmb:dp:finance:a-system:0:component:1\n name: A system that does something\n description: A system that does something\n kind: outputport\n version: 0.0.1\nremoveData: false",
- "removeData": false
}Response samples
- 400
- 500
{- "errors": [
- "descriptor is required"
], - "userMessage": "The descriptor field is required",
- "moreInfo": {
- "problems": [
- "The descriptor field is required"
]
}, - "solutions": [
- "Please provide a valid descriptor"
]
}Get status of an async validation task
path Parameters
| token required | string Example: 3da5d0a2-9f3b-4a11-85a3-b5ddb73da032 Token obtained after a call to the async validate endpoint |
Responses
Response samples
- 200
- 400
- 500
{- "status": "COMPLETED",
- "info": {
- "publicInfo": {
- "valid": true
}
}
}Validate a provisioning request (sync)
Synchronously validate a provisioning request and return the validation result.
You want to implement this endpoint to assess that the provided resource descriptor conforms to the expected structure and has all the necessary information to be deployed on the infrastructure.
It is highly recommended to implement the asynchronous validation endpoint instead of this one.
Request Body schema: application/jsonrequired
Details of a provisioning request to be validated
| descriptorKind required | string (DescriptorKind) Enum: "DATAPRODUCT_DESCRIPTOR" "COMPONENT_DESCRIPTOR" "DATAPRODUCT_DESCRIPTOR_WITH_RESULTS" It can change according to the descriptor kind:
|
| descriptor required | string Resource descriptor in YAML format. Its structure changes according to If a component is dependent on another one, the COMPONENT_DESCRIPTOR descriptor will be enriched with the Provisioning Info of the dependency component. This does NOT apply to validation endpoints |
| latestEnrichedDescriptor | string Filled only in case of provision/unprovision requests. System descriptor enriched with provisioning info generated during the latest (successful or failed) provisioning/unprovisioning operation for each component. If available, provisioning information is reported in the Please note that the information contained in a |
| removeData required | boolean Default: false If true, when a component is undeployed, its underlying data will also be deleted |
Responses
Request samples
- Payload
{- "descriptorKind": "DATAPRODUCT_DESCRIPTOR",
- "descriptor": "dataProduct:\n id: urn:dmb:dp:finance:a-system:0\n components: \n - id: urn:dmb:dp:finance:a-system:0:component:0\n name: S3 storage\n description: A system that does something\n kind: storage\n version: 0.0.1\n - id: urn:dmb:dp:finance:a-system:0:component:1\n name: A system that does something\n description: A system that does something\n kind: outputport\n version: 0.0.1\nremoveData: false",
- "removeData": false
}Response samples
- 200
- 500
{- "valid": true
}Provision a resource
Deploy a system or a single component starting from its descriptor.
The descriptor is a YAML file that describes the resource to be deployed. The structure of the descriptor changes according to the descriptorKind field.
Request Body schema: application/jsonrequired
| descriptorKind required | string (DescriptorKind) Enum: "DATAPRODUCT_DESCRIPTOR" "COMPONENT_DESCRIPTOR" "DATAPRODUCT_DESCRIPTOR_WITH_RESULTS" It can change according to the descriptor kind:
|
| descriptor required | string Resource descriptor in YAML format. Its structure changes according to If a component is dependent on another one, the COMPONENT_DESCRIPTOR descriptor will be enriched with the Provisioning Info of the dependency component. This does NOT apply to validation endpoints |
| latestEnrichedDescriptor | string Filled only in case of provision/unprovision requests. System descriptor enriched with provisioning info generated during the latest (successful or failed) provisioning/unprovisioning operation for each component. If available, provisioning information is reported in the Please note that the information contained in a |
| removeData required | boolean Default: false If true, when a component is undeployed, its underlying data will also be deleted |
Responses
Request samples
- Payload
{- "descriptorKind": "DATAPRODUCT_DESCRIPTOR",
- "descriptor": "dataProduct:\n id: urn:dmb:dp:finance:a-system:0\n components: \n - id: urn:dmb:dp:finance:a-system:0:component:0\n name: S3 storage\n description: A system that does something\n kind: storage\n version: 0.0.1\n - id: urn:dmb:dp:finance:a-system:0:component:1\n name: A system that does something\n description: A system that does something\n kind: outputport\n version: 0.0.1\nremoveData: false",
- "removeData": false
}Response samples
- 200
- 202
- 400
- 500
{- "status": "COMPLETED",
- "info": {
- "publicInfo": {
- "valid": true
}
}
}Unprovision a resource
Undeploy a system or a single component starting from the latest provisioned descriptor.
The descriptor is a YAML file that describes the resource to be deployed. The structure of the descriptor changes according to the descriptorKind field.
Request Body schema: application/jsonrequired
| descriptorKind required | string (DescriptorKind) Enum: "DATAPRODUCT_DESCRIPTOR" "COMPONENT_DESCRIPTOR" "DATAPRODUCT_DESCRIPTOR_WITH_RESULTS" It can change according to the descriptor kind:
|
| descriptor required | string Resource descriptor in YAML format. Its structure changes according to If a component is dependent on another one, the COMPONENT_DESCRIPTOR descriptor will be enriched with the Provisioning Info of the dependency component. This does NOT apply to validation endpoints |
| latestEnrichedDescriptor | string Filled only in case of provision/unprovision requests. System descriptor enriched with provisioning info generated during the latest (successful or failed) provisioning/unprovisioning operation for each component. If available, provisioning information is reported in the Please note that the information contained in a |
| removeData required | boolean Default: false If true, when a component is undeployed, its underlying data will also be deleted |
Responses
Request samples
- Payload
{- "descriptorKind": "DATAPRODUCT_DESCRIPTOR",
- "descriptor": "dataProduct:\n id: urn:dmb:dp:finance:a-system:0\n components: \n - id: urn:dmb:dp:finance:a-system:0:component:0\n name: S3 storage\n description: A system that does something\n kind: storage\n version: 0.0.1\n - id: urn:dmb:dp:finance:a-system:0:component:1\n name: A system that does something\n description: A system that does something\n kind: outputport\n version: 0.0.1\nremoveData: false",
- "removeData": false
}Response samples
- 200
- 202
- 400
- 500
{- "status": "COMPLETED",
- "info": {
- "publicInfo": {
- "valid": true
}
}
}Get the status of a provision/unprovision task
Get the status and the results of a provision/unprovision operation.
This endpoint is used by the Provisioning Coordinator to poll the status of a provision/unprovision task.
path Parameters
| token required | string Example: 3da5d0a2-9f3b-4a11-85a3-b5ddb73da032 Provisioning Task Token obtained after a call to the provision or unprovision endpoints |
Responses
Response samples
- 200
- 400
- 500
{- "status": "RUNNING"
}Stop provision/unprovision task
Terminate a provision/unprovision task that is still running.
The tech adapter will use a request coming at this endpoint as a signal to stop the task. The provisioning coordinator will continue to poll the status of a provision/unprovision task by using the token that was returned by the provision/unprovision endpoint and not the one returned here.
The task can be stopped only if the tech adapter supports it, otherwise a 501 error is returned.
path Parameters
| token required | string Example: 3da5d0a2-9f3b-4a11-85a3-b5ddb73da032 Provision/Unprovision Task Token obtained after a call to the provision/unprovision endpoint |
Responses
Response samples
- 200
- 202
- 400
- 500
- 501
{- "status": "TERMINATED"
}Upsert the Access Control List
Create or update the Access Control List of an infrastructural component with the provided identities.
The supplied list of identities refers to the users and groups that need to have access to the component.
This means, Witboost always supplies the full list of identities even if some of them already have access to the underlying infrastructural resource.
Request Body schema: application/jsonrequired
| refs required | Array of strings Identities (i.e. users and groups) that should be registered in the Access Control List of the target component. The format of identities follows the Witboost format. Users are prefixed with |
required | object (ProvisionInfo) Information related to the provisioning workflow of a system |
| accessControlFields | object A free-form object that can be used to store additional information about the access control list request. These values are supplied from the user when using an Access Control Request Template on the UI. |
Responses
Request samples
- Payload
{- "refs": [
- "user:alice_mydomain.com",
- "user:bob_mydomain.com",
- "group:developers_mydomain.com",
- "group:finance_mydomain.com",
- "group:peopleops_mydomain.com"
], - "provisionInfo": {
- "request": "{\"componentIdToProvision\":\"urn:dmb:dp:finance:a-system:0:component:0\",\"dataProduct\":{\"id\":\"urn:dmb:dp:finance:a-system:0\",\"components\":[{\"id\":\"urn:dmb:dp:finance:a-system:0:component:0\",\"name\":\"S3 storage\",\"description\":\"A system that does something\",\"kind\":\"storage\",\"version\":\"0.0.1\"},{\"id\":\"urn:dmb:dp:finance:a-system:0:component:1\",\"name\":\"A system that does something\",\"description\":\"A system that does something\",\"kind\":\"outputport\",\"version\":\"0.0.1\"}]}}",
- "result": "{\"status\":\"COMPLETED\",\"info\":{\"publicInfo\":{\"valid\":true}}}"
}, - "accessControlFields": {
- "additionalInfo": "This is an additional information field that was provided in the Access Control Request Template"
}
}Response samples
- 200
- 202
- 400
- 500
{- "status": "COMPLETED",
- "info": {
- "publicInfo": {
- "valid": true
}
}
}Import an existing resource
Import an existing resource from the infrastructure into Witboost.
This operation is used to reverse provision a component that is already deployed in the target environment.
The reverse provisioning operation is used to import the current state of the component into Witboost, so that it can be tracked by the platform.
Request Body schema: application/jsonrequired
| useCaseTemplateId required | string Component's use case template id |
| environment required | string Target environment |
| params | object Reverse provisioning input params |
| catalogInfo | object Content of the current |
Responses
Request samples
- Payload
{- "useCaseTemplateId": "urn:dmb:utm:aws-s3-object:0",
- "environment": "development"
}Response samples
- 200
- 202
- 400
- 500
{- "status": "COMPLETED",
- "updates": {
- "metadata.fieldA": "valueA",
- "spec.mesh.description": "A system that does something"
}, - "logs": [
- {
- "timestamp": "2021-09-30T10:00:00Z",
- "level": "INFO",
- "message": "Reverse provisioning done"
}
]
}Get status of an import task
Get the status and the results of a reverse provisioning operation.
The reverse provisioning operation is used to import the current state of the component into Witboost, so that it can be tracked by the platform.
path Parameters
| token required | string Example: 3da5d0a2-9f3b-4a11-85a3-b5ddb73da032 Reverse Provisioning Task Token obtained after a call to the import endpoint |
Responses
Response samples
- 200
- 400
- 500
{- "status": "RUNNING"
}