Ada from BoostKPI

Ada from BoostKPI · Ações GPT

BoostKPI Dashboard

BoostKPI Dashboard REST endpoints

  • POST /api/dan-gpt/create-tokenGets a dataset upload link for the user to use.
  • GET /api/dan-gpt/drilldownDrills down into combinations of dimenstions to find slices with significant change in the provided KPI between the current and baseline time periods.
  • GET /api/dan-gpt/dimension-breakdownLists how a single KPI has changed for every dimension between the two time periods.
  • POST /api/dan-gpt/kpi-breakdownLists how every KPI has changed for a single dimension between the two time periods.
  • GET /api/dan-gpt/heatmapBoostKPI heatmap visualizes positive and negative changes and size in contribution to KPIs
Esquema API original
{
  "openapi": "3.0.0",
  "info": {
    "description": "BoostKPI Dashboard REST endpoints",
    "version": "1.0",
    "title": "BoostKPI Dashboard",
    "contact": {
      "email": "contact@boostkpi.com"
    }
  },
  "servers": [
    {
      "url": "https://dashboard.boostkpi.com"
    }
  ],
  "paths": {
    "/api/dan-gpt/create-token": {
      "post": {
        "summary": "Gets a dataset upload link for the user to use.",
        "operationId": "getUploadLink",
        "requestBody": {
          "description": "Information about the columns of the csv file the user is planning to upload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "colInfo": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "index": {
                          "type": "integer"
                        },
                        "userType": {
                          "type": "string",
                          "enum": [
                            "TIMESTAMP",
                            "DATE",
                            "STRING",
                            "NUMBER"
                          ]
                        }
                      },
                      "required": [
                        "name",
                        "index",
                        "userType"
                      ]
                    }
                  }
                },
                "required": [
                  "colInfo"
                ]
              }
            }
          }
        }
      }
    },
    "/api/dan-gpt/drilldown": {
      "get": {
        "summary": "Drills down into combinations of dimenstions to find slices with significant change in the provided KPI between the current and baseline time periods.",
        "operationId": "buildSummary",
        "parameters": [
          {
            "name": "datasetKey",
            "in": "query",
            "required": true,
            "description": "The key of the dataset to investigate. This should be a value returned by createDataset.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kpiName",
            "in": "query",
            "required": true,
            "description": "The name of the KPI to compare for the two time periods. This should be a numeric column from the csv file",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currentStartDate",
            "in": "query",
            "required": true,
            "description": "The start date of the current time period.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "currentEndDate",
            "in": "query",
            "required": true,
            "description": "The end date of the current time period. This date is exclusive.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "baselineStartDate",
            "in": "query",
            "required": true,
            "description": "The start date of the baseline comparison time period.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "baselineEndDate",
            "in": "query",
            "required": true,
            "description": "The end date of the baseline time period. This date is exclusive.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "description": "Filters to apply to the dataset based on dimensions. Each key is a dimension name, and the value is the filter value for that dimension. Use this to dynamically filter\n      the dataset for specific analyses. For example, to filter by country equal to \"US\", you can specify {\"country\": \"US\"}.",
            "schema": {
              "type": "string"
            },
            "example": "{ \"country\": \"US\" }"
          }
        ],
        "responses": {
          "default": {
            "description": "successful operation"
          }
        }
      }
    },
    "/api/dan-gpt/dimension-breakdown": {
      "get": {
        "summary": "Lists how a single KPI has changed for every dimension between the two time periods.",
        "operationId": "dimensionBreakdown",
        "parameters": [
          {
            "name": "datasetKey",
            "in": "query",
            "required": true,
            "description": "The key of the dataset to investigate. This should be a value returned by createDataset.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kpiName",
            "in": "query",
            "required": true,
            "description": "The name of the KPI to compare for the two time periods. This should be a numeric column from the csv file",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currentStartDate",
            "in": "query",
            "required": true,
            "description": "The start date of the current time period.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "currentEndDate",
            "in": "query",
            "required": true,
            "description": "The end date of the current time period. This date is exclusive.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "baselineStartDate",
            "in": "query",
            "required": true,
            "description": "The start date of the baseline comparison time period.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "baselineEndDate",
            "in": "query",
            "required": true,
            "description": "The end date of the baseline time period. This date is exclusive.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "description": "Specifies advanced filtering criteria as a JSON-encoded string. Each filter object within the array can define 'included' or 'excluded' values for a given 'label' (dimension), allowing for the inclusion or exclusion of specific dimension values. Filters are applied sequentially. Example: [{\\\"label\\\":\\\"brand\\\",\\\"included\\\":[\\\"BALEGA\\\"]},{\\\"label\\\":\\\"brand\\\",\\\"excluded\\\":[\\\"CHACO\\\"]}] specifies to include 'BALEGA' and exclude 'CHACO' brands. Use the #/components/schemas/Filter object format.",
            "schema": {
              "type": "string"
            },
            "example": "[{\"label\":\"channel\",\"included\":[\"android\"]}]"
          }
        ],
        "responses": {
          "default": {
            "description": "successful operation"
          }
        }
      }
    },
    "/api/dan-gpt/kpi-breakdown": {
      "post": {
        "summary": "Lists how every KPI has changed for a single dimension between the two time periods.",
        "operationId": "kpiBreakdown",
        "requestBody": {
          "description": "Provides breakdown table for each available KPI and information how the KPI has changed for each dimension between selected time period and its offset.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dimension": {
                    "type": "string",
                    "description": "The dimension to group by for the KPI breakdown."
                  },
                  "datasetKey": {
                    "type": "string",
                    "description": "The key of the dataset to investigate. This should be a value returned by createDataset."
                  },
                  "currentStartDate": {
                    "type": "string",
                    "description": "The start date of the current time period.",
                    "schema": {
                      "type": "string",
                      "format": "date"
                    }
                  },
                  "currentEndDate": {
                    "type": "string",
                    "description": "The end date of the current time period. This date is exclusive.",
                    "schema": {
                      "type": "string",
                      "format": "date"
                    }
                  },
                  "baselineStartDate": {
                    "type": "string",
                    "description": "The start date of the baseline time period (historical data period that is compared to the newer date range period). The baseline start date must be before current start date.",
                    "schema": {
                      "type": "string",
                      "format": "date"
                    }
                  },
                  "filters": {
                    "description": "An array of filters to apply to the dataset.",
                    "schema": {
                      "type": "array"
                    },
                    "items": {
                      "$ref": "#/components/schemas/Filter"
                    }
                  }
                },
                "required": [
                  "dimension",
                  "datasetKey",
                  "currentStartDate",
                  "currentEndDate",
                  "baselineStartDate"
                ]
              }
            }
          }
        }
      }
    },
    "/api/dan-gpt/heatmap": {
      "get": {
        "summary": "BoostKPI heatmap visualizes positive and negative changes and size in contribution to KPIs",
        "operationId": "kpiHeatmap",
        "parameters": [
          {
            "name": "datasetKey",
            "in": "query",
            "required": true,
            "description": "The key of the dataset to investigate. This should be a value returned by createDataset.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kpiName",
            "in": "query",
            "required": true,
            "description": "The name of the KPI to compare for the two time periods. This should be a numeric column from the csv file",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currentStartDate",
            "in": "query",
            "required": true,
            "description": "The start date of the current time period.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "currentEndDate",
            "in": "query",
            "required": true,
            "description": "The end date of the current time period. This date is exclusive.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "baselineStartDate",
            "in": "query",
            "required": true,
            "description": "The start date of the baseline comparison time period.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "baselineEndDate",
            "in": "query",
            "required": true,
            "description": "The end date of the baseline time period. This date is exclusive.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "description": "Specifies advanced filtering criteria as a JSON-encoded string. Each filter object within the array can define 'included' or 'excluded' values for a given 'label' (dimension), allowing for the inclusion or exclusion of specific dimension values. Filters are applied sequentially. Example: [{\\\"label\\\":\\\"brand\\\",\\\"included\\\":[\\\"BALEGA\\\"]},{\\\"label\\\":\\\"brand\\\",\\\"excluded\\\":[\\\"CHACO\\\"]}] specifies to include 'BALEGA' and exclude 'CHACO' brands.",
            "schema": {
              "type": "string"
            },
            "example": "[{\"label\":\"brand\",\"included\":[\"BALEGA\"]},{\"label\":\"brand\",\"excluded\":[\"CHACO\"]}]"
          }
        ],
        "responses": {
          "default": {
            "description": "successful operation"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Filter": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "Name of the dimension to apply filter on."
          },
          "included": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of dimension values to include in the analysis. If empty, all values are included except those specified in 'excluded'."
          },
          "excluded": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of dimension values to exclude from the analysis"
          }
        },
        "description": "Defines a filter for including or excluding specific dimension values in the analysis.",
        "required": [
          "label"
        ]
      }
    }
  }
}