Class CeloxisAPI

Description

The Celoxis API class is a convenient way to access the Celoxis system using PHP. We recommend that you first take a look at the sample code which illustrates the API in action.

Located in /CeloxisAPI.php (line 19)


	
			
Variable Summary
Method Summary
CeloxisAPI CeloxisAPI (string $baseUrl, [string $dataFormat = 'json'])
void create (string $what, array $objects)
array decodeDate (string $date)
string encodeDate (integer $yy, integer $mm, integer $dd, [integer $hh = 0], [integer $mi = 0], [integer $ss = 0])
void login (string $userName, string $password, string $companyCode)
array query (array $args)
array queryUtilization (array $args)
void update (string $what, array $objects)
Variables
mixed $lastResponse (line 25)

Details of the last response from the server. Use the PHP function var_dump for debugging information

  • access: public
Methods
Constructor CeloxisAPI (line 36)

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.
create (line 128)

Creates objects in the system

  • access: public
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.
debugLastRequest (line 179)

Prints out useful debugging information. Use it especially when you encounter an exception

  • access: public
void debugLastRequest ()
decodeDate (line 171)

Parses an API date and returns an array as per strptime

  • return: array as per the php function strptime
  • access: public
array decodeDate (string $date)
  • string $date: Date in API format e.g. 2009-02-23T08:00:00
encodeDate (line 156)

Useful function to encode date in the API format

  • return: encoded date suitable for API like 2009-02-23T08:00:00
  • access: public
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 (line 51)

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
query (line 75)

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
queryUtilization (line 104)

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
update (line 139)

Updates already existing objects in the system

  • access: public
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.

Documentation generated on Tue, 28 Jul 2009 06:00:04 +0000 by phpDocumentor 1.4.1