Skip to main content
100%

Import CartoDB file with cURL

✓ Published0🌍 Public
Aandrewxhill
Last edited Jun 28, 2013
Created on Jun 28, 2013

This example demonstrates how to upload a file into a CartoDB account using the command-line tool cURL, showing the complete import workflow from submission to completion. The shell script sends the file to CartoDB’s `/api/v1/imports/` endpoint, extracts the job ID from the JSON response, and then polls the import status until it reports “complete.” It uses cURL for HTTP requests and `sed` for parsing the JSON, with platform-specific regex variations for macOS (Darwin) and Linux. The script takes three arguments: the CartoDB username, API key, and the filename to import.

AI-generated description

Similar vizzes