API Reference Calls

API Overview

The Altum Platform API is a RESTful API that allows access to the core functionality of the platform and the Altum Brain.

Requests are made using the standard JSON format and responses are returned as JSON formatted responses.

We use standard HTTP response codes to denote success or failure. A successful response being code 200 whilst a failure due to a bad request will usually result in a 400 code.

With most of the API calls below, the user will need to provide an API key as authentication to the call. This is provided as part of each JSON request under the key "api_key". Requests that require an API key to be passed state @API Key Required below.

API Endpoint Address

https://platform.altumintelligence.com/api/

Authentication

In the form of your API key which can be found under your account in your online dashboard.
Please keep this key secret!

{ "api_key": "676b8437b5635e8c9a6449679da9f8cb" }

Request/Response Format

JSON

Status

Request Type: GET

Authentication Required: NO


Gets the current status of the API.

No authentication required.

Simple GET request returns the status of the API along with a timestamp of the request receipt

/status

Request Example:

GET https://platform.altumintelligence.com/api/status

Response Example:

{
  "status": "Alive",
  "timestamp": "Thu, 08 Mar 2018 11:55:32 GMT"
}

Credits

Request Type: POST

Authentication Required: YES


Function to request the amount of acount credits currently on your account.

To top your credits up, please visit the online platform dashboard.

/credits

Request Example:

POST https://platform.altumintelligence.com/api/credits
{
  "api_key": "676b8437b5635e8c9a6449679da9f8cb"
}

Response Example:

{
  "credits": 274.9964
}

Job Status

Request Type: POST

Authentication Required: YES


Function to fetch the status of a job, running or otherwise.

Jobs can also be viewed in the Altum Platform web dashboard under Jobs.

Input needs to have "job_id" with the ID of the job

/jobstatus

Request Example:

POST https://platform.altumintelligence.com/api/jobstatus
{
  "api_key": "676b8437b5635e8c9a6449679da9f8cb",
  "job_id": "j327f76bd344085a801df8d9c398c5a8c"
}

Response Example:

{
  "job_id": "j327f76bd344085a801df8d9c398c5a8c",
  "start_time": "Tue, 06 Mar 2018 13:13:20 GMT",
  "end_time": "Tue, 06 Mar 2018 13:18:29 GMT",
  "status": "SUCCEEDED"
}

List Jobs

Request Type: POST

Authentication Required: YES


Lists all jobs on users account, active or otherwise.

For each job, detailed information on job training specifications, hyperparameters and status is provided

/lsjobs

Request Example:

POST https://platform.altumintelligence.com/api/lsjobs
{
  "api_key": "676b8437b5635e8c9a6449679da9f8cb"
}

Response Example:

{
  "jobs": [
    {
      "_id": "jac248023d4b582d4c43f7167dcf0e505",
      "dataset": "iris-dataset",
      "end_time": "Sun, 11 Feb 2018 09:03:44 GMT",
      "hyperparams": {
        "epochs": "1000",
        "normalise": "true",
        "train_test_split": 0.8
      },
      "model": "Iris Model",
      "start_time": "Sun, 11 Feb 2018 08:57:12 GMT",
      "status": "SUCCEEDED",
      "user_id": "598b366de2970630d049ded1"
    },
    {
      "_id": "j3701990fe5d0244c3f39643ea173b0fe",
      "dataset": "iris-dataset",
      "end_time": "Tue, 06 Feb 2018 06:07:42 GMT",
      "hyperparams": {
        "batch_size": "1",
        "epochs": "150",
        "learn_rate": "0.01",
        "normalise": "true",
        "optimizer": "adam",
        "train_test_split": 0.8
      },
      "model": "Iris Model",
      "start_time": "Tue, 06 Feb 2018 06:01:33 GMT",
      "status": "CANCELLED",
      "user_id": "598b366de2970630d049ded1"
    }
  ]
}

List Data

Request Type: POST

Authentication Required: YES


Lists all datasets on the Altum Cloud for user account.

Each dataset is returned in a "datasets" list.

/lsdatasets

Request Example:

