β 1. Find closest fire stations (submit job)
POST https://{{logistics-service}}.arcgis.com/arcgis/rest/services/World/ClosestFacility/GPServer/FindClosestFacilities/submitJob
Request Body
[{"name"=>"f", "value"=>"json", "datatype"=>"string"}, {"name"=>"token", "value"=>"{{access_token}}", "datatype"=>"string"}, {"name"=>"facilities", "value"=>"{'displayFieldName':'','fieldAliases':{'OBJECTID':'OBJECTID','Address':'Address','Name':'Name'},'geometryType':'esriGeometryPoint','spatialReference':{'wkid':2913,'latestWkid':2913},'fields':[{'name':'OBJECTID','type':'esriFieldTypeOID','alias':'OBJECTID'},{'name':'Address','type':'esriFieldTypeString','alias':'Address','length':38},{'name':'Name','type':'esriFieldTypeString','alias':'Name','length':255}],'features':[{'attributes':{'OBJECTID':1,'Address':'5247 N LOMBARD ST','Name':'Station 26 - Portsmouth/University Park'},'geometry':{'x':7633115.889,'y':706174.192}},{'attributes':{'OBJECTID':2,'Address':'8720 SW 30TH AVE','Name':'Station 18 - Multnomah Village'},'geometry':{'x':7635782.577,'y':662289.687}},{'attributes':{'OBJECTID':3,'Address':'5211 SE MALL ST','Name':'Station 25 - Woodstock'},'geometry':{'x':7661431,'y':672359.313}},{'attributes':{'OBJECTID':4,'Address':'7134 N MARYLAND AVE','Name':'Station 08 - Kenton'},'geometry':{'x':7643794.792,'y':703290.389}},{'attributes':{'OBJECTID':5,'Address':'511 SW COLLEGE ST','Name':'Station 04 - Portland State University'},'geometry':{'x':7642550.5,'y':679519.813}},{'attributes':{'OBJECTID':6,'Address':'1920 SW SPRING ST','Name':'Station 15 - Portland Heights'},'geometry':{'x':7638483.5,'y':679335.625}},{'attributes':{'OBJECTID':7,'Address':'7205 N ALTA AVE','Name':'Station 22 - St. Johns'},'geometry':{'x':7624439.852,'y':709314.646}},{'attributes':{'OBJECTID':8,'Address':'5540 NE SANDY BLVD','Name':'Station 28 - Rose City/Hollywood'},'geometry':{'x':7662615.362,'y':690552.356}},{'attributes':{'OBJECTID':9,'Address':'1500 SE 122ND AVE','Name':'Station 07 - Mill Park'},'geometry':{'x':7679927.014,'y':679567.305}},{'attributes':{'OBJECTID':10,'Address':'2915 SE 13TH PL','Name':'Station 23'},'geometry':{'x':7650264.798,'y':676428.937}},{'attributes':{'OBJECTID':11,'Address':'1905 NE KILLINGSWORTH ST','Name':'Station 14 - Alberta Park'},'geometry':{'x':7652607.5,'y':698666.187}},{'attributes':{'OBJECTID':12,'Address':'3130 NW SKYLINE BLVD','Name':'Station 27 - Forest Heights'},'geometry':{'x':7622995.190,'y':692838.978}},{'attributes':{'OBJECTID':13,'Address':'55 SW ASH ST','Name':' Station 01 - Old Town'},'geometry':{'x':7645808.735,'y':683815.505}},{'attributes':{'OBJECTID':14,'Address':'1715 SW SKYLINE BLVD','Name':'Station 16 - Sylvan'},'geometry':{'x':7628988.073,'y':680269.34}},{'attributes':{'OBJECTID':15,'Address':'3660 NW FRONT AVE','Name':'Station 06 - NW Industrial'},'geometry':{'x':7637036.822,'y':693920.006}},{'attributes':{'OBJECTID':16,'Address':'926 NE WEIDLER ST','Name':' Station 13 - Lloyd District'},'geometry':{'x':7649727.5,'y':688199.5}},{'attributes':{'OBJECTID':17,'Address':'2235 SE BYBEE BLVD','Name':'Station 20 - Sellwood/Moreland'},'geometry':{'x':7652687.5,'y':666304.5}},{'attributes':{'OBJECTID':18,'Address':'848 N TOMAHAWK ISLAND DR','Name':'Station 17 - Hayden Island'},'geometry':{'x':7645359.5,'y':715887.625}},{'attributes':{'OBJECTID':19,'Address':'4515 N MARYLAND AVE','Name':'Station 24 - Overlook/Swan Island'},'geometry':{'x':7643391.5,'y':696263.312}},{'attributes':{'OBJECTID':20,'Address':'13310 SE FOSTER RD','Name':'Station 29 - Powellhurst Fire Station'},'geometry':{'x':7682355,'y':666334.813}},{'attributes':{'OBJECTID':21,'Address':'1505 SW DEWITT ST','Name':'Station 05 - Hillsdale'},'geometry':{'x':7639618,'y':668875.813}},{'attributes':{'OBJECTID':22,'Address':'1706 SE CESAR E CHAVEZ BLVD','Name':'Station 09 - Hawthrone District'},'geometry':{'x':7658078.428,'y':679407.82}},{'attributes':{'OBJECTID':23,'Address':'4800 NE 122ND AVE','Name':'Station 02 - Parkrose'},'geometry':{'x':7680485.5,'y':695991.688}},{'attributes':{'OBJECTID':24,'Address':'1715 NW JOHNSON ST','Name':'Station 03 - Northwest Pearl District'},'geometry':{'x':7641263,'y':686484.063}},{'attributes':{'OBJECTID':25,'Address':'8645 NE SANDY BLVD','Name':'Station 12 - Sandy Blvd'},'geometry':{'x':7670903.955,'y':695130.753}},{'attributes':{'OBJECTID':26,'Address':'451 SW TAYLORS FERRY RD','Name':'Station 10 - Burlingame'},'geometry':{'x':7642023.5,'y':662635.312}},{'attributes':{'OBJECTID':27,'Address':'7301 E BURNSIDE ST','Name':'Station 19 - Mt. Tabor'},'geometry':{'x':7667098.674,'y':683759.966}},{'attributes':{'OBJECTID':28,'Address':'13313 NE SAN RAFAEL ST','Name':'Station 30 - Gateway'},'geometry':{'x':7683049.5,'y':688545.938}},{'attributes':{'OBJECTID':29,'Address':'5707 SE 92ND AVE','Name':'Station 11 - Lents'},'geometry':{'x':7671504,'y':668305.312}},{'attributes':{'OBJECTID':30,'Address':'5 SE MADISON ST','Name':'Station 21 - Eastbank/Hawthrone'},'geometry':{'x':7646356.982,'y':680651.469}},{'attributes':{'OBJECTID':31,'Address':'1927 SE 174TH AVE','Name':'Station 31 - Rockwood'},'geometry':{'x':7693238.495,'y':677792.48}}]}", "datatype"=>"string"}, {"name"=>"incidents", "value"=>"{'displayFieldName':'','fieldAliases':{'OBJECTID':'OBJECTID','Name':'Name'},'geometryType':'esriGeometryPoint','spatialReference':{'wkid':2913,'latestWkid':2913},'fields':[{'name':'OBJECTID','type':'esriFieldTypeOID','alias':'OBJECTID'},{'name':'Name','type':'esriFieldTypeString','alias':'Name','length':500}],'features':[{'attributes':{'OBJECTID':1,'Name':'1020 SE 7th Ave, Portland, Oregon, 97214'},'geometry':{'x':7648955.177,'y':681403.651}}]}", "datatype"=>"string"}, {"name"=>"number_of_facilities_to_find", "value"=>"2", "datatype"=>"number"}, {"name"=>"cutoff", "value"=>"5", "datatype"=>"number"}, {"name"=>"travel_direction", "value"=>"Facility to Incident", "datatype"=>"string"}, {"name"=>"time_of_day", "value"=>"1611676800000", "datatype"=>"number"}, {"name"=>"time_of_day_usage", "value"=>"Start Time", "datatype"=>"string"}, {"name"=>"populate_directions", "value"=>"true", "datatype"=>"boolean"}]
RESPONSES
status: OK
{"jobId":"j6ca8aa8caf844f8a8c35c8825dbb1eff","jobStatus":"esriJobSubmitted"}