Select to view content in your preferred language

get geoprocessing jobs list

1261
3
Jump to solution
04-21-2021 10:57 AM
NatashaManzuiga
Regular Contributor

Hi all, is it possible to retrieve the jobs list for a rest GP service with ArcGIS Javascript API?

Thanks,Naty

0 Kudos
2 Solutions

Accepted Solutions
BjornSvensson
Esri Regular Contributor

@NatashaManzuiga - No, it's not possible to retrieve a job list using the ArcGIS API for JavaScript. 

The server does not provide this sort of metadata - https://developers.arcgis.com/rest/services-reference/gp-task.htm 

View solution in original post

ReneRubalcava
Honored Contributor

This isn't exposed in the JavaScript API, but you might be able to use the GP Server jobs query endpoint as described here https://developers.arcgis.com/rest/enterprise-administration/server/query-jobs.htm

You'd need to manually check that using esri/request or fetch in your workflow.

View solution in original post

3 Replies
BjornSvensson
Esri Regular Contributor

@NatashaManzuiga - No, it's not possible to retrieve a job list using the ArcGIS API for JavaScript. 

The server does not provide this sort of metadata - https://developers.arcgis.com/rest/services-reference/gp-task.htm 

NatashaManzuiga
Regular Contributor

So I can just see the jobs list in arcgis/admin...
Ok...anyway maybe you can help me in this:
In a simple webpage I created to submit a job I just need to prevent the submit if the GP is executing another job.

Can I do this somehow?

Thanks,

Naty

0 Kudos
ReneRubalcava
Honored Contributor

This isn't exposed in the JavaScript API, but you might be able to use the GP Server jobs query endpoint as described here https://developers.arcgis.com/rest/enterprise-administration/server/query-jobs.htm

You'd need to manually check that using esri/request or fetch in your workflow.