1.0.2 • Published 4 years ago

onsearch-cli v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Onsearch CLI

Login

COMMAND : onsearch login

Description : Interactive login via token. It will open browser and from your browser you have to copy token and paste in CLI.

Sucess response

Login success

Getting current logged in user info

COMMAND : onsearch me

Description : Getting current logged in user info

Success response

{
  "me": {
    "name": "John Doe",
    "createdAt": "1597993378183",
    "email": "johndoe@gmail.com",
    "firebaseId": "firebase_id",
    "id": "id",
    "profilePictureUrl": null,
    "updatedAt": "1597993407247"
  }
}

Projects list

COMMAND : onsearch projects list

Description : Getting list of projects for current logged in user.

Success Response

{
  "projects": [
    {
      "name": "test project",
      "id": "5f3f71aeddd952003fef6ddf",
      "active": true,
      "archived": false,
      "createdAt": "1597993390864",
      "updatedAt": "1598244282582"
    },
  ]
}

Create project

COMMAND : onsearch projects create

Params :

Short flagLong flagDefaultDescription
-n--project_nameName of the project

Success response

{ 
  "name": "demoproject",
  "id": "project_id",
  "active": true,
  "archived": false,
  "createdAt": "1598248018190",
  "updatedAt": "1598248018190"
}

Project by id

COMMAND : onsearch project

Params :

Short flagLong flagDefaultDescription
-i--idId of the project

Success response

{
    "project": {
        "name": "demoproject",
        "id": "project_id",
        "active": true,
        "archived": false,
        "createdAt": "1598248018190",
        "updatedAt": "1598248018190"
    }
}

Models list

COMMAND : onsearch models list

Description : Get list of models

Params :

Short flagLong flagDefaultDescription
-p--project_idId of the project
-i--interactiveEnable interactive mode

Success response

[
  {
    "cpu": 1,
    "id": "id",
    "name": "testmodal",
    "ram": 1,
    "status": "created"
  },
  {
    "cpu": 1,
    "id": "id",
    "name": "testmodal",
    "ram": 1,
    "status": "created"
  },
]

Model create

COMMAND : onsearch models create

Description : Create model

Params :

Short flagLong flagDefaultDescription
-c--cpu1CPU for the model
-m--model_nameName of model
-r--ram1Ram for the model
-p--project_idProject id
-i--interactiveEnable interactive mode

Deploy model

COMMAND : onsearch models deploy

Description : Deploy machine learning model

Params :

Short flagLong flagDefaultDescription
-f--file_path1Model file path (absolute or relative)
-m--model_idModel id
-p--project_idProject id
-i--interactiveEnable interactive mode

Success response

Model has been uploaded !!!

Collection list

COMMAND : onsearch collections list

Description : List all the collection from particular project

Params :

Short flagLong flagDefaultDescription
-p--project_idProject id
-i--interactiveEnable interactive mode

Success response :

[
  {
    "archived": false,
    "changed": false,
    "changedAt": "1598244269489",
    "encodedAt": "1598244282582",
    "encoding": false,
    "encodingAt": "1598244278361",
    "id": "id",
    "index":"index_id",
    "searchableFields": [  ],
    "syncAt": null,
    "syncedAt": "1598244208826",
    "syncing": false,
    "syncingAt": "1598244208183",
    "name": "My First Collection"
  }
]

Collection create

COMMAND : onsearch collections create

Description : Create collection

Params :

Short flagLong flagDefaultDescription
-p--project_idProject id
-c--collection_nameCollectio name
-i--interactiveEnable interactive mode

Success response :

{
  "archived": false,
  "changed": false,
  "changedAt": null,
  "encodedAt": null,
  "encoding": false,
  "encodingAt": null,
  "id": "ec4dfabc-eeeb-40f5-9018-843f7b726549",
  "index": null,
  "searchableFields": [],
  "syncAt": null,
  "syncedAt": null,
  "syncing": false,
  "syncingAt": null,
  "name": "testcollection"
}