Select to view content in your preferred language

EXB .zip creates Draft, Not Published

313
3
3 weeks ago
CS_IBM
by
New Contributor III

I used a  file = gis.content.add() example to add a EXB.zip to AGOL.
The script worked, but I needed to Publish the EXB App.

I am only getting a Draft now, not a Published EXB App.
I cannot work out why, any suggestions would be appreciated.
I cannot do Save or Publish??

The code is:

### Data

layers=r"C:\EXB\v3.zip"

### XEB.zip to AGOL
file = gis.content.add(
item_properties={"type": "Web Experience", "title": "v3",
"description": "v3 Layers", "tags": "v3 Layers",
},
data=layers,
)


When I add 
file = WebExperience.publish()

I get an error:
file = WebExperience.publish()
AttributeError: type object 'WebExperience' has no attribute 'publish'


Tags (3)
3 Replies
JakeSkinner
Esri Esteemed Contributor

Hi @CS_IBM,

Try the following:

# Data
layers=r"C:\EXB\v3.zip"

# XEB.zip to AGOL
file = gis.content.add(
            item_properties={"type": "Web Experience", "title": "v3",
                             "description": "v3 Layers", "tags": "v3 Layers",
                             },
            data=layers,
        )

# Publish Experience Builder App
app_properties = {'typeKeywords': 'status: Published'}
file.update(item_properties=app_properties)
CS_IBM
by
New Contributor III

Hi Jake,

Thanks for the advice, that Publishes, but the EXB is still empty.

Thanks
Clive

 

0 Kudos
JakeSkinner
Esri Esteemed Contributor

Was the EXB app created with the EXB App Developer Edition?  I'm not an expert with EXB, but I'm not sure if you can create an app in the DEV edition, and publish to AGOL/Enterprise.

0 Kudos