Before you begin
- Initialize the TypeScript or Python client on your server with an API key.
- Create a policy template in the Developer Portal and copy its policy ID.
Fetch a template
The following examples use your initializedswig client and policy ID.
TypeScript
GET /wallet/policies/{policyId} on the hosted API.
TypeScript returns the policy metadata directly; Python exposes a Policy
object and normalizes its top-level field names to snake case.
This SDK lookup returns initial-user policy metadata and recovery fields;
it does not return the additional users saved in the portal template. Keep
the authorities and actions needed for your add-role requests in your
application’s configuration. See Policy Templates
for the wallet-creation and additional-user setup boundaries.
Understand the result
The response describes stored configuration. For example, a template created in the portal gives its initial user full root access. The TypeScript client preserves the API’s wallet-authority shape:actions list contains saved action data. See
Permissions for the meaning of each grant, its
units, and the Developer SDK inputs used when adding a role.
Policy response actions use stored action names and fields. When adding a
role, map them to the typed SDK inputs shown in the reference rather than
forwarding stored action data unchanged.
To inspect the authorities and permissions currently attached to a wallet,
use Read Wallet State.
Handle read errors
The TypeScript client throwsSwigDeveloperSdkError for failed API requests:
401 or 403 responses. For a
404, check that the policy ID exists and is visible to the caller. See
Developer API Errors for other response statuses.

