Difference between revisions of "API"
Mark Walker (talk | contribs) (Created page with "== Overview == This document is a work in progress on a proposed API for eCoachManager. The API is a RESTful web service based upon XML/JSON and HTTP POST. Initially the API w...") |
Mark Walker (talk | contribs) (→Mobile Apps API) |
||
Line 72: | Line 72: | ||
*View own jobs | *View own jobs | ||
− | == Mobile Apps API == | + | == [[Mobile Apps API]] == |
The Mobile Apps API allows customers to perform basic functions with a simplified authentication proces. | The Mobile Apps API allows customers to perform basic functions with a simplified authentication proces. |
Revision as of 08:47, 17 July 2011
Contents
Overview
This document is a work in progress on a proposed API for eCoachManager.
The API is a RESTful web service based upon XML/JSON and HTTP POST.
Initially the API will feature a fairly limited feature set, with plans to add more and more of the systems functionality over time.
Once the API has developed it will provide the basis for the proposed mobile applications.
Access
The API will be accessed via URL's specific to each eCoachManager system.
In this guide we will use www.ecoachmanager.com as an example but this should be replaced with the address used to access your eCoachManager system.
All API calls must be made via HTTP to the target URL with 6 values submitted via POST.
User
The user name is the same as the standard eCoachManager users and will perform functions as though you are logged into the web interface.
Key
API Keys have to be created manually per user in the config area of eCoachManager. This ensures that only specified accounts are accessible via the API.
Timestamp
The current Unix timestamp at the time of creating the API request. <?php date(“U”);?>
Auth
To ensure that API requests cannot be modified in transit, the Auth field contains a hash created using the action, timestamp and your normal password.
<?php sha1($action.$data.$timestamp.md5($password));?>
Action
The required action
Data
An XML/JSON document formatted for the required action.
The data format is determined by the sending format
Admin API
The Admin API allows staff to perform functions from outside the normal web interface.
Authentication is performed against the normal admin users who can login to eCoachManager.
Admin API calls should be posted to the following API URL http://www.ecoachmanager.com/lib/api?admin
The following functions will be available initially:
- Add jobs
- Update jobs
- View all jobs
Drivers API
The Drivers API allows drivers to perform functions from outside the normal web interface.
Authentication is performed against the drivers database.
Drivers API calls should be posted to the following API URL http://www.ecoachmanager.com/lib/api?driver
The following functions will be available initially:
- View assigned Jobs
- Accept or Reject Jobs
- Update Status
Clients API
The Clients API allows customers to perform functions from outside the normal web interface.
Authentication is performed against the myquotes logins.
Drivers API calls should be posted to the following API URL. Http://www.ecoachmanager.com/lib/api?client
The following functions will be available initially:
- Add jobs
- Update own jobs
- View own jobs
Mobile Apps API
The Mobile Apps API allows customers to perform basic functions with a simplified authentication proces.
Authentication is performed against the quote number and customers mobile number.
App API calls should be sent to http://www.ecoachmanager.com/lib/api?app
The following functions will be available initially:
- View Single Job details