Solodev empowers users to extend their data and content using a built-in Application Programming Interface (API) that allows you to expose data stored in modules to external publishing channels such as websites, mobile apps, intranets, and other API enabled technologies. This article will teach you how to access data stored in your Solodev modules using Solodev's built-in API.
For more information on Solodev Modules, please click here.
Let's say you want the same content from the news module on your website to be displayed on your mobile app in realtime. This is a common scenario in which Solodev's built-in API can make life significantly easier for your development team.
Step 1 - Navigate to the module you'd like to expose and click "Modify"
Step 2 - Scroll down to the "API INFO" Panel and expand it
Step 3 - Copy and Paste the API URL into your browser
Step 4 - Navigate to the users directory and open up your user folder
Scroll down to the "API Information" tab and click "Generate Key."
Step 5 - Navigate to browser where API URL was pasted
Step 6 - Copy and Paste Token and Token Secret Fields
Copy the API Token and API Token Secret from your profile and replace the default values in your web browser. Before hitting enter, make sure your website URL is appended to the URL. The end result should look something like this:
Step 7 - Make the Call (Hit Enter)
All of the data from your module will be returned in JSON format. Now that you know how to access your Solodev Modules via API you can make custom API calls to integrate and style certain fields for the purposes of your mobile app.
Step 8 - Make an API call on one entry from your module
Typically, you'll only want to retrieve a single news entry. Let's take a look at how you can modify the API call above to only retrieve a specific entry. In this case, I only want Solodev's API to return the news entry titled "Selecting a Website Content Management System?" So how would I go about doing this?
When opening the entry I can see it's ID is 294. Looking at the JSON returned in the previous screenshot, I see the field for an entry is called "calendar_entry_id".
I modify my query as shown below.