Sibyl RestAPI Documentation (1.0.0)

Download OpenAPI specification:Download

“DAI-Lab” An open source project from Data to AI Lab at MIT.

What is Sibyl?

Sibyl is a highly configurable API for supporting the full human-ML decision making workflow.

entity

Entities being analyzed

Modify an Entity by ID

path Parameters
eid
required
string

ID of the entity to modify/create

Request Body schema: application/json
row_ids
Array of strings

Row IDs

features
object

Feature values

labels
object

Ground-truth labels. Only included if available

object

Additional properties

Responses

Request samples

Content type
application/json
{
  • "row_ids": [
    ],
  • "features": { },
  • "labels": { },
  • "property": {
    }
}

Response samples

Content type
application/json
{
  • "eid": "string",
  • "row_ids": [
    ],
  • "features": { },
  • "labels": { },
  • "property": {
    }
}

Get an Entity by ID

path Parameters
eid
required
string

ID of the entity to get

query Parameters
row_id
string

ID of the row to get for the entity

Responses

Response samples

Content type
application/json
{
  • "eid": "123",
  • "features": {
    },
  • "row_ids": [
    ],
  • "labels": {
    },
  • "property": {
    }
}

Insert or modify multiple Entities

Request Body schema: application/json
Array of objects (Entity)

List of entities to insert or modify

Responses

Request samples

Content type
application/json
{
  • "entities": [
    ]
}

Response samples

Content type
application/json
{
  • "entities": [
    ]
}

Get all Entities.

If group ID is specified, return entities of that group.

query Parameters
group_id
string

ID of the group to filter entities

Responses

Response samples

Content type
application/json
{
  • "entities": [
    ]
}

feature

ML model input features

Update or create a Feature by name

path Parameters
feature_name
required
string

Name of the feature to update

Request Body schema: application/json
description
string

Feature description

negated_description
string

Negated feature description

category
string

Category feature belongs to

type
string

Feature type (numeric, boolean, or categorical)

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "negated_description": "string",
  • "category": "string",
  • "type": "string"
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "negated_description": "string",
  • "category": "string",
  • "type": "string"
}

Get a Feature by name

path Parameters
feature_name
required
string

Name of the feature to get info for

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "negated_description": "string",
  • "category": "string",
  • "type": "string"
}

Update or create multiple Features

Request Body schema: application/json
Array of objects (Feature)

List of features to add or modify

Responses

Request samples

Content type
application/json
{
  • "features": [
    ]
}

Response samples

Content type
application/json
{
  • "features": [
    ]
}

Get all Features

Responses

Response samples

Content type
application/json
{
  • "features": [
    ]
}

Add or modify feature Categories

Request Body schema: application/json
Array of objects (Category)

List of categories to add or modify

Responses

Request samples

Content type
application/json
{
  • "categories": [
    ]
}

Response samples

Content type
application/json
{
  • "categories": [
    ]
}

Get all feature Categories

Responses

Response samples

Content type
application/json
{
  • "categories": [
    ]
}

model

The full ML model pipeline

Update or create a Model by id.

Note: Does not currently support updating realapp.

path Parameters
model_id
required
string

Name of the model to update/create

Request Body schema: application/json
description
string

Description of model

performance
string

Text description of model performance metrics

importances
object

Feature importance scores {feature_name:score}

training_set_id
string

ID of training set to use for this model

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "performance": "string",
  • "importances": { },
  • "training_set_id": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "description": "string",
  • "performance": "string"
}

Get a Model by ID

path Parameters
model_id
required
string

ID of the model to get information about

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "description": "string",
  • "performance": "string"
}

Get all Models

Responses

Response samples

Content type
application/json
{
  • "models": [
    ]
}

Get Model feature importance scores

path Parameters
model_id
required
string

ID of the model to get importances for

Responses

Response samples

Content type
application/json
{
  • "importances": [
    ]
}

Get a Model prediction

query Parameters
model_id
required
string

ID of the model to use to predict

eid
required
string

ID of the entity to predict on

row_id
string

ID of row to predict on (defaults to first row)

Responses

Response samples

Content type
application/json
{
  • "output": 0
}

Get multiple Model predictions.

If given multiple eids, return one prediction per eid (first row).
If given one eid, return one prediction per row_id.
Only one of eids and row_ids can contain more than one element.

Request Body schema: application/json
required
eids
required
Array of strings

Entity ID(s) to predict on

model_id
required
string

ID of the model to use to predict

row_ids
Array of strings

row_id(s) to select from the given eid

return_proba
boolean

If True, return probabilities instead of class predictions

Responses

Request samples

Content type
application/json
{
  • "eids": [
    ],
  • "model_id": "string",
  • "row_ids": [
    ],
  • "return_proba": true
}

