Skip to main content
added 76 characters in body
Source Link
risail
  • 1.3k
  • 8
  • 24

I'm performing a batch download from my AGOL account, and using the ESRI documentation export item I can export content to shapefiles. I would like to then download the newly created shapefiles. In order to accomplish this I have to be able to have the ID number of the newly created shapefile. According to the documentation it is in the JSON response.

sudo code:

import requests
import arcrest
import json

exporturl = self.root_url +'/users/' + self.username + '/export'
export = requests.post(exporturl, params=FsParams)
export_response = export.json()

What I have tried:

response = export_response['exportItemId']
print response

Error: KeyError: 'exportItemId'

printing response = export_response returns the params from the post

Using the requests library can I access the JSON response? If this is not possible with requests what method will work?

I'm performing a batch download from my AGOL account, and using the ESRI documentation export item I can export content to shapefiles. I would like to then download the newly created shapefiles. In order to accomplish this I have to be able to have the ID number of the newly created shapefile. According to the documentation it is in the JSON response.

sudo code:

import requests
import arcrest
import json

exporturl = self.root_url +'/users/' + self.username + '/export'
export = requests.post(exporturl, params=FsParams)
export_response = export.json()

What I have tried:

response = export_response['exportItemId']
print response

Error: KeyError: 'exportItemId'

Using the requests library can I access the JSON response? If this is not possible with requests what method will work?

I'm performing a batch download from my AGOL account, and using the ESRI documentation export item I can export content to shapefiles. I would like to then download the newly created shapefiles. In order to accomplish this I have to be able to have the ID number of the newly created shapefile. According to the documentation it is in the JSON response.

sudo code:

import requests
import arcrest
import json

exporturl = self.root_url +'/users/' + self.username + '/export'
export = requests.post(exporturl, params=FsParams)
export_response = export.json()

What I have tried:

response = export_response['exportItemId']
print response

Error: KeyError: 'exportItemId'

printing response = export_response returns the params from the post

Using the requests library can I access the JSON response? If this is not possible with requests what method will work?

added 43 characters in body
Source Link
risail
  • 1.3k
  • 8
  • 24

I'm performing a batch download from my AGOL account, and using the ESRI documentation export item I can export content to shapefiles. I would like to then download the newly created shapefiles. In order to accomplish this I have to be able to have the ID number of the newly created shapefile. According to the documentation it is in the JSON response.

sudo code:

import requests
import arcrest
import json

exporturl = self.root_url +'/users/' + self.username + '/export'
export = requests.post(exporturl, params=FsParams)
export_response = export.json()

What I have tried:

response = export_response['exportItemId']
print response

Error: KeyError: 'exportItemId'

Using the requests library can I access the JSON response? If this is not possible with requests what method will work?

I'm performing a batch download from my AGOL account, and using the ESRI documentation export item I can export content to shapefiles. I would like to then download the newly created shapefiles. In order to accomplish this I have to be able to have the ID number of the newly created shapefile. According to the documentation it is in the JSON response.

sudo code:

import requests
import arcrest
import json

exporturl = self.root_url +'/users/' + self.username + '/export'
export = requests.post(exporturl, params=FsParams)
export_response = export.json()

I have tried:

response = export_response['exportItemId']
print response

Using the requests library can I access the JSON response? If this is not possible with requests what method will work?

I'm performing a batch download from my AGOL account, and using the ESRI documentation export item I can export content to shapefiles. I would like to then download the newly created shapefiles. In order to accomplish this I have to be able to have the ID number of the newly created shapefile. According to the documentation it is in the JSON response.

sudo code:

import requests
import arcrest
import json

exporturl = self.root_url +'/users/' + self.username + '/export'
export = requests.post(exporturl, params=FsParams)
export_response = export.json()

What I have tried:

response = export_response['exportItemId']
print response

Error: KeyError: 'exportItemId'

Using the requests library can I access the JSON response? If this is not possible with requests what method will work?

added 89 characters in body
Source Link
risail
  • 1.3k
  • 8
  • 24

I'm performing a batch download from my AGOL account, and using the ESRI documentation export item I can export content to shapefiles. I would like to then download the newly created shapefiles. In order to accomplish this I have to be able to have the ID number of the newly created shapefile. According to the documentation it is in the JSON response.

sudo code:

import requests
import arcrest
import json

exporturl = self.root_url +'/users/' + self.username + '/export'
export = requests.post(exporturl, params=FsParams)
export_response = export.json()

I have tried:

response = export_response['exportItemId']
print response

Using the requests library can I access the JSON response? If this is not possible with requests what method will work?

I'm performing a batch download from my AGOL account, and using the ESRI documentation export item I can export content to shapefiles. I would like to then download the newly created shapefiles. In order to accomplish this I have to be able to have the ID number of the newly created shapefile. According to the documentation it is in the JSON response.

sudo code:

import requests
import arcrest
import json

exporturl = self.root_url +'/users/' + self.username + '/export'
export = requests.post(exporturl, params=FsParams)
export_response = export.json()

Using the requests library can I access the JSON response? If this is not possible with requests what method will work?

I'm performing a batch download from my AGOL account, and using the ESRI documentation export item I can export content to shapefiles. I would like to then download the newly created shapefiles. In order to accomplish this I have to be able to have the ID number of the newly created shapefile. According to the documentation it is in the JSON response.

sudo code:

import requests
import arcrest
import json

exporturl = self.root_url +'/users/' + self.username + '/export'
export = requests.post(exporturl, params=FsParams)
export_response = export.json()

I have tried:

response = export_response['exportItemId']
print response

Using the requests library can I access the JSON response? If this is not possible with requests what method will work?

added 17 characters in body
Source Link
risail
  • 1.3k
  • 8
  • 24
Loading
Source Link
risail
  • 1.3k
  • 8
  • 24
Loading