Keen-io:我无法使用提取查询过滤器删除特殊事件

时间:2015-02-10 14:11:21

标签: keen-io

使用提取查询(使用解码后的url读取):

  

https://api.keen.io/3.0/projects/xxx/queries/extraction?api_key=xxxx&event_collection=dispatched-orders&filters=[ {" PROPERTY_NAME":" features.tradeId""操作":"当量"&#34 ; PROPERTY_VALUE":8581}]&安培;时区= 28800

返回

{
    result: [
      {
          mobile:  "13185716746",
          keen  :  {
                       timestamp: "2015-02-10T07:10:07.816Z",
                       created_at: "2015-02-10T07:10:08.725Z",
                       id: "54d9aed03bc6964a7d311f9e"
                   },
          data  :  {
                      itemId: 2130,
                      num: 1
                   },
          features: {
                      communityId: 2000,
                     dispatcherId: 39,
                          tradeId: 8581
                    }
      }
   ]
}

但如果我在删除查询网址中使用相同的过滤器(使用已解码的网址进行阅读):

  

https://api.keen.io/3.0/projects/xxxxx/events/dispatched-orders?api_key=xxxxxx&filters=[ {" PROPERTY_NAME":" features.tradeId""操作":"当量"&#34 ; PROPERTY_VALUE":8581}]&安培;时区= 28800

返回

{
    properties: {
       data.num: "num",
       keen.created_at: "datetime",
       mobile: "string",
       keen.id: "string",
       features.communityId: "num",
       features.dispatcherId: "num",
       keen.timestamp: "datetime",
       features.tradeId: "num",
       data.itemId: "num"
    }
}

请帮助我...

1 个答案:

答案 0 :(得分:3)

您似乎正在发出删除评论的GET请求。如果您对集合执行GET,则会返回Keen为该集合推断的架构。

您希望将上述内容作为DELETE请求发出。这是cURL命令:

curl -X DELETE "https://api.keen.io/3.0/projects/xxxxx/events/dispatched-orders?api_key=xxxxxx&filters=[{"property_name":"features.tradeId","operator":"eq","property_value":8581}]&timezone=28800"

请注意,您可能需要对JSON进行URL编码,如上文所述: