Skip to content
Download as .md

Export to Postman

Written by Rohman Beny Riyanto

The Postman button in the top navigation bar downloads the entire API

  • every command and query currently registered - as a ready-to-import Postman collection, generated client-side from the same data this whole reference site is built from. It never drifts from what's actually registered on the live server, the same way the rest of this site doesn't (see Request/Response Pattern).

What you get

Clicking it downloads a single .zip containing two files:

  • <site>.postman_collection.json - every endpoint, organized into the same group/subgroup folders as this site's own sidebar (e.g. Admin > Permissions > Grant Role Permission).
  • <site>.postman_environment.json - two variables, baseUrl and token, both empty except baseUrl (pre-filled with whichever API origin this site itself is configured against).

Setup (one-time, per Postman workspace)

  1. In Postman: Import → drag in both files from the zip.
  2. Select the imported environment (top-right environment dropdown) so / actually resolve - requests reference them as variables, not hardcoded values.
  3. If baseUrl isn't already pointing where you want (local/dev/prod), edit it in the environment.

You don't have to paste your token in manually

Unified Login, Unified Refresh, Guest Login, Guest Upgrade, Device Player Login, and Device Player Refresh each carry a Postman test script that runs automatically after the response comes back:

js
try {
  const json = pm.response.json();
  const token = json?.data?.access_token || json?.access_token;
  if (token) pm.environment.set('token', token);
} catch (e) {}

Run Unified Login once with real credentials, and is set for every other request in the collection immediately - no copy-pasting access_token out of a response body by hand.

Every request already has Authorization wired up

Requests from endpoints tagged Auth required on the API Reference pages already carry Authorization: Bearer - it's just disabled (grayed out, not deleted) on endpoints that don't need it, so toggling it on/off per request if you ever need to test an endpoint's auth requirement manually is a single checkbox in Postman, not retyping the header.

Re-export after the API changes

This isn't a one-time snapshot - if new endpoints get added or existing ones change, click Postman again for a fresh zip. There's no versioning/diffing between exports; re-importing simply overwrites whatever you had before with the current live shape.