The client want the following:
Specification for PHP API Wrapper
The Shared Learning Collaborative (SLC) ([url removed, login to view]) is a common education data store accessed via REST APIs. This specification is a request for quote for building a PHP API wrapper for some frequently requested API endpoints. Solutions for Empowerment Technology shall hereby be referred to as the “employer” and responding developer as “contractor”.
The SLC API uses OAuth2 for the authentication process. At this point, the SLC only allows for “user session tokens” in which a user must login and after a dynamically generated token is returned. The SLC API speaks both JSON and XML.
UPDATE: The SugarCRM-REST-API library may provide a good base for developing the SLC API library. This library provides generalized abstract endpoints in which the developer provides methods to retrieve or update data (instead of calling 'getStudents', a developer will call 'get' and pass in 'getStudents' as a parameter). This could work if the contracting developer agrees with this appoach in the aims of reducing amount of effort required.
1. PHP API Library
a. The resultant work must be a PHP API Library which will be referenced by an “include” statement.
b. The contractor will hold no license or proprietary ownership over the resultant library. The contractor understands this library will be released as open-source under the Apache licensing model.
c. The PHP API Library must be object-orientated. Responses must be returned as object classes (the developer may use json_decode to form the object class of the return data item).
a. The contractor shall select a well-known PHP OAuth2 library to manage the authentication process.
b. The contractor shall store the OAuth2 token in a PHP session variable (not in a cookie nor exposed to the end user in any way).
c. If an API response contains [ “type":"Unauthorized","message":"Access DENIED: Login Required","code":401} ], redirect the user back to the login screen for re-authentication.
3. Test PHP Page
a. The contractor shall build a single PHP test page to call the API.
b. The test page shall allow the user to select an API endpoint, input a GUID of the record and will show the response as text within the page.
c. The contractor shall perform testing with the small sample dataset and
4. API Endpoints
a. Base URL: [url removed, login to view]
5. Response Base Class
a. The API should have a response base class as a container for all API responses.
b. The response class should report the operation status after executed.
SLC Sandbox Documentation
SLC Sandbox documentation is available at http://dev.slcedu.org. A quickstart guide is available at [url removed, login to view]
Sample Request Header
Authorization: Bearer t-e9df5837-f1db-4120-b1cb-99677a0ca92c
Please read the project first and write the word "Understood". Also write your steps and suggestions to complete the project with a short description of what you understood.