AnsweredAssumed Answered

How to use ExtractData Javascript API

Question asked by cyril.cherian_geoIT on Sep 7, 2019
Latest reply on Sep 11, 2019 by cyril.cherian_geoIT

 I appreciate any help with ExtractData Javascript API. 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 my 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: soilURLserviceToken: user.creds.token },
             { url: forestURLserviceToken: user.creds.token },
             { url: homesiteURLserviceToken: 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.',
          },
        },
      });

 

 

 

Thanks

Cyril

Outcomes