Method : PUT

URI : /stream

Body :

{
   "schema":"website",
   "streams":[
      {
         "name":"visitor",
         "type":1,
         "swsz":86400,
         "inpt":[
            
         ],
         "attr":[
            {
               "name":"vid",
               "type":5,
               "sidx":1,
               "stat":"UCOUNT",
               "kysz":24
            },
            {
               "name":"prod",
               "type":5,
               "kysz":24
            },
            {
               "name":"catid",
               "type":5,
               "kysz":24,
               "stat":"COUNT"
            },
            {
               "name":"pgid",
               "type":5,
               "kysz":48,
               "sidx":1,
               "gran":300,
               "stat":"UCOUNT"
            },
            {
               "name":"price",
               "type":11,
               "stat":"RSTAT"
            },
            {
               "name":"items",
               "type":9,
               "stat":"RSTAT"
            }
         ],
         "catr":[
            {
               "name":"pred_sales",
               "type":11,
               "opnm":"PRED",
               "algo":"SVM",
               "attr_type":"HYB",
               "model":"sales_model",
               "iatr":[
                  "vid",
                  "pgid",
                  "catid",
                  "pgid",
                  "items",
                  "price"
               ]
            }
         ],
         "gpby":[
            {
               "gpat":[
                  "catid",
                  "pgid"
               ],
               "iatr":"vid",
               "stat":"COUNT",
               "gran":300,
               "kysz":64
            },
            {
               "gpat":[
                  "catid"
               ],
               "iatr":"vid",
               "stat":"UCOUNT",
               "gran":300,
               "kysz":64
            },
            {
               "gpat":[
                  "catid"
               ],
               "iatr":"price",
               "stat":"RSTAT",
               "gran":300,
               "kysz":64
            }
         ],
         "enty":[
            {
               "name":"prod_details_entity1",
               "opid":1,
               "ratr":[
                  "nview"
               ],
               "iatr":[
                  "vid"
               ],
               "pkatr":[
                  {
                     "name":"pk1",
                     "type":5,
                     "kysz":24,
                     "opid":1,
                     "iatr":[
                        "prod"
                     ]
                  }
               ],
               "rstm":"prod_details",
               "doc_buf_factor":50,
               "sync_ts":60
            },
            {
               "name":"prod_details_entity2",
               "opid":2,
               "ratr":[
                  "uvisit"
               ],
               "iatr":[
                  "vid"
               ],
               "pkatr":[
                  {
                     "name":"pk1",
                     "opid":1,
                     "type":5,
                     "iatr":[
                        "prod"
                     ]
                  }
               ],
               "rstm":"prod_details",
               "doc_buf_factor":50,
               "sync_ts":60
            },
            {
               "name":"prod_details_entity3",
               "opid":3,
               "ratr":[
                  "sales"
               ],
               "iatr":[
                  "price"
               ],
               "pkatr":[
                  {
                     "name":"pk1",
                     "opid":1,
                     "type":5,
                     "iatr":[
                        "prod"
                     ]
                  }
               ],
               "rstm":"prod_details",
               "doc_buf_factor":50,
               "sync_ts":60
            },
            {
               "name":"prod_details_entity4",
               "opid":3,
               "ratr":[
                  "total_items"
               ],
               "iatr":[
                  "items"
               ],
               "pkatr":[
                  {
                     "name":"pk1",
                     "opid":1,
                     "type":5,
                     "iatr":[
                        "prod"
                     ]
                  }
               ],
               "rstm":"prod_details",
               "doc_buf_factor":50,
               "sync_ts":60
            }
         ],
         "rels":[
            {
               "sub":"vid",
               "obj":"prod",
               "rel":"BUYS",
               "sub_props":[
                  "catid"
               ],
               "obj_props":[
                  "items"
               ],
               "rel_props":[
                  "price"
               ]
            }
         ]
      },
      {
         "name":"prod_details",
         "type":4,
         "inpt":[
            "visitor"
         ],
         "attr":[
            {
               "name":"pk1",
               "type":5,
               "kysz":24,
               "pk":1
            },
            {
               "name":"nview",
               "type":9,
               "stat":"COUNT"
            },
            {
               "name":"uvisit",
               "type":9,
               "stat":"COUNT"
            },
            {
               "name":"sales",
               "type":11,
               "stat":"RSTAT"
            },
            {
               "name":"total_items",
               "type":9,
               "stat":"RSTAT"
            }
         ]
      },
      {
         "name":"prod_details_1",
         "type":1,
         "inpt":[
            
         ],
         "attr":[
            {
               "name":"product",
               "type":5,
               "kysz":24
            },
            {
               "name":"price",
               "type":11,
               "stat":"RSTAT"
            },
            {
               "name":"total_items",
               "type":9,
               "stat":"RSTAT"
            }
         ]
      }
   ]
}

Response

{
    "errcode": 0
}