Vastu Purusha Mandala (81 padas)
curl -X POST https://api.astroway.info/v1/vastu/mandala \ -H "X-Api-Key: aw_live_..." \ -H "Content-Type: application/json" \ -d '{ "school": "brihat-samhita" }'const res = await fetch('https://api.astroway.info/v1/vastu/mandala', { method: 'POST', headers: { 'X-Api-Key': process.env.ASTROWAY_API_KEY, 'Content-Type': 'application/json', }, body: JSON.stringify({ "school": "brihat-samhita" }),});const { ok, data, error } = await res.json();if (!ok) throw new Error(error.message);console.log(data);import os, requests
r = requests.post( 'https://api.astroway.info/v1/vastu/mandala', headers={'X-Api-Key': os.environ['ASTROWAY_API_KEY'], 'Content-Type': 'application/json'}, json={ 'school': "brihat-samhita" },)result = r.json()if not result['ok']: raise RuntimeError(result['error']['message'])print(result['data'])<?phpuse GuzzleHttp\Client;
$client = new Client(['base_uri' => 'https://api.astroway.info/v1/']);$r = $client->post('vastu/mandala', [ 'headers' => ['X-Api-Key' => getenv('ASTROWAY_API_KEY')], 'json' => [ 'school' => 'brihat-samhita', ],]);$result = json_decode($r->getBody(), true);if (!$result['ok']) throw new \RuntimeException($result['error']['message']);print_r($result['data']);The 9x9 mandala with all 45 deities, their pada counts and the cells each one holds, for Brihat Samhita or Mayamata. The two texts name four outer padas differently and share the cells out differently (3/2/1 against 6/2/1).
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Comma-separated dotted paths, relative to data, to keep in the response. A path is applied to every element of an array, so planets.name means the name of each planet. Paths that match nothing come back in _fields_unmatched; a list where nothing matches at all is a 400, because an empty object would be a confident wrong answer.
Example
planets.name,planets.longitudeRound every non-integer number in the response to this many decimal places. Integers are left alone, because an id is not a measurement. Ecliptic longitudes ship with fourteen decimals by default; 2 is about a tenth of an arcminute.
Example
4Request Body required
Section titled “Request Body required ”object
Example
{ "school": "brihat-samhita"}Responses
Section titled “ Responses ”Successful calculation
object
object
object
object
object
Example
{ "ok": true, "data": { "school": "brihat-samhita", "grid": { "size": 9, "orientation": "row 0 is the north edge, col 0 the west edge; (0,8) is the north-east corner" }, "devatas": [ { "name": "Śikhin", "padas": 1, "ring": "outer", "cells": [ [ 0, 8 ] ] }, { "name": "Jayanta", "padas": 2, "ring": "outer", "cells": [ [ 2, 8 ], [ 2, 7 ] ] }, { "name": "Brahmā", "padas": 9, "ring": "brahma", "cells": [ [ 3, 3 ], [ 3, 4 ], [ 3, 5 ], [ 4, 3 ], [ 4, 4 ], [ 4, 5 ], [ 5, 3 ], [ 5, 4 ], [ 5, 5 ] ] } ], "cells": [ { "row": 0, "col": 0, "ring": "outer", "devatas": [ "Roga" ] }, { "row": 0, "col": 1, "ring": "outer", "devatas": [ "Ahi" ] } ], "brahmasthan": [ [ 3, 3 ], [ 3, 4 ] ], "source": "Brihat Samhita, tr. N. Chidambaram Iyer (1884) 53.42-50", "notes": [ "Brahma takes 9 padas, Aryaman, Vivasvat, Mitra and Prthvidhara 3 each, the 20 deities of the four corner groups 1 each, and the other 20 outer deities 2 each (53.49-50)." ] }}Validation error
Example
{ "ok": false, "error": { "code": "INVALID_INPUT", "message": "Validation failed: date: Date must be YYYY-MM-DD", "details": [ { "path": "date", "message": "Date must be YYYY-MM-DD" } ] }}Missing or invalid API key
Example
{ "ok": false, "error": { "code": "INVALID_API_KEY", "message": "Invalid API key" }}