Managing Your DreamFactory Instance Using the System APIs

Table of contents

DreamFactory includes a web-based administration console used for performing tasks such as managing APIs, administrators, and business logic. However many users prefer to instead automate administrative tasks through scripting. This is useful for several reasons. First, automation reduces the amount of work required to manage multiple DreamFactory environments. Second, it opens up the possibility of integrating DreamFactory features into third-party applications such as an API monetization SaaS. In this post we'll demonstrate just how easy managing your DreamFactory instance using the system APIs can really be.

Did you know you can generate a full-featured, documented, and secure REST API in minutes using DreamFactory? Sign up for our free 14 day hosted trial to learn how! Our guided tour will show you how to create an API using an example database provided to you as part of the trial!

Create Your REST API Now

{<br>  "resource":[<br>  {<br>    "id":null,<br>    "name":"mysql",<br>    "label":"MySQL API",<br>    "description":"MySQL API",<br>    "is_active":true,<br>    "type":"mysql",<br>    "config":{<br>    "max_records":1000,<br>    "host":"HOSTNAME",<br>    "port":3306,<br>    "database":"DATABASE",<br>    "username":"USERNAME",<br>    "password":"PASSWORD"<br>  },<br>  "service_doc_by_service_id":null<br>  }<br>  ]<br>}

Be sure to update the HOSTNAME, DATABASE, USERNAME, and PASSWORD placeholders to reflect the credentials associated with your MySQL database. Of course, you're not limited to creating just MySQL APIs; any of DreamFactory's supported service types can be created and managed using the system APIs. After submitting a successful request, a 201 Created status code is returned along with the newly created service's ID:

{<br>  "resource": [<br>  {<br>    "id": 194<br>  }<br>  ]<br>}<br><br>

We invite you to check out the latest chapter in our guide, creatively titled "Using the System APIs" for more examples like this, including a Bash shell scripting example which could serve as the starting point for automating management of a multi-environment DreamFactory solution.