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.',
},
},
});
1 Answer 1
We resolved the issue by JSON.stringfy()
the parameter. inputLayers: JSON.stringify([ { url: soilURL, serviceToken: user.creds.token }, ]),
-
You can mark this as "answered" to help others in the future.GavinR– GavinR2019年09月16日 14:55:24 +00:00Commented Sep 16, 2019 at 14:55
Explore related questions
See similar questions with these tags.
url: soilURL
with"url": soilURL
etc. based on developers.arcgis.com/rest/analysis/api-reference/…inputLayers: JSON.stringify([ { url: soilURL, serviceToken: user.creds.token }, ]),