POST https://platform.altumintelligence.com/api/lsdatasets
{
  "api_key": "676b8437b5635e8c9a6449679da9f8cb"
}

Response Example:

{                          
  "datasets": [            
    "iris",
    "mnist",
    "spx-stock-history"
  ]     
}

List Models

Request Type: POST

Authentication Required: YES


Lists all Altum Brain models on the Altum Cloud for user account.

Each model is returned in a "models" list.

/lsmodels

Request Example:

POST https://platform.altumintelligence.com/api/lsmodels
{
  "api_key": "676b8437b5635e8c9a6449679da9f8cb"
}

Response Example:

{
  "models": [
    "Iris Model",
    "Test Predictor",
    "Stock Classification"
  ]
}

Delete Data

Request Type: POST

Authentication Required: YES


Deletes a given dataset from the users Altum Cloud account.

/deletedataset

Request Example:

POST https://platform.altumintelligence.com/api/deletedataset
{
  "api_key": "676b8437b5635e8c9a6449679da9f8cb",
  "dataset_name": "old_dataset"
}

Response Example:

{
  "message": "Dataset `old_dataset` deleted successfully"
}

Delete Model

Request Type: POST

Authentication Required: YES


Deletes a given model from the users Altum Cloud account.

/deletemodel

Request Example:

POST https://platform.altumintelligence.com/api/deletemodel
{
  "api_key": "676b8437b5635e8c9a6449679da9f8cb",
  "model_name": "old_model"
}

Response Example:

{
  "message": "Model `old_model` deleted successfully"
}

Train Model

Request Type: POST

Authentication Required: YES


Starts a model training job in the Altum Brain using a specified dataset.

Hyperparameters specified as part of the request

This process will create a job on the chosen machine tier, configure the job and run it until completion, error or user cancellation.

/train

Request Example:

POST https://platform.altumintelligence.com/api/train
{
  "api_key": "676b8437b5635e8c9a6449679da9f8cb",
  "model_name": "iris",
  "dataset": "iris-dataset",
    "tier": "GPU",
    "hyperparams": {
      "train_test_split": 0.8,
      "normalise": "true",
      "epochs": 500
  }
}

Response Example:

{
  "message": "Training job initiated. Job ID: j3701990fe5d0244c3f39643ea173b0fe",
  "job_status": "QUEUED:",
  "job_id": "j3701990fe5d0244c3f39643ea173b0fe"
}

Terminate Job

Request Type: POST

Authentication Required: YES


Terminates a running job manually.

This frees up allocation, however the users account will still be charged credits for the job run.

/terminatejob

Request Example:

POST https://platform.altumintelligence.com/api/terminatejob
{
  "api_key": "676b8437b5635e8c9a6449679da9f8cb",
  "job_id": "j3701990fe5d0244c3f39643ea173b0fe"
}

Response Example:

{
  "message": "Terminated Job ID: j3701990fe5d0244c3f39643ea173b0fe"
}

Run Prediction

Request Type: POST

Authentication Required: YES


Runs a prediction on a trained model.

This is the equivalent to doing a forward pass on a trained neural network.

Data supplied here should have category labels of the output categories specified and should omit any data dimension heades.

/predict

Request Example:

POST https://platform.altumintelligence.com/api/predict
{
  "api_key": "676b8437b5635e8c9a6449679da9f8cb",
  "model_name": "Iris Model",
    "categories": [
        "Setosa",
        "Versicolour",
        "Virginica"
    ],
    "data": [
        [5.4,3.9,1.3,0.4],
        [6.7,3.1,4.4,1.4],
        [6.9,3.2,5.7,2.3]
    ]
}

Response Example:

{
  "categories": [
    "Setosa",
    "Versicolour",
    "Virginica"
  ],
  "message": "Model predicted successfully",
  "prediction": [
    [
      0.9999998807907104,
      0.004096435848623514,
      7.82938877819106e-05
    ],
    [
      1.6283480874790257e-07,
      0.9968473315238953,
      0.001250529196113348
    ],
    [
      4.804145276038341e-11,
      0.009999602101743221,
      0.9931334853172302
    ]
  ]
}