Dynamic Forms API

 Problem Description : 

Description of how to add new API calls to Dynamic Forms.

 

 

 Resolution : 

 

There is TEST API and a PROD API. The test API is located at \\buzzstage\d$\inetpub\apit. the PROD API is located at \\buzzard\d$\inetpub\apiroot.

 

The api folder contains the PHP classes for handling API calls. The only file in this folder that needs to be edited will be the NextGenAPI.class.php file when adding a new end point.

 

The config folder contains the connection configuration. The JWT element is a random string that is used for authentication. LEAVE THE AUTHENTICATION METHOD TO JWT. The database element contains the connection information for the database.

 

The providers folder contains the sqls for the API calls. Any new query functions added will also need to be added to the IDbProvider.php file.

 

The vendor folder is third party libraries used by the API.

 

Use the following steps below to add a new API call to the Dynamic Forms API

1. Create a new function in the NextGenApi.class.php. The function name needs to be the end point for the API. I.e. to get instructor info the end point is /api/instructor/<<929>>. Then as many arguments as the call needs should follow. For example to get schedule info, it's /api/<<student id>>/<<term code>> for a term specific schedule or just /api/<<student id>> to get all the students current and past schedules.

2. Create a sql(s) to go along with the end point. The sql used will be determined by the http request type. GET request should be SELECTS, POST requests should be INSERTS, DELETE requests should DELETES, and PUT requests should be UPDATES.

 

 

 

 

 Revision Date : 11/25/2019