Get started
Follow the steps below to set up Qodex so you can make requests to ArcGIS location services. If you want to learn more about the services, or how to access them with other ArcGIS and open source APIs, go to the Mapping APIs and location services guide.1. Get an ArcGIS account
You need an ArcGIS account to create API keys and access tokens to access services. If you don't have an account:- Sign up for a free ArcGIS Developer account (single-developer); or,
- Sign up for an ArcGIS Online account (organization).
2. Get a Qodex account
You need a Qodex account to fork collections and run requests.- Sign up for a [free Qodex account]
3. Fork environment variables and collections
In Qodex, environment variables are used to set the username, password, and access token to make requests to location services. Once set, you can run all of the requests in any of the collections.Learn more about how to [fork Qodex collections and environments]
- On the left toolbar, in Environments:
- Click [Standard endpoints] > ... > Create a fork.
- Click [Enhanced endpoints] > ... > Create a fork.
To learn more about Standard and Enhanced endpoints, go to the Mapping APIs and location services guide.
NOTE: If you have an ArcGIS Developer account, you will need to enable Pay-as-you-go to use all of the Enhanced endpoints with either an API key or a generated token.
- On the left toolbar, in Environments:
- Click Globals > Export to export the global variables the examples use.
- On the top toolbar, click Workspaces:
- Go to your My Workspace > Import to import the globals to your workspace.
- On the left toolbar, in Collections:
- Click each collection in ArcGIS location services and then > Create a fork to fork all of the collections you want to use.
NOTE: If you want to generate a short-term access token with a request, you need to fork [<strong>Get access token</strong>]
4. Set your access token
There are two ways you can create and set access tokens for all requests. You can generate a short-term token with a request or you can use a long-term API Key from your developer dashboard. Option 1: Generate an access token (short-term)- In Qodex, click Environments > Globals > Current Value, set the
username
andpassword
variables are set. - In Collections, run the ArcGIS Identity > Generate token request. This requires your ArcGIS account username and password. Copy the token in the response.
- In ArcGIS for Developers, sign in to your developer dashboard.
- Copy or create and then copy a new API key.

- In Qodex, click Environments > Standard endpoints or Enhanced endpoints (depending on which environment you forked) and set the
access_token
variable to either the token created from the Generate token request or your API key. - Set both the Initial value and Current value with your generated token or API key.

NOTE: Ensure you scope your API key so it can access all of the services in your collections, otherwise the request will fail. To learn more, visit scoping API keys.
5. Run the examples
- In Qodex, go to your ArcGIS location services workspace and forked collections.
- At the top-right, change No Environment to either Standard endpoints or Enhanced endpoints.
- Expand Collections to find the desired example. In each one you will find the following:
- GET/POST: Request with the params preset and will use the environment variables set earlier.
- 200 OK: Sample response result.
- xxx-spec: Documentation for the params.
- Run the desired example. NOTE: Ensure the
access_token
environment variable is correctly set. See Steps 3 and 4.
Documentation ๐
You will find documentation guides, API reference and libraries in the documentation for each collection:- ๐ [Geocoding API (Geolocation)]
- ๐ [Routing & Directions API]
- ๐งโ๐คโ๐ง [Demographics & GeoEnrichment API]
- โ๏ธ [Data hosting]
- ๐ [Content management]
API error codes
You will find more information about error codes in the API reference of each collection. NOTE: If you use short-lived access tokens (instead of API keys) that were generated from your ArcGIS Identity username and password, you could get a 498 error code. If you get this error, you will need to generate a newaccess_token
.
{
"error": {
"code": 498,
"message": "Invalid Token",
"details": []
}
}
More error codes:
Error code | Description |
---|---|
400 | The request sent to the server is not correct. |
401 | Authorization to the requested resource is required. |
403 | Authorization to the requested resource is required. |
404 | The requested resource was not found. |
413 | The request is larger than limits defined by the server. If you're trying to upload an attachment, this error might indicate that the attachment's size exceeds the maximum size allowed. |
498 | The access token provided is invalid or expired. |
499 | A token was required to access the resource. |
500 | The service was not able to fulfill the request, possibly due to invalid input, or the service may not be functioning properly. |
501 | The requested service is not implemented. |
Reference documentation
ArcGIS location services support both direct and job requests:- โก๏ธ Direct requests are single asynchronous transactions to the service endpoint.
- ๐ Job requests are a set of asynchronous transactions to the service endpoint.
- โ Submit job
- โ Check status
- โ Get results
Community & feedback ๐ฌ
- For issues regarding the Qodex collections, open an issue on Github: github.com/Esri/awesome-arcgis-developer.
- For general support issues, use [Qodex comments] feature or use the #arcgis-rest-api channel on The Spatial Community on Slack.