API definitions

Get Task Status

get

Get the status of a background task.

Authorizations
x-api-keystringRequired

API Key for authentication

Path parameters
task_idstringRequired
Query parameters
profilebooleanOptional

Set to true to profile the method and return an interactive HTML profile report

Default: false
Responses
chevron-right
200

The status of the task. The backing task may have succeeded, failed, or may still be pending. Examine the returned task object for the status of the task.

application/json
idstringRequired
statusstring · enumRequiredPossible values:
result_typestring · enumRequired

The type that the result will be, if that result is present. This can be used to determine the type of the result field. This field will be set regardless of task status or error condition.

Possible values:
resultany ofRequired

The final response, if available. If this task has errored, please check the error field instead. The type of this field is based on the request type: /infer gives an InferenceResponse, /actionselect gives an ActionSelectionResponse, /learn gives a LearnResponse, /validate gives a ValidationResponse, and /csv-validate gives a CSVValidationResult. Response is returned by /import.

or
or
or
or
object · ValidationResponseOptional
or
or
or
nullOptional
errorany ofOptional
stringOptional
or
nullOptional
created_atstring · date-timeRequired
completed_atany ofOptional
string · date-timeOptional
or
nullOptional
get
/status/{task_id}

Get All Tasks

get

Retrieves a list of all tasks. Result bodies will be empty, even if results have been completed, since results can be quite large. To get results for a specific task, use the /status/TASK_ID endpoint.

Authorizations
x-api-keystringRequired

API Key for authentication

Query parameters
profilebooleanOptional

Set to true to profile the method and return an interactive HTML profile report

Default: false
Responses
chevron-right
200

Returns a list of all tasks

application/json
idstringRequired
statusstring · enumRequiredPossible values:
result_typestring · enumRequired

The type that the result will be, if that result is present. This can be used to determine the type of the result field. This field will be set regardless of task status or error condition.

Possible values:
resultany ofRequired

The final response, if available. If this task has errored, please check the error field instead. The type of this field is based on the request type: /infer gives an InferenceResponse, /actionselect gives an ActionSelectionResponse, /learn gives a LearnResponse, /validate gives a ValidationResponse, and /csv-validate gives a CSVValidationResult. Response is returned by /import.

or
or
or
or
object · ValidationResponseOptional
or
or
or
nullOptional
errorany ofOptional
stringOptional
or
nullOptional
created_atstring · date-timeRequired
completed_atany ofOptional
string · date-timeOptional
or
nullOptional
get
/status

Get Graph

get

Gets the current graph stored in this Genius instance.

Authorizations
x-api-keystringRequired

API Key for authentication

Query parameters
profilebooleanOptional

Set to true to profile the method and return an interactive HTML profile report

Default: false
Responses
chevron-right
200

The current graph stored in this Genius instance

application/json
anyOptional
get
/graph

Set Graph

post

Sets the VFG graph to the given value.

Authorizations
x-api-keystringRequired

API Key for authentication

Query parameters
profilebooleanOptional

Set to true to profile the method and return an interactive HTML profile report

Default: false
Header parameters
if-unmodified-sinceany ofOptional

A matcher header, where the graph must not be newer than the timestamp. Timestamps are specified as RFC7231 datetime. One of three required matchers; at least one must be set.

stringOptional
or
nullOptional
if-matchany ofOptional

An ETag to match. ETags are returned from the service via the "ETag" header. One of three required matchers; at least one must be set.

stringOptional
or
nullOptional
if-none-matchany ofOptional

An ETag to not match. ETags are returned from the service via the "ETag" header. One of three required matchers; at least one must be set.

stringOptional
or
nullOptional
dateany ofOptional

The user's datetime, as an RFC7231 timestamp. Used as the authoritative modification time if set. Note that most clients will set this by default.

stringOptional
or
nullOptional
Body
Responses
chevron-right
200

Successful Response

application/json
post
/graph

Set Graph

put

Sets the VFG graph to the given value.

Authorizations
x-api-keystringRequired

API Key for authentication

Query parameters
profilebooleanOptional

Set to true to profile the method and return an interactive HTML profile report

