The URL alias is a feature to create custom aliases for URLs associated with the APIs. This provides a more user-friendly experience when accessing the service URL.
The URL aliases allow the users to simplify and enhance the readability of the URLs used in the Asset APIs. For example, instead of using complex and lengthy URLs, users can create custom aliases that are more aligned with their Asset name. It converts the “{asset_version_id}
” into user-friendly as “alias/{alias_name}
”.
Normal URL : {{baseUrl}}magicplatform/v1/invokeasset/{asset_version_id}/usecase
Alias URL : {{baseUrl}}magicplatform/v1/invokeasset/alias/{alias_name}
Additionally, URL aliases allow the users to consume different versions of an Asset via a single API. Users have the option to create the URL aliases, which helps them access multiple versions of an Asset without requiring to deploy their respective APIs. This reduces the need for multiple deployments to access different Asset versions.
This section in the Administration module allows you to create and manage the URL aliases on the platform. The following are the operations that you can perform in the URL aliases section and you must have the Administrator policy to perform these operations:
Create URL aliases
- Head to the Administration module and then select URL aliases.
- In the URL aliases tab, click Create new.
- On the URL new aliases page that appears, enter a unique Alias name.
Note: Modifying Alias name is not applicable once the URL alias is created.
- In the Asset Mapping section, select the desired Assets and its Version to consume.
- Click Submit to create the URL alias.
Note: Once the URL alias is created, you can download the API and its documentation. For more information on how to download the API, see Download API.
Download API
- Head to the Administration module and then select URL aliases.
- In the URL aliases tab, select the required Alias.
- On the URL aliases information page that appears, click
and select Download API to download its API.
Note: You can consume the upgraded versions of an Asset using the same API. To consume different versions of an asset, you need to map the respective version in Asset Mapping.
The Downloaded API can be consumed independently. If you wish to consume this Asset via API, see Consume an Asset via API.
Edit URL aliases
This section provides instructions on how to edit URL aliases on the platform. You can modify only the Asset Mapping information in this section.
- Head to the Administration module and select URL aliases.
- In the URL aliases tab, select the Alias for which you wish to modify the information.
- On the User alias information page that appears, click Edit.
- Make the desired Asset mapping with the respective Assets and its Version then click Submit.
Note: Modifying Asset Mapping information will not affect the existing API information.
Delete URL aliases
This section provides instructions on how to delete existing URL aliases from the platform.
- Head to the Administration module and select URL aliases.
- In the URL aliases tab, select the URL alias you wish to delete.
- On the URL aliases information page that appears, click
and then select Delete.
Note: Deleting a URL alias is not possible while the Asset is being consumed.