Remote Engine API (0.1.0)
A Remote Engine is a service responsible to manage requests from the Witboost Computational Governance to validate resources.
By implementing this API contract, the service will be able to receive requests to evaluate resources and return the result of the evaluation compliant to the Witboost Computational Governance results.
This gives developers the possibility to implement their own validation logic with any technology of their choice, as long as it respects the API contract.
Once you develop and deploy a microservice that implements the Remote Engine API, when you create a policy or metric in Witboost, you can select the Remote Engine to use for the evaluation.
When you select Remote Engine, you will be able to provide the URL of the service that implements this API contract. Make sure the service is reachable by the Witboost platform.
Evaluate a resource
Computes a result based on the input resource. The result can be a policy result or a metric result.
Request Body schema: application/jsonrequired
An object containing the resource to evaluate using this executor
| content required | string The content of the resource to be evaluated. The content can be any type of data, such as a JSON object, a string, a number, etc but always in its string representation. e.g. For a system resource, the content will be a stringified YAML descriptor. |
| resourceType required | string Resource type that is being sent in the content. This has to be agreed between the Remote Engine implementation and the platform's registered resource types. |
| resourceId required | string A unique Resource Identifier inside the Witboost platform. |
Responses
Request samples
- Payload
{- "content": "apiVersion: v1\nkind: System\nmetadata:\n name: my-system\n namespace: my-namespace\n labels:\n app: my-app",
- "resourceType": "system",
- "resourceId": 123456
}Response samples
- 200
- 400
- 500
{- "satisfiesPolicy": false,
- "errors": [
- "The S3 object specified at 'specific.s3-arn' does not exist. Expected an existing S3 storage."
], - "details": {
- "s3Arn": "arn:aws:s3:::my-bucket"
}
}