Default: false
Header parameters
if-unmodified-sinceany ofOptional

A matcher header, where the graph must not be newer than the timestamp. Timestamps are specified as RFC7231 datetime. One of three required matchers; at least one must be set.

stringOptional
or
nullOptional
if-matchany ofOptional

An ETag to match. ETags are returned from the service via the "ETag" header. One of three required matchers; at least one must be set.

stringOptional
or
nullOptional
if-none-matchany ofOptional

An ETag to not match. ETags are returned from the service via the "ETag" header. One of three required matchers; at least one must be set.

stringOptional
or
nullOptional
dateany ofOptional

The user's datetime, as an RFC7231 timestamp. Used as the authoritative modification time if set. Note that most clients will set this by default.

stringOptional
or
nullOptional
Body
Responses
chevron-right
200

Successful Response

application/json
put
/graph

Delete Graph

delete

Deletes the VFG graph.

Authorizations
x-api-keystringRequired

API Key for authentication

Query parameters
profilebooleanOptional

Set to true to profile the method and return an interactive HTML profile report

Default: false
Header parameters
if-unmodified-sinceany ofOptional

A matcher header, where the graph must not be newer than the timestamp. Timestamps are specified as RFC7231 datetime. One of three required matchers; at least one must be set.

stringOptional
or
nullOptional
if-matchany ofOptional

An ETag to match. ETags are returned from the service via the "ETag" header. One of three required matchers; at least one must be set.

stringOptional
or
nullOptional
if-none-matchany ofOptional

An ETag to not match. ETags are returned from the service via the "ETag" header. One of three required matchers; at least one must be set.

stringOptional
or
nullOptional
dateany ofOptional

The user's datetime, as an RFC7231 timestamp. Used as the authoritative modification time if set. Note that most clients will set this by default.

stringOptional
or
nullOptional
Responses
chevron-right
200

On success, returns no body.

object · EmptyResponseOptional
delete
/graph

Patch Graph

patch
Authorizations
x-api-keystringRequired

API Key for authentication

Query parameters
profilebooleanOptional

Set to true to profile the method and return an interactive HTML profile report

Default: false
Header parameters
if-unmodified-sinceany ofOptional
stringOptional
or
nullOptional
if-matchany ofOptional
stringOptional
or
nullOptional
if-none-matchany ofOptional
stringOptional
or
nullOptional
user-dateany ofOptional
stringOptional
or
nullOptional
acceptany ofOptional
stringOptional
or
nullOptional
content-typeany ofOptional
stringOptional
or
nullOptional
Bodyobject[]
object[]Optional
Responses
chevron-right
200

Successful Response

application/json
anyOptional
patch
/graph

No content

Infer

post

Asynchronously generates a distribution of values for the variables, given the values of all observed variables in evidence. Returns a task ID that can be used to poll for results.

Authorizations
x-api-keystringRequired

API Key for authentication

Query parameters
profilebooleanOptional

Set to true to profile the method and return an interactive HTML profile report

Default: false
Body
fail_on_warningany ofOptional

If True, raise an exception on warning

Default: false
booleanOptional
or
nullOptional
variablesany ofRequired

Variable id(s) to query

stringOptional
or
string[]Optional
evidenceany ofRequired

Optional key/value pairs of variable IDs and observed values on which inference is conditioned.

or
nullOptional
librarystring · enumRequired

library name, example: pgmpy

Possible values:
Responses
chevron-right
200

Successful Response

application/json
anyOptional
post
/infer

No content

Actionselection

post

Asynchronously returns the correct action for the next policy_len steps given the observation state index. library parameter must be set to "pymdp". Returns a task ID that can be used to poll for results.

Authorizations
x-api-keystringRequired

API Key for authentication

Query parameters
profilebooleanOptional

Set to true to profile the method and return an interactive HTML profile report

Default: false
Body
fail_on_warningany ofOptional

If True, raise an exception on warning

Default: false
booleanOptional
or
nullOptional
learn_likelihoodsany ofOptional

Boolean flag or parameters for learning A matrices

