Skip to content
liu zhuo edited this page Apr 10, 2014 · 9 revisions
  • url: api.aqueducts.baidu.com

时间区间表示格式

Absolute Dates

  • yyyy-MM-dd HH:mm:ss.SSS : 2013-08-11 00:00:00.000
  • yyyy-MM-ddTHH:mm:ss.SSSZ : 2013-08-13T18:45:00.000Z

Relative Dates

  • now : now
  • Last 12 hours : -12h
  • Last 5 minutes : -5m
  • Last 30 seconds : -30s

v1

endpoint: products

查询注册的所有产品线

http://api.aqueducts.baidu.com/v1/products

查询具体的产品线(im产品)

http://api.aqueducts.baidu.com/v1/products/im

查询具体产品线下包含的服务(im产品)

http://api.aqueducts.baidu.com/v1/products/im/services

endpoint: events

查询近2个小时的im产品线router服务的page view

http://api.aqueducts.baidu.com/v1/events?product=im&service=router&item=page_view&calculation=count&from=-1m&to=now
  1. events : endpoint
  2. product : 产品线名称
  3. service : 服务名称
  4. item : 计算项
  5. calculation : 计算方法
  6. from : 时间区间起始
  7. to : 时间区间终止

v2

endpoint: products

查询注册的所有产品线

http://api.aqueducts.baidu.com/v2/products

结果:[{"name":"im","id":1},{"name":"sf","id":2},{"name":"lbs","id":3},{"name":"jpaas","id":4},{"name":"nova","id":5},{"name":"bfe","id":6},{"name":"ps","id":7},{"name":"storm","id":8},{"name":"netdisk","id":9},{"name":"hao123","id":10},{"name":"aqueducts","id":11},{"name":"www","id":12}]

查询具体的产品线(im产品)

http://api.aqueducts.baidu.com/v2/products/1

结果:{"id":1,"name":"im"}

查询具体产品线下包含的服务(im产品)

http://api.aqueducts.baidu.com/v1/products/1/services

结果:[{"id":58,"name":"router"}]

查询具体product,service下的job

http://api.aqueducts.baidu.com/v2/products/1/services/58/jobs

结果:[{"name":"im_router_page_view_count","id":1,"product_id":1,"service_id":58,"item_id":1,"calculation_id":1},{"name":"im_router_response_time_average","id":2,"product_id":1,"service_id":58,"item_id":2,"calculation_id":2},{"name":"im_router_response_time_percent80","id":3,"product_id":1,"service_id":58,"item_id":2,"calculation_id":3}]

endpoint: items

查询所有的items

http://api.aqueducts.baidu.com/v2/items

结果:[{"name":"page_view","id":1},{"name":"response_time","id":2}]

查询指定items下的calculations

http://api.aqueducts.baidu.com/v2/items/2/calculations

结果: [{"name":"average","id":2},{"name":"percent80","id":3}]

endpoint: calculations

查询所有的calculations

http://api.aqueducts.baidu.com/v2/calculations

结果:[{"name":"count","id":1},{"name":"average","id":2},{"name":"percent80","id":3}]