In Experience Builder you can 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 a 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:
https://<domain>/experience/<AppID>/[?<param1=value>&<param2=value>&...]
The following is an example:
https://experience.arcgis.com/experience/<AppId>/
An experience's URL can include one or more of the parameters listed below.
General parameters
The subsections below describe 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-at, de-de, de-ch, el, en-au, en-ca, en-gb, en-us, es-es, es-mx, et, fi, fr-fr, fr-ch, he, hr, hu, id, 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:
https://experience.arcgis.com/experience/<AppId>/?locale=fr
https://experience.arcgis.com/experience/<AppId>/?locale=fr-ch
Go to a page
To direct to a specific page, use page
followed by the page name. In ArcGIS Online Experience 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, as in the following examples:
https://experience.arcgis.com/experience/<AppId>/page/Page-4
https://experience.arcgis.com/experience/<AppId>/page/{xxxHome}/
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
.
https://experience.arcgis.com/experience/<AppId>/?views=View-2
https://experience.arcgis.com/experience/<AppId>/?views=v1
Open a window
To direct to a specific active window, use dlg
followed by a window ID or label.
https://experience.arcgis.com/experience/<AppId>/?dlg=Window-1
Control window focus
To embed an Experience Builder app with splash windows or page windows without the app automatically going to those windows, you can use the disable_
parameter. Add the following URL to the host web page to disable the movement behavior. By default, disable_
is false.
https://experience.arcgis.com/experience/<AppId>/?disable_window_focus=true
To control window focus for a specific window, use dlg
followed by a window ID or label and the disable_
parameter, as in the following example:
https://experience.arcgis.com/experience/<AppId>/?dlg=Window-1&disable_window_focus=true
View draft mode
Whenever you preview an app, the draft
parameter is automatically added. It allows you to obtain item resources for unpublished apps.
https://experience.arcgis.com/experience/<AppId>/?draft=true
https://experience.arcgis.com/experience/<AppId>/?draft=1
Open print preview
To activate print preview mode, use print_
.
https://experience.arcgis.com/experience/<AppId>/?print_preview=true
https://experience.arcgis.com/experience/<AppId>/?print_preview=1
Data-related parameters
The subsections below describe 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, as in the following examples:
https://experience.arcgis.com/experience/<AppId>/?data_id=<dsID>:<selectedrecordID>
https://experience.arcgis.com/experience/<AppId>/?data_id=dataSource_1-csv_966%3A0
You can use this structure 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:
https://experience.arcgis.com/experience/<AppId>/?data_id=dataSource_2-Shelters_966%3Axxxxxx
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. To filter multiple data sources, use the format [<ds
.
The following is a URL with an un-encoded filter, which will not generate the expected result:
http://experience.arcgis.com/experience/<AppID>/?data_filter=dataSource_1:name='Even&Odd'
The following URL is a correctly encoded version of the URL above:
http://experience.arcgis.com/experience/<AppID>/?data_filter=dataSource_1:name%3D%27Even%26Odd%27
The following is another example URL with two encoded filter parameters (objectid=1
and field
):
https://experience.arcgis.com/experience/<AppId>/?data_filter=ds1:objectid%3D1,ds2:fieldA%3E2
Change the geodatabase version of a data source
To change the geodatabase version of a data source, use data_
.
https://experience.arcgis.com/experience/<AppId>/?data_version=<dsId:version>,<dsId:version>
https://experience.arcgis.com/experience/<AppId>/?data_version=dsId1:v1, dsID2:v1
Login-related parameters
The subsections below describe 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.
To embed an ArcGIS web app in an Experience Builder app when 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:
https://<orgdomain>/experience/<AppID>/?arcgis-auth-origin=<your host app domain, such as https://localhost:3001>
To embed a JavaScript API-based app, such as a Web AppBuilder app, use ?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:
https://<orgdomain>/apps/webappviewer/index.html?id=<appID>&arcgis-auth-origin=<your host app domain, such as https://localhost:3001>&arcgis-auth-portal=<orgA URL>
https://www.arcgis.com/apps/opsdashboard/index.html#/<appID>?arcgis-auth-origin=https://experience.arcgis.com&arcgis-auth-portal=https://<myorg>.maps.arcgis.com
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.
https://experience.arcgis.com/experience/<AppId>/?org=<yourorgshortname>