Skip to main content

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.

Register a Remote Engine

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.

RemoteEngine

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/json
required

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

Content type
application/json
Example
{
  • "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

Content type
application/json
Example
{
  • "satisfiesPolicy": false,
  • "errors": [
    ],
  • "details": {
    }
}