Select to view content in your preferred language

ArcGIS Online Experience Builder - uploading configs

554
2
Jump to solution
09-19-2024 03:33 PM
vl-driscolls
Emerging Contributor

Hello, I am trying to create an Experience Builder app on ArcGIS Online with arcgis.gis

I can create an Experience Builder item and edit the data json with:

item.update(data=my_data)


The problem is that the Experience Builder created is lacking a config/config.json resource, which seems required open the Experience Builder in the editor, without it, the editor just shows a blank white screen where the app preview is supposed to be.

I have tried:

update_info_response = editing_app_item.update_info(config_file_path, folder_name='config')


Which doesn't create a config in the resources when I check the item in ArcGIS Assistant.

Does anyone know if there's a way to upload / edit the config?

0 Kudos
1 Solution

Accepted Solutions
JakeSkinner
Esri Esteemed Contributor

Hi @vl-driscolls ,

Take a look at these tools.  The Copy Exp Apps.py contains functionality to copy an Experience Builder application using an existing Experience Builder's JSON.  You can debug this to look at the JSON being passed to create the application.  Ex:

# Get Exp App JSON
expApp = source.content.get(expAppID)
expAppDict = expApp.get_data(try_json=True)

# Convert dict to JSON
expAppJSON = json.dumps(expAppDict)

# Exp App Properties
exp_app_properties = {'title': expApp.title,
                      'type': 'Web Experience',
                      'snippet': expApp.snippet,
                      'description': expApp.description,
                      'tags': expApp.tags,
                      'text': expAppJSON}

# Create Exp App
expAppItem = target.content.add(item_properties=exp_app_properties, owner=targetOwner)

 

View solution in original post

2 Replies
JakeSkinner
Esri Esteemed Contributor

Hi @vl-driscolls ,

Take a look at these tools.  The Copy Exp Apps.py contains functionality to copy an Experience Builder application using an existing Experience Builder's JSON.  You can debug this to look at the JSON being passed to create the application.  Ex:

# Get Exp App JSON
expApp = source.content.get(expAppID)
expAppDict = expApp.get_data(try_json=True)

# Convert dict to JSON
expAppJSON = json.dumps(expAppDict)

# Exp App Properties
exp_app_properties = {'title': expApp.title,
                      'type': 'Web Experience',
                      'snippet': expApp.snippet,
                      'description': expApp.description,
                      'tags': expApp.tags,
                      'text': expAppJSON}

# Create Exp App
expAppItem = target.content.add(item_properties=exp_app_properties, owner=targetOwner)

 

vl-driscolls
Emerging Contributor

thanks this is what I was looking for

0 Kudos