0

I cannot find any sample using ExtractData API.

I am trying to extract data from hosted feature layers using ExtractData JS API (not widget). The job that I submit fail with the following message.

Error: [{"type":"esriJobMessageTypeError","description":"ERROR 000735: inputLayers: Value is required"},{"type":"esriJobMessageTypeError","description":"Failed."}]

Following is part of the request. The 'instance' object has root url and credentials. All layers are accessible and also I had made them public for testing purpose. I have spend lot of time trying to resolve this issue. There is no other meaningful information coming out of GP Service.

const job = await instance.get('/submitJob', {
 params: {
 inputLayers: [
 { url: soilURL, serviceToken: user.creds.token },
 { url: forestURL, serviceToken: user.creds.token },
 { url: homesiteURL, serviceToken: user.creds.token},
 ],
 extent: {
 url: parcelURL, 
 serviceToken: user.creds.token,
 filter: parcelFilter,
 },
 clip: true,
 dataFormat: 'FILEGEODATABASE ',
 outSR: 102100,
 outputName: {
 title: 'ACT 319 clip data',
 tag: 'clip data',
 snippet: 'clip data',
 description:
 'Clip and download soil type, home site and forest layers.',
 },
 },
 });
PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Sep 7, 2019 at 22:15
4
  • I know it sounds extreme, but most of ESRI's doc uses double quotes for attribute names. Try replacing url: soilURL with "url": soilURLetc. based on developers.arcgis.com/rest/analysis/api-reference/… Commented Sep 13, 2019 at 10:23
  • 1
    @NettaB Thank you for your response. We were able to finally resolve the issue by using JSON.stringify to convert the parameter to string inputLayers: JSON.stringify([ { url: soilURL, serviceToken: user.creds.token }, ]), Commented Sep 14, 2019 at 4:08
  • That's awesome, please add your solution as an answer - for future generations :) Commented Sep 14, 2019 at 11:50
  • can you share your parcelURL please? Commented Aug 5, 2024 at 7:06

1 Answer 1

2

We resolved the issue by JSON.stringfy() the parameter. inputLayers: JSON.stringify([ { url: soilURL, serviceToken: user.creds.token }, ]),

answered Sep 14, 2019 at 14:06
1
  • You can mark this as "answered" to help others in the future. Commented Sep 16, 2019 at 14:55

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.