Comments (10)
@bkaplan1 for classic projects, you use the item id of Workforce Project. For offline enabled projects you need the feature service item id. To find offline enabled projects, use a search query like type:"Feature Service" AND typekeywords:"Workforce Project"
from workforce-scripts.
from workforce-scripts.
@bkaplan1 you can just directly use the parameters in the query parameter, the method parameters are just helpers. For example:
items = gis.content.search(f'type:"Feature Service" AND typekeywords:"Workforce Project" AND owner:{gis.users.me.username}')
Should return all of the offline enabled workforce project items.
from workforce-scripts.
from workforce-scripts.
Is items[1] comparable to fs_item? Or how do I get the feature service ID?
offline_project = workforce.Project(item[1])
This should work, can you check the version of the api you are using:
import arcgis
print(arcgis.__version__)
from workforce-scripts.
from workforce-scripts.
Okay, you need to update the arcgis library to 1.8.3 pre-release when running in the hosted notebook.
An example is hosted here (notice the top commented out block): https://www.arcgis.com/home/item.html?id=f0488d21719f4decafe317670a56204a#preview
There a multiple examples hosted:
https://www.arcgis.com/home/group.html?id=c1695c0c2f9945a8a7fee7dd106c74ae#overview
from workforce-scripts.
from workforce-scripts.
@bkaplan1 I dug into this and believe it's a bug in the underlying ArcGIS API for Python. I've opened an internal bug for it.
from workforce-scripts.
@bkaplan1 the authentication issue using OAuth should be resolved in the next update of the Python API. The workforce.Project
uses the items gis which should already be using the token. The bug was that some POST requests (when using the OAuth workflow) were not correctly setting the token in the header. I don't think there is any workaround.
I'm closing this since the original issue was resolved. Feel free to re-open or create a new issue if you run into more problems.
from workforce-scripts.
Related Issues (20)
- Service name already exists; misreported error, perhaps '&' HOT 3
- How to migrate completed assignments? HOT 1
- Handle_json_error HOT 2
- Type Error: 'NoneType' Object is not subscriptable HOT 1
- Authentication fails when using Enterprise login HOT 4
- Unknown object [OBJ] causes export_assignments_to_csv.py script to fail HOT 3
- Copy assignments does not copy feature service attachments HOT 3
- Will assign assignments based on point features HOT 2
- Exceptions on migrate_assignments.py HOT 2
- AssignmentType shows GUID rather than text Alias in ArcGIS Pro HOT 5
- Assignment Migration - Attachments Failing HOT 3
- Automation needed features HOT 1
- Export assignment to CSV is still using arrow instead of pendulum
- Cannot execute create_assignments_from_csv due to Type error HOT 4
- Can't Assign Work: ValidationError: Assignment must have geometry HOT 4
- assignementread field doesn't exist HOT 1
- Getting KeyError as "assignments" when using workforce with geoprocessing tool. HOT 6
- Not letting worker finish assignment if worker is not nearby assignment HOT 2
- Optimally Creating and Assigning Work Orders Based on Routes 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 workforce-scripts.