Skip to content

Project Setup

update .env

You need to add the following to your .env for connecting the endpoint:

APP_API_VERSION=2
APP_API_ENDPOINT=https://0g2zx35c8g.execute-api.eu-central-1.amazonaws.com/stage
APP_API_KEY=g8cokYNEvw5lzMEyr3hzP1Jn1agMwW5oazpZHCH3

endpoint

You get the data from the endpoint by calling:

regular chart

const { data, error, response } = await client.get("/v2/unified/chart", {
  headers: {
    "Content-Type": "application/json",
  },
  params: {
    query: {
      serviceType = "statistic",
      id,
    },
  },
});

minified chart

const { dataMinified, error, response } = await client.get(
  "/v2/unified/preview/chart",
  {
    headers: {
      "Content-Type": "application/json",
    },
    params: {
      query: {
        serviceType = "statistic",
        id,
      },
    },
  }
);