Class Api
A RESTful API system for interacting with the Blesta backend.
All public model methods are accessible. Plugin models may also be invoked by simply formatting the model as Plugin.Model (e.g. /api/plugin.model/method.format). Supports XML, JSON, and PHP as format types.
Copyright: Copyright (c) 2010, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at app/controllers/api.php
Methods summary
| 
				 public 
				
				
				 | 
			#
			 preAction( )Verify that the request is properly formatted, and ensure the requester is authorized. | 
| 
				 public 
				
				
				 | 
Methods inherited from AppController
			__construct(), 
			adminWidgets(), 
			authorized(), 
			clientWidgets(), 
			flashMessage(), 
			getCompany(), 
			getDaysOfWeek(), 
			getMonths(), 
			getTimes(), 
			getWidgets(), 
			isAjax(), 
			isLoggedIn(), 
			isStaffAsClient(), 
			layoutSections(), 
			licenseCheck(), 
			outputAsJson(), 
			postAction(), 
			primeCompany(), 
			renderAjaxWidget(), 
			renderAjaxWidgetIfAsync(), 
			reorderWidgets(), 
			requireLogin(), 
			setDefaultView(), 
			setMaintenance(), 
			setMessage(), 
			setNav(), 
			setNavActive(), 
			setTheme(), 
			setWidgetState(), 
			toggleWidget(), 
			triggerPreAction(), 
			verifyCsrfToken()
		
Methods inherited from Controller
			clearCache(), 
			components(), 
			draw(), 
			emptyCache(), 
			helpers(), 
			partial(), 
			redirect(), 
			render(), 
			set(), 
			setDefaultViewPath(), 
			startCaching(), 
			stopCaching(), 
			uses()
		
Magic methods summary
Constants summary
| string | 
OK			 | "OK" | |
| string | 
NOT_FOUND			 | "The requested resource does not exist." | |
| string | 
UNAUTHORIZED			 | "The authorization details given appear to be invalid." | |
| string | 
FORBIDDEN			 | "The requested resource is not accessible." | |
| string | 
UNSUPPORTED_FORMAT			 | "The format requested is not supported by the server." | |
| string | 
MAINTENANCE_MODE			 | "The requested resource is currently unavailable due to maintenance." | |
| string | 
INTERNAL_ERROR			 | "An unexpected error occured." | |
| string | 
BAD_REQUEST			 | "The request cannot be fulfilled due to bad syntax." | 
Properties summary
Properties inherited from AppController
			$admin_uri, 
			$base_uri, 
			$base_url, 
			$client_uri, 
			$company_id, 
			$components, 
			$helpers, 
			$layout, 
			$request_uri, 
			$server_protocol
		
Properties inherited from Controller
			$action, 
			$controller, 
			$files, 
			$get, 
			$is_cli, 
			$plugin, 
			$post, 
			$structure, 
			$structure_view, 
			$uri, 
			$uri_str, 
			$uses, 
			$view
		
