Vac Engine API (1.0.3)

Download OpenAPI specification:Download

Introduction

The vac engine API allows running deductions on given inputs.

Blueprint

A blueprint is a deductive process definition that describes a set of outcome computations.

A blueprint is composed of:

  1. A set of variable descriptions of three categories:

    • input variables expected from the api request
    • output variables returned in the api response
    • intermediate variables user as helpers in the computation process

    Any of these three categories can contain nested variables (objects).

  2. A set of deduction tables which defines its behaviour.

    Each table is used to determine the outcome value of one or several output variables, using a sequence of subsidiary conditions: conditions are tested one after the other until one is fulfilled, then the related outcome is applied.

    If no condition is fulfilled to determine an outcome for a given output variable, the latter is not returned.

Processor

A processor is a compiled blueprint with it's run environment. Processor IDs are always the same as the corresponding blueprint IDs.

Portal

A portal is an endpoint on which a (single) blueprint/processor is published. Api calls made to a portal will be treated using the published processor and returns the computed outcomes.

Publication

A publication is the relation between a blueprint/processor and a portal that makes the former callable on the latter's API url.

Authentication

All API requests must be authenticated with an API key.

To authenticate the requests, pass the Authorization header with a Bearer token containing the API key.

For example, if the API key is:

api_1234567_123456789012345678901234567890

You need to pass the header as follow:

Authorization: Bearer api_1234567_123456789012345678901234567890

Run

Run a portal's processor on a given input

path Parameters
portal_id
required
integer
Example: 3

Portal ID

Request Body schema: application/json
input
required
object

Input data.

The input format is defined in the blueprint definition.

It's root is an object containing an arbitrary number of fields of the following types:

  • null values
  • boolean values
  • integer values
  • number values (arbitrary-precision)
  • string values (possibly restricted to a set of enum values)
  • date values as "yyyy-mm-dd" strings
  • objects whose values is of the above type or nested objects
object

The environment to use for the request.

This field is for test purpose and will only be taken into account if a test api-key is used.

Responses

Request samples

Content type
application/json
{
  • "input": {
    },
  • "env": {
    }
}

Response samples

Content type
application/json
{
  • "input": {
    },
  • "output": {
    }
}

Get portal description

Get the description of the blueprint/processor published on the given portal.

path Parameters
portal_id
required
integer
Example: 3

Portal ID

Responses

Response samples

Content type
application/json
{
  • "input": {
    },
  • "output": {
    },
  • "logic": {
    }
}