Redirects
The Redirects system in Kinesis API provides a way to create and manage URL redirects within your application. This feature is useful for creating shortened URLs, handling legacy endpoints, or creating memorable links to complex resources.
Understanding Redirects
Each redirect in Kinesis API consists of:
- ID: A unique identifier for the redirect
- Locator: A short, unique code that forms part of the redirect URL
- URL: The destination where users will be redirected
When someone accesses a redirect URL (e.g., https://your-api.com/go/abc123
), they are automatically forwarded to the destination URL associated with that locator.
Accessing Redirects Management
To access the Redirects management interface:
- Log in to your Kinesis API account
- Navigate to
/web/redirects
in your browser or select "Redirects" from the navigation menu
Redirects Interface
The Redirects management interface includes:
- A searchable list of all redirects in the system
- Pagination controls for navigating through large redirect collections
- Actions for creating, updating, and deleting redirects
- Tools for copying redirect URLs for sharing
Creating a Redirect
To create a new redirect:
- Click the "Create a New Redirect" button at the top of the page
- Enter the destination URL in the field provided
- (Optional) Specify a custom locator in the "Custom Locator" field
- If left empty, the system will automatically generate a unique locator
- Custom locators must be unique across the system
- Click "Create" to generate the redirect
The system will use your custom locator if provided, or generate a unique locator code if none is specified. This locator forms part of the shortened URL, ensuring uniqueness and consistency across all redirects.
Using Redirects
After creating a redirect, you can use it by:
- Copying the redirect URL by clicking the clipboard icon next to the redirect
- Sharing this URL with others or using it in your applications
The redirect URL will be in the format:
https://your-api-domain.com/go/locator-code
When users access this URL, they will be automatically redirected to the destination URL you specified.
Managing Redirects
Filtering Redirects
To find specific redirects:
- Use the search box at the top of the redirects list
- Type any part of the locator code or destination URL
- The list will automatically filter to show matching redirects
Pagination
For systems with many redirects:
- Navigate between pages using the pagination controls
- The page displays up to 15 redirects at a time
Updating Redirects
To change a redirect's destination URL:
- Find the redirect in the list
- Click the edit button (pencil icon)
- Enter the new destination URL in the modal that appears
- Click "Submit" to save the changes
Note that only the destination URL can be updated. The locator code is set when the redirect is created and cannot be modified at any point. If you need a different URL pattern, you'll need to create a new redirect and delete the old one.
Deleting Redirects
To remove a redirect:
- Find the redirect in the list
- Click the delete button (trash icon)
- Confirm the deletion in the modal that appears
Once deleted, the redirect URL will no longer work, and users attempting to access it will receive an error.
Common Use Cases
Redirects in Kinesis API can be used for:
URL Shortening
Create more manageable, shorter URLs for sharing complex links:
https://your-api.com/go/product1 → https://your-api.com/products/catalog/electronics/smartphones/model-x-256gb-black
API Version Management
Provide stable URLs that can be updated when API endpoints change:
https://your-api.com/go/user-api → https://your-api.com/api/v2/users
Later, when you update to v3, you can simply update the redirect without changing the URL clients use.
Marketing Campaigns
Create memorable URLs for marketing campaigns:
https://your-api.com/go/summer-sale → https://your-api.com/shop/promotions/summer-2023?discount=25&campaign=email
Temporary Resources
Link to resources that might change location:
https://your-api.com/go/docs → https://docs.google.com/document/d/1abc123def456
Best Practices
For effective redirect management:
- Monitor Usage: Periodically review your redirects to identify and remove unused ones
- Avoid Redirect Chains: Try not to redirect to URLs that themselves redirect to other locations
- Security Awareness: Be cautious about redirecting to external sites that could pose security risks
- Regular Cleanup: Delete redirects that are no longer needed to keep your system organized