Response samples

Content type
application/json
{
  • "predictions": [
    ]
}

context

Application-specific configurations

Update or create a Context

path Parameters
context_id
required
string

ID of the context to update/create

Request Body schema: application/json
context_id
string

Context ID

config
object

context config in {config_name: config_value} format

Responses

Request samples

Content type
application/json
{
  • "context_id": "string",
  • "config": { }
}

Response samples

Content type
application/json
{
  • "context": {
    }
}

Get a Context by ID

path Parameters
context_id
required
string

ID of the context to get

Responses

Response samples

Content type
application/json
{
  • "context": {
    }
}

Get all Context ids

Responses

Response samples

Content type
application/json
{
  • "contexts": [
    ]
}

group

Entity groups

Get all EntityGroup IDs

Responses

Response samples

Content type
application/json
{
  • "groups": [
    ]
}

Get an EntityGroup by ID

path Parameters
group_id
required
string

ID of the group to get

Responses

Response samples

Content type
application/json
{
  • "group_id": "string",
  • "property": { }
}

computing

Computed explanations and other ML augmenting information

Get Feature Contributions

Request Body schema: application/json
required
eid
required
string

ID of entity to get contributions for

row_id
string

Row ID of entity to get contributions for

model_id
required
string

ID of model to use

Responses

Request samples

Content type
application/json
{
  • "eid": "string",
  • "row_id": "string",
  • "model_id": "string"
}

Response samples

Content type
application/json
{
  • "result": {
    }
}

Get multiple Feature Contributions

Get feature contributions for multiple entities, or for multiple rows in a single entity

Only one of eids or row_ids can have multiple elements

Request Body schema: application/json
required
eids
required
Array of strings

Entity ID(s) to get contributions for

model_id
required
string

ID of model to use

row_ids
Array of strings

Row ID(s) to get contributions for

Responses

Request samples

Content type
application/json
{
  • "eids": [
    ],
  • "model_id": "string",
  • "row_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "contributions": {
    },
  • "values": {
    }
}

Modify and Predict (one at the time)

Modify one feature value at a time and return all resulting predictions.

Request Body schema: application/json
required
eid
required
string

ID of entity to modify

row_id
string

Row ID of entity to modify

model_id
required
string

ID of model to use

required
object (Changes)

Changes to features to make (feature_name:new_value pairs)

return_proba
boolean

Return probabilities instead of predictions

Responses

Request samples

Content type
application/json
{
  • "eid": "string",
  • "row_id": "string",
  • "model_id": "string",
  • "changes": {
    },
  • "return_proba": true
}

Response samples

Content type
application/json
{
  • "predictions": [
    ]
}

Modify and Predict (all at once)

Make all modifications and return the resulting prediction.

Request Body schema: application/json
required
eid
required
string

ID of entity to modify

row_id
string

Row ID of entity to modify

model_id
required
string

ID of model to use

required
object (Changes)

Changes to features to make (feature_name:new_value pairs)

return_proba
boolean

Return probabilities instead of predictions

Responses

Request samples

Content type
application/json
{
  • "eid": "string",
  • "row_id": "string",
  • "model_id": "string",
  • "changes": {
    },
  • "return_proba": true
}

Response samples

Content type
application/json
{
  • "prediction": 0
}

Modify and Get Feature Contributions

Modify entity feature values and return the resulting feature contributions

Request Body schema: application/json
required
eid
required
string

ID of entity to modify

row_id
string

Row ID of entity to modify

model_id
required
string

ID of model to use

required
object (Changes)

Changes to features to make (feature_name:new_value pairs)

Responses

Request samples

Content type
application/json
{
  • "eid": "string",
  • "row_id": "string",
  • "model_id": "string",
  • "changes": {
    }
}

Response samples

Content type
application/json
{
  • "contributions": {
    },
  • "values": {
    }
}

Get Similar Entities

Get nearest neighbors for list of eids, or for all rows in a single eid

Only one of eids or row_ids can have multiple elements

Request Body schema: application/json
required
eids
required
Array of strings

Entity ID(s) to get similar entities for

model_id
required
string

ID of model to use

Responses

Request samples

Content type
application/json
{
  • "eids": [
    ],
  • "model_id": "string"
}

Response samples

Content type
application/json
{
  • "similar_entities": {
    }
}

logging

Logging user actions and system events

Save a log message.

Request Body schema: application/json
user_id
string

The id of the user performing the action

eid
string

The id of the entity being acted upon

timestamp
required
integer

The time the event occurred, in seconds since the epoch

object

The details of the event being logged

Responses

Request samples

Content type
application/json
{
  • "user_id": "string",
  • "eid": "string",
  • "timestamp": 0,
  • "event": {
    }
}