The CARTO Import API allows you to upload files to a CARTO account, check on their current upload status, as well as delete and list importing processes on a given account.
This API consists of several HTTP requests targeted at a set of CARTO endpoints that deal with the conversion and import of the sent files. To understand the fundamentals of Import API, read the guides. To view the source code, browse the open-source repository in Github and contribute. Otherwise, read the full reference API, or find different support options.
Quick reference guides for learning how to use Import API features.
Browse the interactive API documentation to search for specific Import API methods, arguments, and sample code that can be used to build your applications.
Check Full Reference API1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Create new client
var client = new carto.Client({
apiKey: 'YOUR_API_KEY_HERE',
username: 'YOUR_USERNAME_HERE'
});
// Add a dataview to the client
client.addDataview(dataview)
.then(() => {
console.log('Dataview added');
})
.catch(cartoError => {
console.error(cartoError.message);
});
// Add a layer to the client
client.addLayer(layer)
.then(() => {
console.log('Layer added');
})
.catch(cartoError => {
console.error(cartoError.message);
});
Get help or learn about known issues.