Shortlinks
Purpose
Create compact redirect codes for long HTTPS URLs and resolve code-to-URL paths.
When To Use
Use when URLs are too long to share directly (for example presigned object links).
Inputs
- •
enabler bundlehas already populated.enabler/connection.json. - •
enabler credentialshas already populated.enabler/credentials.json. - •
ENABLER_COGNITO_USERNAME,ENABLER_COGNITO_PASSWORD,ENABLER_API_KEY.
Workflow
- •Create a short code for a target URL:
bash
./enabler shortlinks create "https://example.com/path/file.txt"
- •Create a named alias:
bash
./enabler shortlinks create "https://example.com/path/file.txt" --alias ticket-link
- •Resolve a code into a full redirect URL:
bash
./enabler shortlinks resolve-url ticket-link
- •Inspect raw JSON output (if needed):
bash
./enabler shortlinks create "https://example.com/path/file.txt" --json # Compact JSON variant ./enabler --plain-json shortlinks create "https://example.com/path/file.txt" --json
Outputs
- •A short
code. - •A resolvable URL under
connection.shortlinks.redirectBaseUrl.
Guardrails
- •
target_urlmust behttps://. - •Treat short codes as secrets when they point at presigned targets.
- •Run
enabler bundleagain if endpoints in.enabler/connection.jsonare stale.
References
- •
../../artifacts/README.md