Version 2021

Deep Link to Library from Other Applications on iOS

Library Mobile supports deep linking from other applications. The deep links can be used to target dossiers, bookmarks, and even filtered contents with the Library Mobile app. This topic describes how to construct the URL for the Web and Mobile scheme and distribute it to end users.

Deep Link URL Structure

Dossier URLs should have the following structure:

https://<EnvironmentFQDN>/<LibraryAppContext>/app/<ProjectID>/<DossierID>/<PageKey>

Example:

https://test.microstrategy.com/MicroStrategyLibrary/app/EC70648611E7A2F962E90080EFD58751/837B57D711E941BF000000806FA1298F/K53--K46

Dossier URL with a Bookmark

You can generate a dossier URL that contains a bookmark.

  1. Open a dossier in Library.
  2. Choose Share and Export > Share Dossier.
  3. Select the bookmark you want to include and copy the generated URL link.

    The generated URL should be in the following format:

    https://<EnvironmentFQDN>/<LibraryAppContext>/app/<ProjectID>/<DossierID>/bookmarks?ids=<BookmarkID>

Dossier URL with Filters

You can target a dossier with filters by appending a <FilterExpression> to the dossier URL. The <FilterExpression> is simple encoded JSON that specifies the filters to target and the corresponding elements to apply.

https://<EnvironmentFQDN>/<LibraryAppContext>/app/<ProjectID>/<DossierID>/<PageKey>?dossier.filters=<EncodedFilterExpression>

Attribute Filter Example

  • Attribute filter with the name "Category"
  • Filter on element names: "Electronics" and "Music"
[
	{
		"name": "Category",			
		"selections": [
			{
				"name": "Electronics"
			},
			{
				"name": "Music"
			}
		]
	}
]

Metric Qualification Filter Example

  • Metric filter with the name, "Revenue"
  • Qualifications between 300000 and 500000
[
	{
		"name": "Revenue",			
		"qualifier":"Between",
		"constants":
		[
			"300000",
			"500000"
		]
	}
]

Multiple Filters Example

A filter expression also supports multiple filters. This example combines the two previous filters into one expression.

[
	{
		"name": "Category",			
		"selections": [
			{
				"name": "Electronics"
			},
			{
				"name": "Music"
			}
		]
	},
	{
		"name": "Revenue",			
		"qualifier":"Between",
		"constants":
		[
			"300000",
			"500000"
		]
	}
]

Here is an example of the filter expression above, encoded and appended to the dossier URL:

https://test.microstrategy.com/MicroStrategyLibrary/app/EC70648611E7A2F962E90080EFD58751/837B57D711E941BF000000806FA1298F/K53--K46?dossier.filters=%5B%0A%09%7B%0A%09%09%22name%22%3A%20%22Category%22%2C%09%09%09%0A%09%09%22selections%22%3A%20%5B%0A%09%09%09%7B%0A%09%09%09%09%22name%22%3A%20%22Electronics%22%0A%09%09%09%7D%2C%0A%09%09%09%7B%0A%09%09%09%09%22name%22%3A%20%22Music%22%0A%09%09%09%7D%0A%09%09%5D%0A%09%7D%2C%0A%09%7B%0A%09%09%22name%22%3A%20%22Revenue%22%2C%09%09%09%0A%09%09%22qualifier%22%3A%22Between%22%2C%0A%09%09%22constants%22%3A%0A%09%09%5B%0A%09%09%09%223000000%22%2C%0A%09%09%09%225000000%22%0A%09%09%5D%0A%09%7D%0A%5D

Advanced Cases

While you can use names to specify filters most of the time, you can also use filter keys for advanced cases, such as supporting localized filter names in the metadata internalization. Using the MicroStrategy REST API, you can retrieve information about the filter applied in each chapter in a specific dossier.

  1. Browse the MicroStrategy REST API.
  2. Retrieve a filter key from a chapter, within a specific dossier, using the MicroStrategy REST API.

Filter Key Example

  • Attribute filter with the name "Category" and filter key "W887"
  • Filter on element names "Electronics" and "Music"
[
	{
		"key": "W887",			
		"selections": [
			{
				"name": "Electronics"
			},
			{
				"name": "Music"
			}
		]
	}
]

Deep Link for Mobile

For Library Mobile, you can simply append the dossier URL described above (<DossierURL>) to the Mobile URL schema or leverage iOS Universal Link.

Mobile URL Scheme

dossier://?url=<DossierURL>

iOS Universal Link

iOS Universal Link can be used to seamlessly redirect a Web URL, such as <DossierURL>, to an installed app on a device without going through Safari. This is accomplished by establishing a secure association between domains and your app. To use iOS Universal Link, compile the SDK build by following the instructions in Supporting Associated Domains on the Apple Developer site.