{"id":599,"date":"2017-08-30T03:28:30","date_gmt":"2017-08-30T03:28:30","guid":{"rendered":"http:\/\/www.rangakrish.com\/?p=599"},"modified":"2024-06-14T05:11:18","modified_gmt":"2024-06-13T23:41:18","slug":"kp-astrology-rest-api","status":"publish","type":"post","link":"https:\/\/www.rangakrish.com\/index.php\/2017\/08\/30\/kp-astrology-rest-api\/","title":{"rendered":"KP Astrology REST API"},"content":{"rendered":"<p>In today&#8217;s post I want to share my experience in implementing a set of REST API calls for Astrology. The series on <em><strong>iLangGen<\/strong><\/em> will resume after this.<\/p>\n<p>As readers of this column probably know, I am the author of an Astrology software called <a href=\"https:\/\/www.kpastrosoftware.com\" target=\"_blank\" rel=\"noopener noreferrer\"><em><strong>KPAstro<\/strong><\/em><\/a>. You can read about it <a href=\"https:\/\/www.kpastrosystem.com\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>. First released in the year 2004, KPAstro has been widely accepted by KP (Krishnamurti Padhdhati)\u00a0 astrologers all over the world, thanks to its rich set of features and accurate calculations. The product currently runs on Windows platforms. Interestingly, over the past year I have received several emails (and some calls) from software developers asking me to expose the core functionality as API so that they can use the service to build apps for multiple devices. In fact, last week a developer from Kerala called me and spoke at length as to why building the API is a great idea. It was then that I thought I should take this suggestion seriously.<\/p>\n<p>I started developing KPAstro in 2003 soon after I completed a course on KP system in Chennai. At that time, there was just one popular DOS-based software for KP system, and so I thought I should develop one for Windows. Over the past thirteen years, I have been gradually adding features based on my own evolution (as an astrology enthusiast) and the feedback from users of the software. The code is 100% C++ (Visual Studio) and uses third-party libararies for GUI, etc.<\/p>\n<p>In order to get started, I spent a few days last week reviewing the existing functionality and decided on a core set of features (even this will be implemented in stages) to expose via REST. In terms of the compiler\/tool to use, I chose Embarcadero RAD Studio <a href=\"https:\/\/www.embarcadero.com\/products\/cbuilder\" target=\"_blank\" rel=\"noopener noreferrer\">C++ Builder<\/a> 10.2.1 Tokyo for this exercise. I could have chosen VS 2015\/2017 too (in fact, I might switch to that later).<\/p>\n<p>It was quite straightforward to take the sources and rebuild for this new project. The following screens show the initial steps in RAD Studio project creation.<\/p>\n<figure id=\"attachment_601\" aria-describedby=\"caption-attachment-601\" style=\"width: 672px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image1.png\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" data-attachment-id=\"601\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2017\/08\/30\/kp-astrology-rest-api\/project-image1\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image1.png\" data-orig-size=\"672,512\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Project Step 1\" data-image-description=\"&lt;p&gt;Project Step 1&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Project Step 1&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image1.png\" class=\"size-full wp-image-601\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image1.png?resize=672%2C512\" alt=\"Project Step 1\" width=\"672\" height=\"512\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image1.png?w=672&amp;ssl=1 672w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image1.png?resize=300%2C229&amp;ssl=1 300w\" sizes=\"(max-width: 672px) 100vw, 672px\" \/><\/a><figcaption id=\"caption-attachment-601\" class=\"wp-caption-text\"><strong>Project Step 1<\/strong><\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_602\" aria-describedby=\"caption-attachment-602\" style=\"width: 521px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image2.png\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"602\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2017\/08\/30\/kp-astrology-rest-api\/project-image2\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image2.png\" data-orig-size=\"521,522\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Project Step 2\" data-image-description=\"&lt;p&gt;Project Step 2&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Project Step 2&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image2.png\" class=\"size-full wp-image-602\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image2.png?resize=521%2C522\" alt=\"Project Step 2\" width=\"521\" height=\"522\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image2.png?w=521&amp;ssl=1 521w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image2.png?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image2.png?resize=300%2C300&amp;ssl=1 300w\" sizes=\"(max-width: 521px) 100vw, 521px\" \/><\/a><figcaption id=\"caption-attachment-602\" class=\"wp-caption-text\"><strong>Project Step 2<\/strong><\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_603\" aria-describedby=\"caption-attachment-603\" style=\"width: 521px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image3.png\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"603\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2017\/08\/30\/kp-astrology-rest-api\/project-image3\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image3.png\" data-orig-size=\"521,522\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Project Step 3\" data-image-description=\"&lt;p&gt;Project Step 3&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Project Step 3&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image3.png\" class=\"size-full wp-image-603\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image3.png?resize=521%2C522\" alt=\"Project Step 3\" width=\"521\" height=\"522\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image3.png?w=521&amp;ssl=1 521w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image3.png?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image3.png?resize=300%2C300&amp;ssl=1 300w\" sizes=\"(max-width: 521px) 100vw, 521px\" \/><\/a><figcaption id=\"caption-attachment-603\" class=\"wp-caption-text\"><strong>Project Step 3<\/strong><\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_604\" aria-describedby=\"caption-attachment-604\" style=\"width: 521px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image4.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"604\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2017\/08\/30\/kp-astrology-rest-api\/project-image4\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image4.png\" data-orig-size=\"521,522\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Project Step 4\" data-image-description=\"&lt;p&gt;Project Step 4&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Project Step 4&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image4.png\" class=\"size-full wp-image-604\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image4.png?resize=521%2C522\" alt=\"Project Step 4\" width=\"521\" height=\"522\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image4.png?w=521&amp;ssl=1 521w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image4.png?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image4.png?resize=300%2C300&amp;ssl=1 300w\" sizes=\"(max-width: 521px) 100vw, 521px\" \/><\/a><figcaption id=\"caption-attachment-604\" class=\"wp-caption-text\"><strong>Project Step 4<\/strong><\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_605\" aria-describedby=\"caption-attachment-605\" style=\"width: 521px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image5.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"605\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2017\/08\/30\/kp-astrology-rest-api\/project-image5\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image5.png\" data-orig-size=\"521,522\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Project Step 5\" data-image-description=\"&lt;p&gt;Project Step 5&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Project Step 5&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image5.png\" class=\"size-full wp-image-605\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image5.png?resize=521%2C522\" alt=\"Project Step 5\" width=\"521\" height=\"522\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image5.png?w=521&amp;ssl=1 521w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image5.png?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image5.png?resize=300%2C300&amp;ssl=1 300w\" sizes=\"(max-width: 521px) 100vw, 521px\" \/><\/a><figcaption id=\"caption-attachment-605\" class=\"wp-caption-text\"><strong>Project Step 5<\/strong><\/figcaption><\/figure>\n<p>I then proceeded to build the application. No hitches here.<\/p>\n<p>First I tested the server on my local machine. Since it was working as expected,\u00a0\u00a0I decided to host it on Google <a href=\"http:\/\/cloud.google.com\" target=\"_blank\" rel=\"noopener noreferrer\">cloud<\/a> (I have a free tier subscription for one year). I created a Windows Server 2012 VM with 3.75 GB RAM and uploaded my executables there. Because this is not a full-fledged app, I decided to go with the Ephemeral IP (not Static IP) for communicating with the outside world. This means that every time I stop and restart the VM, the IP will change. That is acceptable for now.<\/p>\n<p>I had to add custom firewall rule to allow inbound HTTP traffic at port 8080.<\/p>\n<figure id=\"attachment_606\" aria-describedby=\"caption-attachment-606\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/google-vm-firewall-rules.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"606\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2017\/08\/30\/kp-astrology-rest-api\/google-vm-firewall-rules\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/google-vm-firewall-rules.png\" data-orig-size=\"863,344\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Google Firewall Rules\" data-image-description=\"&lt;p&gt;Google Firewall Rules&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Google Firewall Rules&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/google-vm-firewall-rules.png\" class=\"wp-image-606\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/google-vm-firewall-rules.png?resize=600%2C239\" alt=\"Google Firewall Rules\" width=\"600\" height=\"239\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/google-vm-firewall-rules.png?w=863&amp;ssl=1 863w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/google-vm-firewall-rules.png?resize=300%2C120&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/google-vm-firewall-rules.png?resize=768%2C306&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/google-vm-firewall-rules.png?resize=400%2C160&amp;ssl=1 400w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-606\" class=\"wp-caption-text\"><strong>Google Firewall Rules<\/strong><\/figcaption><\/figure>\n<p>Similarly, I had to configure Windows Server 2012 firewall rules as well.<\/p>\n<p>Finally, I launched my server app on the VM. See the image below.<\/p>\n<figure id=\"attachment_607\" aria-describedby=\"caption-attachment-607\" style=\"width: 401px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Server-start.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"607\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2017\/08\/30\/kp-astrology-rest-api\/server-start\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Server-start.png\" data-orig-size=\"401,267\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"KPAstro REST Server\" data-image-description=\"&lt;p&gt;KPAstro REST Server&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;KPAstro REST Server&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Server-start.png\" class=\"size-full wp-image-607\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Server-start.png?resize=401%2C267\" alt=\"KPAstro REST Server\" width=\"401\" height=\"267\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Server-start.png?w=401&amp;ssl=1 401w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Server-start.png?resize=300%2C200&amp;ssl=1 300w\" sizes=\"(max-width: 401px) 100vw, 401px\" \/><\/a><figcaption id=\"caption-attachment-607\" class=\"wp-caption-text\"><strong>KPAstro REST Server<\/strong><\/figcaption><\/figure>\n<p>Well, I don&#8217;t have a client application yet, so decided to check with the browser. The following screen image shows the data received from the server (in JSON format) for a query requesting Planets information for a chart with given ID.<\/p>\n<figure id=\"attachment_608\" aria-describedby=\"caption-attachment-608\" style=\"width: 599px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/query1.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"608\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2017\/08\/30\/kp-astrology-rest-api\/query1\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/query1.png\" data-orig-size=\"999,430\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Planets Data\" data-image-description=\"&lt;p&gt;Planets Data&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Planets Data&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/query1.png\" class=\"wp-image-608\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/query1.png?resize=599%2C258\" alt=\"Planets Data\" width=\"599\" height=\"258\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/query1.png?w=999&amp;ssl=1 999w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/query1.png?resize=300%2C129&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/query1.png?resize=768%2C331&amp;ssl=1 768w\" sizes=\"(max-width: 599px) 100vw, 599px\" \/><\/a><figcaption id=\"caption-attachment-608\" class=\"wp-caption-text\"><strong>Planets Data<\/strong><\/figcaption><\/figure>\n<p>I chose JSON output format for now since that is the most common. Here is another query getting information about Cuspal positions:<\/p>\n<figure id=\"attachment_609\" aria-describedby=\"caption-attachment-609\" style=\"width: 599px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/houses.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"609\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2017\/08\/30\/kp-astrology-rest-api\/houses\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/houses.png\" data-orig-size=\"999,367\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Cuspal Positions\" data-image-description=\"&lt;p&gt;Cuspal Positions&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Cuspal Positions&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/houses.png\" class=\"wp-image-609\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/houses.png?resize=599%2C220\" alt=\"Cuspal Positions\" width=\"599\" height=\"220\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/houses.png?w=999&amp;ssl=1 999w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/houses.png?resize=300%2C110&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/houses.png?resize=768%2C282&amp;ssl=1 768w\" sizes=\"(max-width: 599px) 100vw, 599px\" \/><\/a><figcaption id=\"caption-attachment-609\" class=\"wp-caption-text\"><strong>Cuspal Positions<\/strong><\/figcaption><\/figure>\n<p>I have so far exposed half a dozen end points. Clearly, there is a lot more that needs to be done, which I will complete in due course.<\/p>\n<p>Of course, before I make it commercial, I need to include Authentication, decide on proper versioning of the end points and support different SDKs (Java, C++, Python, etc.).<\/p>\n<p>Well, I am happy I got off to a good start! Will share updates as and when I make further progress on this service.<\/p>\n<p><em><strong>Note:<\/strong><\/em> The good news is that the REST server engine is now fully implemented and ready for deployment. Read more about it <a href=\"https:\/\/www.rangakrish.com\/index.php\/2024\/06\/08\/kp-astrology-rest-server-part-2\/\" target=\"_blank\" rel=\"noopener\"><em><strong>here<\/strong><\/em><\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In today&#8217;s post I want to share my experience in implementing a set of REST API calls for Astrology. The series on iLangGen will resume after this. As readers of this column probably know, I am the author of an Astrology software called KPAstro. You can read about it here. First released in the year [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[112,49],"tags":[116,114,115,113],"class_list":["post-599","post","type-post","status-publish","format-standard","hentry","category-astrology","category-c","tag-api","tag-kpastro","tag-krishnamurti-padhdhati","tag-rest"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9OLnF-9F","jetpack-related-posts":[{"id":3399,"url":"https:\/\/www.rangakrish.com\/index.php\/2024\/06\/08\/kp-astrology-rest-server-part-2\/","url_meta":{"origin":599,"position":0},"title":"KP Astrology REST Server: Part 2","author":"admin","date":"June 8, 2024","format":false,"excerpt":"In my earlier article, I had briefly described the REST server I wanted to build for Krishnamurti Padhdhati system of astrology. After a long time I have managed to complete the implementation and it is now ready for deployment. In this article, I will go over some of its features\u2026","rel":"","context":"In &quot;Astrology&quot;","block_context":{"text":"Astrology","link":"https:\/\/www.rangakrish.com\/index.php\/category\/astrology\/"},"img":{"alt_text":"KPRest Application Window","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/Start-300x174.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":4285,"url":"https:\/\/www.rangakrish.com\/index.php\/2026\/04\/22\/exploring-astronomy-with-wolfram-mathematica\/","url_meta":{"origin":599,"position":1},"title":"Exploring Astronomy with Wolfram Mathematica","author":"admin","date":"April 22, 2026","format":false,"excerpt":"As a student of astrology and who has written software for Krishnamurti Padhdhati (KP) System, I am fascinated by astronomy. We all know that there is a deep computational\u00a0connection between astronomy and astrology. Every astrological system \u2014 Western tropical, Vedic sidereal, KP, Jaimini, Chinese \u2014 is ultimately dependent on an\u2026","rel":"","context":"In &quot;Mathematica&quot;","block_context":{"text":"Mathematica","link":"https:\/\/www.rangakrish.com\/index.php\/category\/mathematica\/"},"img":{"alt_text":"Planetary Positions","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2026\/04\/position-example-300x232.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2026\/04\/position-example-300x232.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2026\/04\/position-example-300x232.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":520,"url":"https:\/\/www.rangakrish.com\/index.php\/2017\/05\/07\/accessing-dictionary-rest-api-using-lisp\/","url_meta":{"origin":599,"position":2},"title":"Accessing Dictionary API Using Lisp","author":"admin","date":"May 7, 2017","format":false,"excerpt":"A few days ago when I was searching for good online dictionaries, I stumbled upon Oxford Dictionary API for developers. I decided to check it out and registered for a free account. This allows me to make 3000 API calls in a month. Since I am not planning to use\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":41,"url":"https:\/\/www.rangakrish.com\/index.php\/2015\/10\/08\/learning-lisp-resources\/","url_meta":{"origin":599,"position":3},"title":"Learning LISP &#8211; Resources","author":"admin","date":"October 8, 2015","format":false,"excerpt":"During my talks on Lisp Programming, I am invariably asked to suggest good books to start learning the language. Here is a (partial) list that I readily recommend. Beginner Level: ANSI Common Lisp, Paul Graham, Prentice Hall, 1996. Common LISP: A Tutorial, Wendy L.Milner, Prentice Hall, 1988. Land of LISP:\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1285,"url":"https:\/\/www.rangakrish.com\/index.php\/2018\/12\/09\/parsing-text-with-meaningclouds-text-analytics-api\/","url_meta":{"origin":599,"position":4},"title":"Parsing Text with MeaningCloud&#8217;s Text Analytics API","author":"admin","date":"December 9, 2018","format":false,"excerpt":"There is wide-spread interest in Natural Language Processing (NLP) today, and there are several API services available to cater to this demand. See this article for a fairly detailed list of services. All of them support multiple languages, including English. Today, I am going to share my experience in working\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"Get Words Function","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Get-words.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Get-words.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Get-words.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":806,"url":"https:\/\/www.rangakrish.com\/index.php\/2018\/01\/27\/rhyming-words-and-other-interesting-stuff\/","url_meta":{"origin":599,"position":5},"title":"Rhyming Words and Other Interesting Stuff","author":"admin","date":"January 27, 2018","format":false,"excerpt":"If you are into writing poems, stories or essays, or you just have a fascination for words, I encourage you to take a look at Datamuse. Recently I was studying about the structure of various poetic forms, and in the process of browing different sites, I stumbled upon Datamuse. I\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"Topic Words","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/01\/Image1.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/01\/Image1.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/01\/Image1.png?resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/599","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/comments?post=599"}],"version-history":[{"count":0,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/599\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/media?parent=599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/categories?post=599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/tags?post=599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}