How to use Smart API

These are Following Steps to use Smart API

  1. After Generate the APIs 4 APIs  Create, Read, Update and Delete are Created

  2. Your API Name, Project Name and Following information is showing on the Dashboard including API Key and CRUD Type

  3. CRUD column contains C, R, U, D values which defines the APIs operation type

  4. You have to Copy the API Key

  5. Paste your API Key after the URL
    Example -> https://smartapi.nikusoft.com/beta/api/YOUR_API_KEY

  1. Enter this URL in POSTMAN or Thunder Client

  2. And send the required Data on request Body in JSON format

How to use Smart API

8. JSON Data format for Request Body

For Read

{
  "columns":["column-1","column-2","column-3"],  // enter "*" to get all columns 
  "where":[
    {
      "column_name":"my-col-name",
      "value":"my-col-value",
      "condition":"OR"  // put condition only if you have multiple columns in Where clause 
    },
    {
      "column_name":"another-col-name",
      "value":"my-col-value"
    }
  ],
  "orderby":{
    "column_name":"my-col-name",
    "order":"ASC"
  },
  "limit":[4,1] // [limit, skip]
}
 
For Create
 
{
    // column_name : value
    "first_name":"Avengers",
    "last_name":"Endgame"
}
 
For Update
 
{
    "set":{
        "first_name":"Iron-Man",
        "last_name":"Avengers"
    },
    "where":{
        "first_name":"Iron Man"
    }
}
 
For Delete
 
{
    "where":[
        {
            "column_name":"first_name",
            "value":"Avengers",
            "condition":"AND"
        },
        {
            "column_name":"last_name",
            "value":"Avengers"
        }
    ]
}

Login
ADS CODE