Skip to main content

Overview

This guide helps you migrate from the legacy AVERT Imagery API (v1) to the new unified API v2. The migration involves updating endpoints, parameter names, and response handling.
API v1 will continue to work but is no longer actively maintained. We strongly recommend migrating to v2 for better features and ongoing support.

Why Migrate?

Unified API

Single endpoint replaces multiple endpoints

Better Filtering

New atmospheric and temporal filters

Smart Downloads

Get estimates before downloading

Improved Pagination

Comprehensive pagination metadata

Breaking Changes Summary

Migration Steps

Step 1: Update Endpoint URLs

v1: Separate endpoints
v2: Single unified endpoint

Step 2: Update Parameter Names

Date range parameters have new names and format:
Helper function for date conversion:

Step 3: Update Response Handling

v1: Returns array directly
v2: Returns structured object

Step 4: Update Download Logic

v1: Fixed 100-image limit
v2: Estimate first, then download

New Features in v2

1. Condition Filters

v2 adds new filters for image quality and visibility conditions:
Filter applicability by image type:

2. Temporal Sampling (freq)

Dramatically reduce dataset size while maintaining temporal coverage:
freq options:
  • all - All captured images (default)
  • minutely - One per minute
  • hourly - One per hour
  • daily - One per day

3. Enhanced Pagination

v2 provides comprehensive pagination metadata:

4. Query Echo

v2 includes your query parameters in the response for debugging:

Complete Migration Example

Here’s a complete before/after example:

Migration Checklist

Use this checklist to ensure complete migration:
1

Update endpoint URLs

  • Replace /api/imagery/infrared/query with /api/imagery/q?imageType=infrared
  • Replace /api/imagery/visible/query with /api/imagery/q?imageType=visible
  • Update base URL to https://avert.ldeo.columbia.edu
2

Update parameters

  • Replace search_from with datefrom
  • Replace search_to with dateto
  • Convert date format from ISO 8601 to yyyymmddhhmmss
  • Add imageType parameter
3

Update response handling

  • Extract data['results'] instead of using response directly
  • Access pagination via data['pagination']
  • Update loops to iterate over data['results']
4

Update download logic

  • Add download=estimate call before downloading
  • Show estimate to users
  • Change download=True to download='true' (string)
5

Add new features (optional)

  • Add condition filters (is_empty, is_night, is_degraded, low_visibility)
  • Add temporal sampling (freq parameter)
  • Implement pagination navigation
  • Add rate limit handling with retry logic
6

Test thoroughly

  • Test basic queries
  • Test with filters
  • Test pagination
  • Test downloads with estimates
  • Test error handling

Common Migration Issues

Issue: Trying to access .results on v1 responseSolution: Update response handling
Issue: Using ISO 8601 date format with v2 APISolution: Convert to yyyymmddhhmmss format
Issue: Forgot to add imageType parameterSolution: Explicitly specify image type
Issue: Using wrong value for download parameterSolution: Use string ‘true’ not boolean True

Testing Your Migration

Test your migrated code with these queries:

Test 1: Basic Query

Test 2: Date Filtering

Test 3: Download Estimate

Getting Help

API v2 Documentation

Complete v2 API reference

Query Endpoint Reference

Detailed endpoint documentation

Contact Support

Get help from the AVERT team

v1 Documentation

Legacy API reference (if needed)