booleanOptional
or
or
nullOptional
learn_transitionsany ofOptional

Boolean flag or parameters for learning B matrices

booleanOptional
or
or
nullOptional
learn_initial_state_priorsany ofOptional

Boolean flag or parameters for learning D matrices

booleanOptional
or
or
nullOptional
librarystring · enumRequiredPossible values:
observationany ofRequired
integerOptional
or
stringOptional
or
policy_lenintegerRequired
use_utilityany ofOptional

Whether to use preferences for action selection

Default: true
booleanOptional
or
nullOptional
use_infogainany ofOptional

Whether to use infogain for action selection

Default: true
booleanOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
anyOptional
post
/actionselection

No content

Learn

post

Asynchronously updates the parameters of the model with the given observations. Returns a task ID that can be used to poll for results.

Authorizations
x-api-keystringRequired

API Key for authentication

Query parameters
profilebooleanOptional

Set to true to profile the method and return an interactive HTML profile report

Default: false
Body
observations_csvstringRequired

CSV data representing observations to use for parameter estimation.

librarystring · enumOptional

library name, should be verses or pgmpy

Possible values:
algorithmany ofOptional

Algorithm to use for learning

string · enumOptionalPossible values:
or
nullOptional
initialize_parametersany ofOptional

If True, reinitialize parameters to a context-specific default before learning. If an Initialization instance, compute the initialization from the provided value.

booleanOptional
or
string · enumOptionalPossible values:
or
or
or
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
anyOptional
post
/learn

No content

Validate

post
Authorizations
x-api-keystringRequired

API Key for authentication

Query parameters
model_typestring · enumOptionalDefault: factor_graphPossible values:
correct_errorsbooleanOptionalDefault: false
profilebooleanOptional

Set to true to profile the method and return an interactive HTML profile report

Default: false
Body
Responses
chevron-right
200

Successful Response

application/json
vfgany ofOptional
or
nullOptional
errorsany ofOptionalDefault: []
or
nullOptional
post
/validate

Get Version

get

Gets the current versions of deployed components.

Authorizations
x-api-keystringRequired

API Key for authentication

Query parameters
profilebooleanOptional

Set to true to profile the method and return an interactive HTML profile report

Default: false
Responses
chevron-right
200

Successful Response

application/json
pyvfgstringRequired
gpilstringRequired
gpilserverstringRequired
get
/version

Validate Csv Endpoint

post

Validates a CSV file according to VFG rules.

The CSV must:

  • Have headers

  • Headers must be valid VFG variable names

  • All rows must have same number of columns

  • No empty/null/NA values allowed

  • No columns with dates

Authorizations
x-api-keystringRequired

API Key for authentication

Query parameters
profilebooleanOptional

Set to true to profile the method and return an interactive HTML profile report

Default: false
Body
stringOptional

CSV data to validate

Responses
chevron-right
200

Successful Response

application/json
post
/validate-csv

Auto Bin One Off

post

Automatically bins a given column with the chosen binning strategy and number of bins.

For Continuous data, the binning strategy can be one of:

  • quantile: Bins have approximately the same number of observations.

  • fixed_width: Bins have the same width.

For Categorical data, the binning strategy can be:

  • k_cluster: Bins are created by clustering the data, using as features the columns specified in y_columns (or all columns if y_columns is not specified).

Numeric data is generally treated as continuous, but can be coerced to categorical by setting variable_type to discrete.

If an incorrect strategy is used, a 400 will be returned with the message "Invalid binning strategy", and the list of available binning strategies. (See the Response schema.)

If the number of bins is too large for the data provided, a 400 will be returned with a message recommending fewer bins.

Authorizations
x-api-keystringRequired

API Key for authentication

Query parameters
profilebooleanOptional

Set to true to profile the method and return an interactive HTML profile report

Default: false
Body

Get a binning for a variable, or a set of variables

csvstringRequired

CSV data to use for binning

Responses
chevron-right
200

Returns a dict mapping variable names to binning results or errors.

application/json
binned_csvany ofRequired

Binned csv string

stringOptional
or
nullOptional
post
/auto-bin-one-off

Last updated