Use URL parameters
Experience Builder allows you to add URL parameters to your apps. You can use URL parameters to enhance an experience by making the URL set a locale, direct to a specific page, activate the print preview, and more.
Parameters are added to the end of the URL and are formatted as key-value pair connected with an equal sign. Experience Builder apps support parameters that are query strings, meaning they start with a question mark. To include multiple parameters, you must separate them with ampersands. Experience URLs with parameters use the following structure:
The following is an example:
An experience's URL can include one or more of the parameters listed below.
General parameters
The following is a list of general URL parameters.
Switch locale
To switch the app language, use the locale
parameter and a two-letter ISO 639-1 language code. Experience Builder supports all the same languages that ArcGIS Online supports, which includes the following language codes: ar, bg, bs, ca, cs, da, de, de-de, de-ch, el, en, en-au, en-ca, en-gb, en-us, es, es-es, es-mx, et, fi, fr, fr-fr, fr-ch, he, hr, hu, id, it, it-it, it-ch, ja, ko, lt, lv, nb, nl, pl, pt-br, pt-pt, ro, ru, sk, sl, sr, sv, th, tr, uk, vi, zh-cn, zh-hk, and zh-tw
To use an Experience Builder app in French and Switzerland French, you can append locale=fr to the URL, such as in the following examples:
Go to a page
To direct to a specific page, use page
followed by the page name. In ArcGIS OnlineExperience Builder apps, the page parameter is not part of a query string and does not follow a question mark. It is added in the URL path, such as in the following examples:
Go to a view
To direct to a specific active section view, use views
followed by a view label such as v1
or View 1
.
Open a window
To direct to a specific active window, use dlg
followed by a window ID or label.
View draft mode
Whenever you preview an app, the draft
parameter is automatically added. It allows you to obtain item resources for unpublished apps.
Open print preview
To activate print preview mode, use print_
.
Data-related parameters
The following is a list of data-related URL parameters.
Provide a data source ID
Each data source in an app has its own data source ID. When you select a data record, the data source's ID is added to the app's URL, such as in the following examples:
You can use this method to find a layer's specific data source ID. For example, you can add a List widget and connect it to a layer, preview the app, and select any record in the list. The URL populates similar to the following example:
The value after ?data_
and before :
(or %3A<selectedrecord
) is the layer's data source ID. Knowing the ID, you can use it with other parameters to filter the data source or change versions.
Filter data sources
To directly filter a data source, use data_
. The filter format is a standard WHERE clause syntax that cannot contain ","
or ":"
. To filter multiple data sources, use the format [<ds
.
The above URL is equal to the following encoded URL:
The following is another example URL with this parameter:
Change a data source's GDB version
To change a data source's GDB version, use data_
.
Login-related parameters
The following is a list of login-related URL parameters.
Share authentication through an Embed widget
Some web apps prompt users to sign in with an ArcGIS account. An app can require users to sign in because of its share settings, because the app includes widgets that use premium content, or for other reasons.
If you want to embed an ArcGIS web app in your Experience Builder app, and both require users to sign in, you can add the arcgis-auth-origin
and arcgis-auth-portal
URL parameters to share authentication between both apps so users only need to sign in once.
To embed a private Experience Builder app in another Experience Builder app, use ?arcgis-auth-origin=
to define the host app domain URL for authentication. The following is an example:
To embed a JavaScript API-based app, such as a Web AppBuilder app, use the ?arcgis-auth-origin=
for the host app domain authentication and ?arcgis-auth-portal=
for the JavaScript API based app's domain authentication. The following are examples:
Send users to an organization sign-in page
In general, when users attempt to access a private Experience Builder app on ArcGIS Online, they are directed to the main ArcGIS Online sign-in page. To send users to your organization's sign-in page instead, use org
followed by your organization's short name.