This is a summary of the RESTful API defined by the PSI specification, which contains more detail. Examples are availalbe in the specification and in bite-sized pieces on this site. Links in the table are to the relevant part of the specification.

Service discovery

Purpose Method Target Arguments or request body Response
Begin discovery of PSI service PSI GET PSI None URIs for collections of similar PSI resources available at PSI
List PSI resources in collection C GET C None List of URIs for PSI resources in C
Get schema S GET S Schema depdendant or template=true The PSI schema S, optionally with template parameters displayed

Transforming data and making predictions

Purpose Method Target Arguments or request body Response
Get description of transformer or predictor T GET T None JSON representation of T, including schema of data it accepts and data it emits; if T is predictor that can be updated then includes update resource URI
Get value of transformer or predictor T applied to value V GET T value=V Result of T(V)
Create composition of transformer S with T POST T A composition with URI for S HTTP status 201 Created or 302 Found. Location header points to joined transformer

Accessing, querying and transforming datasets

Purpose Method Target Arguments or request body Response
Get description of relation R GET R None or as defined by R’s query schema JSON representation of R, including list of its attributes and schema for supported queries
Get description of attribute A GET A None or as defined by A’s query schema JSON representation of A, including schema of data it emits and queries it supports
Get value of attribute A for instance i or all instances GET A instance=i or instance=all Value of A for instance i or for all instances in (possibly queried) relation
Create a new attribute A (from existing attributes for relation R) POST R An attribute-definition HTTP status 201; Location header points to new attribute
Join attribute A with transformer or predictor T POST A A composition with URI for T HTTP status 201 Created or 302 Found. Location header points to transformed attribute
Remove client-created attribute A DELETE A None HTTP status 200 OK or 403 Forbidden

Training predictors

Purpose Method Target Arguments or request body Response
Get description of learner L GET L None JSON representation of L, including schema of acceptable learning tasks
Create new predictor by applying learner L to learning task T POST L A task containing T HTTP status 201 Created or 202 Accepted; Location header points to new predictor

Modifying trained predictors

Purpose Method Target Arguments or request body Response
Get schema defining acceptable values for retraining P GET P.update None PSI Schema defining acceptable update values
Update predictor P with values V POST P.update An update containing V HTTP status 303 See Other; Location header points to updated predictor
Remove predictor P DELETE P None HTTP status 200 OK or 403 Forbidden