Constructor
CeloxisAPI
CeloxisAPI
(string $baseUrl, [string $dataFormat = 'json'])
-
string
$baseUrl: The base URL to use. Example: http://projects.mycompany.com:8888/psa/api.do
-
string
$dataFormat: The default data format to use. One of xml or json.
Creates objects in the system
void
create
(string $what, array $objects)
-
string
$what: One of: users, time-entries, task-updates, tasks & projects
-
array
$objects: List of objects to insert where each object is an associative array where key is the name of the property to insert and value is the value of the property. Refer the individual create functions for more information.
Prints out useful debugging information. Use it especially when you encounter an exception
void
debugLastRequest
()
Parses an API date and returns an array as per strptime
array
decodeDate
(string $date)
-
string
$date: Date in API format e.g. 2009-02-23T08:00:00
Useful function to encode date in the API format
string
encodeDate
(integer $yy, integer $mm, integer $dd, [integer $hh = 0], [integer $mi = 0], [integer $ss = 0])
-
integer
$yy: year (e.g. 2009)
-
integer
$mm: month - 1 for January, 12 for December
-
integer
$dd: date e.g. 20
-
integer
$hh: hours
-
integer
$mi: minutes
-
integer
$ss: seconds
Login with the API user. This user must have administrative privileges in the system.
void
login
(string $userName, string $password, string $companyCode)
-
string
$userName: The login name
-
string
$password: The password
-
string
$companyCode: The company code
Perform a query.
array
query
(array $args)
-
array
$args: The arguments as specified in the API reference : table (mandatory), filtering conditions, join-with, order-by, where, sql, skip, take
Query the planned, available and actual utilization of resources in a given time period.
array
queryUtilization
(array $args)
-
array
$args: The arguments as specified in the API reference : from (mandatory), to (mandatory), project_id, project_phase_ids, zoom (5 for Day, 3 for Week and 2 for Month), user_id - only include data for this user
Updates already existing objects in the system
void
update
(string $what, array $objects)
-
string
$what: either tasks or projects
-
array
$objects: List of objects to be updates where each object is an associative array where key is the name of the property to insert and value is the value of the property. Refer the individual update functions for more information.