Comments (2)
What type of item is it?
Can you please post your code?
Thank you
from arcrest.
Please see the sample below and pull the latest. This publishes without error.
import arcrest
if __name__ == "__main__":
username = "some username"
password = "some secure password"
csv_file = r"C:\temp\book1.csv"
sh = arcrest.AGOLTokenSecurityHandler(username, password)
admin = arcrest.manageorg.Administration(securityHandler=sh)
content = admin.content
usercontent = content.usercontent(username=username)
ip = arcrest.manageorg.ItemParameter()
ip.title = "Sample CSV"
ip.type = "CSV"
ip.tags = "tag1,tag3"
ip.overwrite = True
ip.thumbnailurl = r"http://php-addict.com/wp-content/uploads/2015/01/csv-xxl.png"
res = usercontent.addItem(itemParameters=ip,
filePath=csv_file)
itemId = res['id']
# Now you need to analyze the item to publish it
#
featureContent = content.featureContent
analyzeParams = arcrest.manageorg.AnalyzeParameters()
analyzeResult = featureContent.analyze(itemId=itemId, analyzeParameters=analyzeParams)
# Published based off the analyze function
#
if 'publishParameters' in analyzeResult:
pp = analyzeResult['publishParameters']
publishParams = arcrest.manageorg.PublishCSVParameters(name=pp['name'],
locationType=pp['locationType'],
layerInfo=pp['layerInfo'],
latitudeFieldName=pp["latitudeFieldName"],
longitudeFieldName=pp['longitudeFieldName'])
print usercontent.publishItem(fileType="csv",
publishParameters=publishParams,
itemId=itemId)
print 'finished'
from arcrest.
Related Issues (20)
- createReplica does not work for feature services inside folder HOT 1
- arcrest.ags.server._validateurl() Mangles Compound Web Context Names HOT 5
- Migrating from AGOL to Server HOT 3
- Append with a new Schema and Attachments
- Does this work with Arcgis Online Enterprise accounts? HOT 5
- Can disable sync be used to enable sync? HOT 1
- Attribute error 'module' object has no attribute 'create_default_context HOT 2
- Intermittent HTTP 403 issues using DeleteFeaturesFromFeatureLayer HOT 3
- ArcRest was working then quit--no changes to script HOT 18
- createReplica will not return records for a table HOT 18
- Looking for additional information
- Misspelling for geometry filter? HOT 2
- ArcRest "arcrest.agol.services.FeatureService.createReplica" tool failing HOT 1
- .addFeatures doesn't copy over all features
- Sample script for metadata import
- ArcRest "arcrest.agol.services.FeatureService.createReplica" works on one ArcGIS Online organization but not another HOT 10
- BUG
- create_replica_portal_item.py - Download permissions HOT 1
- usercontent error: HOT 14
- Importing webmap HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arcrest.