arcgis 0.1.0

Type-safe Rust SDK for the ArcGIS REST API with compile-time guarantees
Documentation
# ArcGIS SDK Environment Variables
#
# Copy this file to .env and fill in your API keys.
# The .env file is automatically loaded when creating an ArcGIS client.
#
# IMPORTANT: Never commit .env to version control!
# The .env file should be in .gitignore.

# ============================================================================
# Multi-Tier API Keys (Recommended)
# ============================================================================
# Different test tiers require different keys based on privilege levels.
# You can have all keys in this single file - the SDK will select the
# appropriate key based on which test feature you're running.
#
# Get API keys from: https://developers.arcgis.com/api-keys/

# Tier 1: Public services
# Used by: test-public feature (optional, public services work without auth)
# Services: World Cities, public feature services, basemaps
# Credit cost: 0 (no auth required, but providing a key may increase rate limits)
ARCGIS_PUBLIC_KEY=

# Tier 2: Location services
# Used by: test-location feature
# Services: Geocoding, routing, geometry operations
# Credit cost: ~0.004 credits per geocode, ~0.5 credits per route
# Get from: https://developers.arcgis.com/api-keys/ (Location Services enabled)
ARCGIS_LOCATION_KEY=

# Tier 3: Content management
# Used by: test-content feature
# Privileges: Content (create/publish), Sharing (groups/org), Groups (view/join)
# Services: Portal content management, item publishing, group management
# Credit cost: ~0.001 credits per operation (storage costs)
# Requires: ArcGIS Online organizational account with content creation privileges
ARCGIS_CONTENT_KEY=

# Tier 3: Feature editing
# Used by: test-features feature
# Privileges: Features (edit, full edit)
# Services: Feature editing, versioned editing, edit sessions
# Credit cost: ~0.001 credits per operation (compute costs)
# Requires: ArcGIS account with feature editing privileges
# Note: Requires hosted feature services to edit (use test-content key to create them)
ARCGIS_FEATURES_KEY=

# ============================================================================
# Legacy API Key (DEPRECATED - Optional for backward compatibility)
# ============================================================================
# DEPRECATED: This variable is no longer required. The multi-tier system uses
# tier-specific keys (ARCGIS_PUBLIC_KEY, ARCGIS_LOCATION_KEY, etc.).
#
# When no test feature is active, the system defaults to ARCGIS_PUBLIC_KEY.
# You only need to set this if you have legacy code that directly references it.
#
# ARCGIS_API_KEY=

# ============================================================================
# OAuth 2.0 Client Credentials (for server-to-server authentication)
# ============================================================================
# Required for: edit_session, portal_content_management, feature_attachments examples
# Get credentials from: https://developers.arcgis.com/applications
ARCGIS_CLIENT_ID=
ARCGIS_CLIENT_SECRET=

# ============================================================================
# Testing Configuration (optional)
# ============================================================================
# Logging level for tests (trace, debug, info, warn, error)
RUST_LOG=info

# ============================================================================
# Example Configuration (for running examples/)
# ============================================================================

# Feature Service URL (for feature_attachments example)
# Create a hosted feature service with attachments enabled, then paste the URL here
# The feature_attachments example will add and remove test features with attachments
# Not a secret, but environment-specific configuration
ARCGIS_FEATURE_SERVICE_URL=https://services.arcgis.com/YOUR_ORG/arcgis/rest/services/YourService/FeatureServer

# Version Management Server URL (for edit_session example)
VERSION_MGMT_URL=https://services.arcgis.com/YOUR_ORG/arcgis/rest/services/VersionManagementServer

# Feature Service URL (for edit_session example)
FEATURE_SERVICE_URL=https://services.arcgis.com/YOUR_ORG/arcgis/rest/services/YourService/FeatureServer

# Layer ID (for edit_session example)
LAYER_ID=0

# Version GUID (for versioned editing in edit_session example)
VERSION_GUID=550e8400-e29b-41d4-a716-446655440000