Download OpenAPI specification:Download
The vac engine API allows running deductions on given inputs.
A blueprint is a deductive process definition that describes a set of outcome computations.
A blueprint is composed of:
A set of variable descriptions of three categories:
Any of these three categories can contain nested variables (objects).
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.
A processor is a compiled blueprint with it's run environment. Processor IDs are always the same as the corresponding blueprint IDs.
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.
A publication is the relation between a blueprint/processor and a portal that makes the former callable on the latter's API url.
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 a portal's processor on a given input
portal_id required | integer Example: 3 Portal ID |
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:
|
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. |
{- "input": {
- "birthdate": "2002-04-01"
}, - "env": {
- "now": "string"
}
}
{- "input": {
- "birthdate": "2002-04-01"
}, - "output": {
- "age": 19,
- "priority": 3,
- "vaccine_compatibilities": {
- "pfizer": true,
- "moderna": false
}
}
}
Get the description of the blueprint/processor published on the given portal.
portal_id required | integer Example: 3 Portal ID |
{- "input": {
- "properties": {
- "birthdate": {
- "format": "date",
- "type": "string"
}
}, - "required": [
- "birthdate"
]
}, - "output": {
- "properties": {
- "age": {
- "type": "integer"
}, - "vaccine_compatibilities": {
- "type": "object",
- "properties": {
- "pfizer": {
- "type": "boolean"
}, - "moderna": {
- "type": "boolean"
}
}
}
}
}, - "logic": {
- "vaccine_compatibilities.pfizer": {
- "false": [
- "under_12",
- "pregnant"
], - "true": [
- "others"
]
}, - "vaccine_compatibilities.moderna": {
- "false": [
- "under_20",
- "pregnant"
], - "true": [
- "others"
]
}
}
}