dimasahmad / dapodik-sdk

Unofficial Dapodik SDK for PHP
MIT License
5 stars 7 forks source link

not issue, just req for API Syncdikdas #1

Closed antmills660 closed 3 years ago

antmills660 commented 3 years ago

Saya sedang mencari API sync dikdas agar bisa di integrasikan ke laravel untuk web aplikasi manajemen & pembelajaran sekolah. Jika web servis, koneksinya ke localhost, harus ditempatkan ke vps, merepotkan & makan biaya. Akan sangat berterima kasih jika bisa menemukan.

dimasahmad commented 3 years ago

I think that is impossible. You are basically have to reverse engineer the entire Dapodik App since you need to learn not only how it sync local data to the Dapodik's main server, you also have to make sense the entire data. That's just not how you use Dapodik's data as a 3rd party.

Dapodik was designed to be run on a windows machine, then 3rd party apps use the exposed local endpoints to access data. There is simply no other way.

dimasahmad commented 3 years ago

Hosting dapodik should be easy and cheap if you ever choose to host it on a cloud machine. Just get the cheapest windows server with GUI. Or learn basic networking, make a tunnel from your hosted laravel app into a locally hosted dapodik server.

The latter is the most common pattern 3rd party apps use. They either make a small windows app to be the bridge between dapodik and their app, or they simply make direct tunnel connection from their server to the workstation that host the dapodik app.

antmills660 commented 3 years ago

actually inside the dapodik installer it's just a web php app (simphony if i am correct), webserver using apache, and a database using postgreSQL. The installer just copy, write postgre password and import database from temp folder. You can see it by disassembling the installer.

After i think about it, this API web service can be use to pull data from dikdas server, just need to change the location of the local server to online server, whether its hosting server or vps. now.. the only problem is the php files is encrypted using ioncube loader, can't do more analysis on the config file to write it on laravel.

dimasahmad commented 3 years ago

the only problem is the php files is encrypted using ioncube loader, can't do more analysis on the config file to write it on laravel.

This is exactly why disassembling their API call to their main server is not a smart idea. Maintaining it would be too much to do as we are basically reverse engineering everything the Dapodik Web UI app was designed for. And in case you didn't know, there is rate limit on the main Dikdas server. I can only "sync" for a very limited number of times per day, so accessing their data directly would be problematic in the long run.

I am trying to update the code this year to cover the API calls the web UI uses, and it is really exhausting 😅 In the end, I switched to RPA to automate things and considering to abandon this project altogether since it's way easier to use RPA than reversing all API calls of the web UI.

Until Kemdikbud officially released 3rd party API endpoint for Dikdas servers (which very unlikely), I would advise we stay using their Dapodik Web UI app, be it programmatically, robotically, or even manually 😄