I have an existing Publish GP Tool that accepts a couple Parameters. It does its thing and then passes back some results. Something is going on and I want to rewrite this persons code but before doing so I want to make sure I am doing this the most logical way.
The Current project is using API 4.13
SERVICE OVERVIEW
Execution Type: esriExecutionTypeSynchronous
Supported Operations: Execute Task
CREDENTIALS - I need to add to this a Token that the service will require as its secured. How do I add the token
BELOW are the params I am looking to send
NOTING - I need to use the EXECUTE not SUBMIT as that is what the service requires
Can someone help with an example to show me the correct syntax etc to CALL and then grab the RESULTS and simply put in an ALERT box????
let params = {
"site": FeatureSet.fromJSON(
{
"geometryType": geometryType9,
"spatialReference": { "wkid": 102100 },
"features": [
{
"attributes": {
"OBJECTID": 0
},
"geometry": geometry9
}
]
}
),
"Buffer_Distance": LinearUnit.fromJSON({
"distance": xyz.Session.searchRequestTextbox.bufferDistance,
"units": "miles"
}),
"user": UserRole,
"Report_Type": xyz.Session.searchRequestTextbox.reportType
};