Get Ayanamsha
Method | Full Url |
---|---|
POST | https://json.apireports.com/v1/ayanamsha |
{
"status_code": 200,
"status": true,
"data": [
{
"type": "Lahiri",
"degree": 23.783067388888888,
"formatted": {
"full": "23:46:59",
"deg": "23",
"min": "46",
"sec": "59"
}
},
{
"type": "Raman",
"degree": 22.337037388888888,
"formatted": {
"full": "22:20:13",
"deg": "22",
"min": "20",
"sec": "13"
}
},
{
"type": "Usha/Shashi",
"degree": 19.98355738888889,
"formatted": {
"full": "19:59:01",
"deg": "19",
"min": "59",
"sec": "01"
}
},
{
"type": "Krishnamurti",
"degree": 23.686486388888888,
"formatted": {
"full": "23:41:11",
"deg": "23",
"min": "41",
"sec": "11"
}
},
{
"type": "Djwhal Khul",
"degree": 28.285694972222224,
"formatted": {
"full": "28:17:09",
"deg": "28",
"min": "17",
"sec": "09"
}
},
{
"type": "Yukteshwar",
"degree": 22.40481938888889,
"formatted": {
"full": "22:24:17",
"deg": "22",
"min": "24",
"sec": "17"
}
},
{
"type": "J.N. Bhasin",
"degree": 22.68815338888889,
"formatted": {
"full": "22:41:17",
"deg": "22",
"min": "41",
"sec": "17"
}
},
{
"type": "Suryasiddhanta",
"degree": 24.666428083333333,
"formatted": {
"full": "24:39:59",
"deg": "24",
"min": "39",
"sec": "59"
}
},
{
"type": "Aryabhata",
"degree": 24.666428083333333,
"formatted": {
"full": "24:39:59",
"deg": "24",
"min": "39",
"sec": "59"
}
}
]
}
Params | Data Type | Description | Example |
---|---|---|---|
day | int | Date of Birth | 15 |
month | int | Month of Birth | 9 |
year | int | Year of Birth | 1994 |
# cURL Request Example
curl --location --request POST 'https://json.apireports.com/v1/ayanamsha' \
-u '{YourUserID}:{YourApiKey}'\
--header 'Accept-Language: en' \
--header 'Content-Type: application/json' \
--data-raw '{
"day": 15,
"month": 9,
"year": 1994
}'
# END
/* JavaScript Request Example */
var apiEndPoint = "ayanamsha";
var userId = "{YourUserID}";
var apiKey = "{YourApiKey}";
var language = "en";
var data = {
"day": 15,
"month": 9,
"year": 1994
};
var url = 'https://json.apireports.com/v1/'+apiEndPoint;
var request = $.ajax({
url: url,
method: "POST",
dataType:'json',
headers: {
"Authorization": "Basic " + btoa(userId+":"+apiKey),
"Accept-Language": "en",
"Content-Type":'application/json'
},
data:JSON.stringify(data)
});
request.then(
function(resp){
console.log(resp);
},
function(err){
console.log(err);
}
);
/* END */
<?php
/* PHP Request Example */
$apiEndPoint = "ayanamsha";
$userId = "{YourUserID}";
$apiKey = "{YourApiKey}";
$url = "https://json.apireports.com/v1/";
$data = array(
"day" => 15,
"month" => 9,
"year" => 1994
);
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url.$apiEndPoint);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
$header[] = 'Authorization: Basic '. base64_encode($userId.":".$apiKey);
$header[] = 'Accept-Language: en';
$header[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
$error = curl_error($ch);
$http_code = curl_getinfo($ch ,CURLINFO_HTTP_CODE);
curl_close($ch);
echo $response;
/* END */
# Python Request Example
import requests
import json
apiEndPoint = "ayanamsha";
userId = "{YourUserID}";
apiKey = "{YourApiKey}";
url = "https://json.apireports.com/v1/"+apiEndPoint
data = json.dumps({
"day": 15,
"month": 9,
"year": 1994
})
headers = {
'Accept-Language': 'en',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, auth=(userId, apiKey),data=data)
print(response.text)
# END
/* NodeJS Request Example */
var request = require('request');
var apiEndPoint = "ayanamsha";
var userId = "{YourUserID}";
var apiKey = "{YourApiKey}";
var url = 'https://json.apireports.com/v1/'+apiEndPoint;
var options = {
'method': 'POST',
'url': url,
'auth': {
'user': userId,
'password': apiKey
},
'headers': {
'Accept-Language': 'en',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"day": 15,
"month": 9,
"year": 1994
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
/* END */