Your API key

API Documentation

Retrieves all datasets personal and public

Example response
                    {
                      "personal_datasets": [
                          "datatab.xlsx",
                          "file_example_XLSX_100.xlsx",
                          "file_example_XLS_50.xls",
                          "fuel_prices_52.csv",
                          "iris.csv",
                          "test.xlsx"
                      ],
                      "public_datasets": [
                          "iris.csv"
                      ]
                  }
                

Returns the content of the dataset and the numerical columns that can be used for the k-means

Example response
                  {
                    "items": [
                        {
                            "Gender": "Male",
                            "Age": 48,
                            "Salary": 1000
                        },
                        {
                            "Gender": "Male",
                            "Age": 33,
                            "Salary": 1500
                        },
                        {
                            "Gender": "Female",
                            "Age": 29,
                            "Salary": 2000
                        },
                        {
                            "Gender": "Male",
                            "Age": 52,
                            "Salary": 3500
                        },
                        {
                            "Gender": "Female",
                            "Age": 41,
                            "Salary": 2200
                        },
                        {
                            "Gender": "Female",
                            "Age": 39,
                            "Salary": 1800
                        }
                    ],
                    "numerical_columns": [
                        "Age",
                        "Salary"
                    ]
                }
              

Returns the SSEs for the given clusters and a suggested k

Request body example
                      {
                      "dataset":"sample.csv",
                      "dataset-type":"personal",
                      "clusters":"5",
                      "columns":["Age","Salary"],
                      "apikey":"0a8366a07c0d8fccc48bab2e657f12d0"               
                   }
Response Example
                      {
                      "sse": [
                          "1.2898762444864522",
                          "0.5491175803402647",
                          "0.23902558286074355",
                          "0.05170359168241964",
                          "0.016580718336483915"
                      ],
                      "suggested-k": "2"
                  }

Returns the cluster assignment for a given dataset

Request body example
                      {
                      "dataset":"sample.csv",
                      "dataset-type":"personal",
                      "clusters":"5",
                      "columns":["Age","Salary"],
                      "apikey":"0a8366a07c0d8fccc48bab2e657f12d0"               
                   }
Response Example
                      {
                        "items": [
                            {
                                "Age": "48",
                                "Salary": "1000",
                                "cluster": "3"
                            },
                            {
                                "Age": "33",
                                "Salary": "1500",
                                "cluster": "4"
                            },
                            {
                                "Age": "29",
                                "Salary": "2000",
                                "cluster": "5"
                            },
                            {
                                "Age": "52",
                                "Salary": "3500",
                                "cluster": "2"
                            },
                            {
                                "Age": "41",
                                "Salary": "2200",
                                "cluster": "1"
                            },
                            {
                                "Age": "39",
                                "Salary": "1800",
                                "cluster": "1"
                            }
                        ]
                    }

Uploads a file

valid files are {csv,xls,xlsx}

content type must be form-data

Request example
                    form-data:
                    dataset:{file},
                    dataset-type:{personal|public},
                    apikey:{apikey}
                   
Response Example
                      { "message"=>"file uploaded."}
                    

Deletes the given dataset

Request example
                    {
                      "dataset":"sample.csv",
                      "dataset-type":"personal",
                      "apikey":"0a8366a07c0d8fccc48bab2e657f12d0"               
                   }
Response Example
                      { "message"=>"dataset deleted."}
                    

Registers a user

Request example
                    {
                      "email":"example@email.com",
                      "password":"verysecret123",
                      "fname":"Konstantinos",
                      "lname":"Hliadhs"           
                   }
Response Example
                      { "message"=>"User registered."}
                    

Login user

Request example
                    {
                      "email":"example@email.com",
                      "password":"verysecret123"       
                   }
Response Example
                      { "email":"example@email.com",
                        "fname":"Konstantinos",
                        "lname":"Hliadhs",  
                        "apikey":"0a8366a07c0d8fccc48bab2e657f12d0"}
                    

Edits user info

Request body example
                    {
                      "fname":"Kostas",
                      "password":"verysecret12345",
                      "apikey":"0a8366a07c0d8fccc48bab2e657f12d0"   
                   }

Deletes a user given the apikey

Request example
                    {
                      "apikey":"0a8366a07c0d8fccc48bab2e657f12d0"
                    }