πŸ“©
Fetching Data
Learn how to integrate our system with JavaScript.
You can easily use echo3D with your JavaScript project by using our RESTful API.
You can use the fetch interface to query your project data set using the query API call:
app.js
1
...
2
3
var echoDB;
4
​
5
// Query echo3D
6
fetch('https://api.echo3D.co/query?key=' + API_KEY)
7
.then((response) => response.json())
8
.then((json) => {
9
// Store database
10
echoDB = json; // The JSON response
11
})
12
.catch((error) => {
13
console.error(error);
14
});
15
16
...
Copied!
You will be able to validate your API key and retrieve the database entries as follows:
1
var apiKey = echoDB.apiKey;
2
var db = Object.values(echoDB.db);
Copied!
Last modified 18d ago
Copy link