Power BI Technical Docs
Creating a new token for Power BI clients
In /tools/aws-deployer/lib/stacks/scheduled-exports/lambda/bin you will find a createToken.ts script.
- use
tsxto run the script and note the token given back.
IMPORTANT
Do not run createToken.ts if there is already a valid token in use. As this will replace that existing token. Only run it if you require a new token for all clients.
```bash
pnpm dlx tsx createToken.ts
```
Test the token using curl on small a export. Eg(pipeends)
bashcurl --request GET \ --url https://api.live-eu-central-1.kaarbontech.net/scheduled_exports/export/northampton/asset/pipeend/csv \ --header 'x-kt-export-token: <TOKEN-FROM-STEP-1>' \ --location --compressed
NOTE
--location needed to get curl to follow aws signed s3 url returned. Also because the response is gzipped --compressed will unzip the response for you.
- Update Token details if needed in 1password for client, if needed make stakeholders aware of the token updated.