The HESTIA API allows programmatic interaction with user accounts and uploaded files.
To use the API, you will need a HESTIA account (see Getting Started).
Once your account is created, you will get a personal access token. You have several ways to retrieve the token:
API Key.curl -X POST "https://api.hestia.earth/users/signin" \
-H "Content-Type: application/json" \
--data '{"email":"email@email.com","password":"pwd"}' | jq '.token'
import json
import requests
headers = {'Content-Type': 'application/json'}
body = json.dumps({"email":"email@email.com","password":"pwd"})
token = requests.post('https://api.hestia.earth/users/signin', body, headers=headers).json().get('token')
print(token)
(async () => {
const url = 'https://api.hestia.earth/users/signin';
const headers = {
'Content-Type': 'application/json'
};
const body = JSON.stringify({ email: 'email@email.com', password: 'pwd' });
const response = await fetch(url, { method: 'POST', headers, body });
const { token } = await response.json();
console.log(token);
})();
const axios = require('axios');
(async () => {
const url = 'https://api.hestia.earth/users/signin';
const body = { email: 'email@email.com', password: 'pwd' };
const { data: { token } } = await axios.post(url, body);
console.log(token);
})();
You can now test the API on the Swagger docs.