看板数据API 定义

Resource

GET /projects/:project_id/dashboards/:dashboard_id.json

Authorization

在 Header 里面添加两个属性:

名字 类型 描述 示例
X-Client-Id String GrowingIO 分配的公钥 X-Client-Id: 123abc
Authorization String 认证后获取到的 Token Authorization: Token xxxxxx

Response

Status Code: 200 OK

{
  id: "Dashboard Uid"
  name: "Dashboard Name",
  charts: [
    {
      id: "Chart Uid",
      name: "Chart Name",
      createor: "Chart Creator",
      createdAt: "Created Time"
    },
    {
      id: "Chart Uid",
      name: "Chart Name",
      createor: "Chart Creator",
      createdAt: "Created Time"
    }
  ]
}

单图数据API 定义

Resource

GET /projects/:project_id/charts/:chart_id.json

Authorization

在 Header 里面添加两个属性:

名字 类型 描述 示例
X-Client-Id String GrowingIO 分配的公钥 X-Client-Id: 123abc
Authorization String 认证后获取到的 Token Authorization: Token xxxxxx

Query Parameter

名字 类型 描述 示例
startTime integer 数据起始时间 1462118400000
endTime integer 数据结束时间 1462118400000
interval integer 数据间隔 86400000

Responses

Status Code: 200 OK

{
  id: "Chart Uid"
  name: "Chart Name",
  startTime: 1462118400000,
  endTime: 1462118400000,
  interval: 86400000,
  meta: [
    { name: '城市', dimension: true },
    { name: '浏览器', dimension: true },
    { name: 'Metric 1', metric: true },
    { name: 'Metric 2', metric: true }
  ],
  data: [
    // 线图
    [timestamp, metric1, metric2],
    [timestamp, metric1, metric2]

    // 横向柱图
    [dimension_v1, metric1],
    [dimension_v2, metric1]

    // 纵向柱图
    [timestamp, metric1, metrics2],
    [timestamp, metric1, metrics2]

    // 表格
    [dimension1_v1, dimension2_v1, metric1, metric2],
    [dimension1_v2, dimension2_v1, metric1, metric2]

    // 漏斗
    [metric1, metric2, metric3]

    // 聚合数字
    [metric1]

    // 气泡图
    [dimension_v1, metric1, metric2, metric3, metric4],
    [dimension_v2, metric1, metric2, metric3, metric4]

    // 双向柱图
    [dimension_v1, metric1],
    [dimension_v2, metric1]
  ]
}

分群 API 定义

Resource

GET /projects/:project_id/segmentations.json

Authorization

在 Header 里面添加两个属性:

名字 类型 描述 示例
X-Client-Id String GrowingIO 分配的公钥 X-Client-Id: 123abc
Authorization String 认证后获取到的 Token Authorization: Token xxxxxx

Query Parameter

Responses

Status Code: 200 OK

[
  {
    id: "Segmentation Uid",
    name: "Segmentation Name",
    userType: 'u',
    userNum: 1230,
    updatedAt: "2016-08-03"
  },
  {
    id: "Segmentation Uid",
    name: "Segmentation Name",
    userType: 'cs1',
    userNum: 1230,
    updatedAt: "2016-08-03"
  },
  ...
]

Resource

GET /projects/:project_id/segmentations/:segmentation_id/users.csv

Authorization

在 Header 里面添加两个属性:

名字 类型 描述 示例
X-Client-Id String GrowingIO 分配的公钥 X-Client-Id: 123abc
Authorization String 认证后获取到的 Token Authorization: Token xxxxxx

Query Parameter

Responses

Status Code: 200 OK CSV 文件以 Tab 分隔,内容是上传的 CS 属性字段

cs1_name    cs2_name    
12249    GrowingIO

规则逻辑 API 接口

Resource

GET /projects/:project_id/rules.csv

Authorization

在 Header 里面添加两个属性:

名字 类型 描述 示例
X-Client-Id String GrowingIO 分配的公钥 X-Client-Id: 123abc
Authorization String 认证后获取到的 Token Authorization: Token xxxxxx

Query Parameter

Responses

Status Code: 200 OK CSV 文件内容以 Tab 分隔

ruleId,eventName,eventType
f2503720,元素_注册按钮,clck

Status Code: 401 Unauthorized

{
  "message": "Unauthorized",
  "errors": []
}

Status Code: 500 Server Error

{
  "message": "Request timeout",
  "errors": [
    {
      "code": "request_timeout",
      "message": "Request timeout in 5000 milliseconds"
    }
  ]
}

results matching ""

    No results matching ""