PHP Class Webservice_RestController, pimcore

Inheritance: extends Pimcore\Controller\Action\Webservice
Show file Open project: pimcore/pimcore

Public Methods

Method Description
assetAction ( ) end point for asset related data.
assetCountAction ( ) Returns the total number of assets matching the given condition GET http://[YOUR-DOMAIN]/webservice/rest/asset-count?apikey=[API-KEY]&condition=type%3D%27folder%27
assetInquireAction ( ) Checks for existence of the given asset IDs GET http://[YOUR-DOMAIN]/webservice/rest/asset-inquire?apikey=[API-KEY] Parameters: - id single asset ID - ids comma separated list of asset IDs Returns: - List with true or false for each ID
assetListAction ( ) Returns a list of assets id/type pairs matching the given criteria.
classAction ( ) end point for the class definition GET http://[YOUR-DOMAIN]/webservice/rest/class/id/1281?apikey=[API-KEY] returns the class definition for the given class
classesAction ( ) Returns a list of all class definitions.
classificationstoreDefinitionAction ( ) : mixed Returns the classification store feature definition as JSON. Could be useful to provide separate endpoints for the various sub-configs.
documentAction ( ) end point for document related data.
documentCountAction ( ) Returns the total number of documents matching the given condition GET http://[YOUR-DOMAIN]/webservice/rest/asset-count?apikey=[API-KEY]&condition=type%3D%27folder%27
documentInquireAction ( ) Checks for existence of the given document IDs GET http://[YOUR-DOMAIN]/webservice/rest/document-inquire?apikey=[API-KEY] Parameters: - id single document ID - ids comma separated list of document IDs Returns: - List with true or false for each ID
documentListAction ( ) Returns a list of document id/type pairs matching the given criteria.
fieldCollectionAction ( ) end point for the field collection definition GET http://[YOUR-DOMAIN]/webservice/rest/field-collection/id/abt1?apikey=[API-KEY] returns the class definition for the given class
fieldCollectionsAction ( ) Returns a list of all field collection definitions.
fillWebserviceData ( $class, $data )
imageThumbnailAction ( ) Returns the configuration for the image thumbnail with the given ID.
imageThumbnailsAction ( ) Returns a list of all image thumbnails.
init ( )
isDelete ( ) : boolean Returns true if this is a DELETE request. Can be overridden by providing a a method=delete parameter.
isGet ( ) : boolean Returns true if this is a GET request. Can be overridden by providing a a method=get parameter.
isPost ( ) : boolean Returns true if this is a POST request. Can be overridden by providing a a method=post parameter.
isPut ( ) : boolean Returns true if this is a PUT request. Can be overridden by providing a a method=put parameter.
keyValueDefinitionAction ( ) : mixed Returns the group/key config as JSON.
objectAction ( ) end point for object related data.
objectBrickAction ( ) end point for the object-brick definition GET http://[YOUR-DOMAIN]/webservice/rest/object-brick/id/abt1?apikey=[API-KEY] returns the class definition for the given class
objectBricksAction ( ) Returns a list of all object brick definitions.
objectCountAction ( ) Returns the total number of objects matching the given condition GET http://[YOUR-DOMAIN]/webservice/rest/object-count?apikey=[API-KEY]&condition=type%3D%27folder%27
objectInquireAction ( ) Checks for existence of the given object IDs GET http://[YOUR-DOMAIN]/webservice/rest/object-inquire?apikey=[API-KEY] Parameters: - id single object ID - ids comma separated list of object IDs Returns: - List with true or false for each ID
objectListAction ( ) Returns a list of object id/type pairs matching the given criteria.
objectMetaAction ( ) end point for object metadata GET http://[YOUR-DOMAIN]/webservice/rest/object-meta/id/1281?apikey=[API-KEY] returns the json-encoded class definition for the given object
quantityValueUnitDefinitionAction ( ) : mixed Returns the classification store feature definition as JSON. Could be useful to provide separate endpoints for the various sub-configs.
serverInfoAction ( ) Returns a list of all class definitions.
systemClockAction ( ) Returns the current time.
translationsAction ( ) Returns translations
userAction ( ) GET http://[YOUR-DOMAIN]/webservice/rest/user?apikey=[API-KEY] returns the json-encoded user data for the current user

Protected Methods

Method Description
getQueryParams ( )

Private Methods

Method Description
checkPermission ( $element, $category )
checkUserPermission ( $permission )
inquire ( $type )
map ( $wsData, $data )
phpinfo_array ( )

Method Details

assetAction() public method

- get asset by id GET http://[YOUR-DOMAIN]/webservice/rest/asset/id/1281?apikey=[API-KEY] returns json-encoded asset data. - delete asset by id DELETE http://[YOUR-DOMAIN]/webservice/rest/asset/id/1281?apikey=[API-KEY] returns json encoded success value - create asset PUT or POST http://[YOUR-DOMAIN]/webservice/rest/asset?apikey=[API-KEY] body: json-encoded asset data in the same format as returned by get asset by id but with missing id field or id set to 0 returns json encoded asset id - update asset PUT or POST http://[YOUR-DOMAIN]/webservice/rest/asset?apikey=[API-KEY] body: same as for create asset but with asset id returns json encoded success value
public assetAction ( )

assetCountAction() public method

Parameters: - condition - group by key
public assetCountAction ( )

assetInquireAction() public method

Checks for existence of the given asset IDs GET http://[YOUR-DOMAIN]/webservice/rest/asset-inquire?apikey=[API-KEY] Parameters: - id single asset ID - ids comma separated list of asset IDs Returns: - List with true or false for each ID
public assetInquireAction ( )

assetListAction() public method

Example: GET http://[YOUR-DOMAIN]/webservice/rest/asset-list?apikey=[API-KEY]&order=DESC&offset=3&orderKey=id&limit=2&condition=type%3D%27folder%27 Parameters: - condition - sort order (if supplied then also the key must be provided) - sort order key - offset - limit - group by key
public assetListAction ( )

classAction() public method

end point for the class definition GET http://[YOUR-DOMAIN]/webservice/rest/class/id/1281?apikey=[API-KEY] returns the class definition for the given class
public classAction ( )

classesAction() public method

Returns a list of all class definitions.
public classesAction ( )

classificationstoreDefinitionAction() public method

Returns the classification store feature definition as JSON. Could be useful to provide separate endpoints for the various sub-configs.

documentAction() public method

- get document by id GET http://[YOUR-DOMAIN]/webservice/rest/document/id/1281?apikey=[API-KEY] returns json-encoded document data. - delete document by id DELETE http://[YOUR-DOMAIN]/webservice/rest/document/id/1281?apikey=[API-KEY] returns json encoded success value - create document PUT or POST http://[YOUR-DOMAIN]/webservice/rest/document?apikey=[API-KEY] body: json-encoded document data in the same format as returned by get document by id but with missing id field or id set to 0 returns json encoded document id - update document PUT or POST http://[YOUR-DOMAIN]/webservice/rest/document?apikey=[API-KEY] body: same as for create document but with object id returns json encoded success value
public documentAction ( )

documentCountAction() public method

Parameters: - condition - group by key
public documentCountAction ( )

documentInquireAction() public method

Checks for existence of the given document IDs GET http://[YOUR-DOMAIN]/webservice/rest/document-inquire?apikey=[API-KEY] Parameters: - id single document ID - ids comma separated list of document IDs Returns: - List with true or false for each ID

documentListAction() public method

Example: GET http://[YOUR-DOMAIN]/webservice/rest/document-list?apikey=[API-KEY]&order=DESC&offset=3&orderKey=id&limit=2&condition=type%3D%27folder%27 Parameters: - condition - sort order (if supplied then also the key must be provided) - sort order key - offset - limit - group by key
public documentListAction ( )

fieldCollectionAction() public method

end point for the field collection definition GET http://[YOUR-DOMAIN]/webservice/rest/field-collection/id/abt1?apikey=[API-KEY] returns the class definition for the given class

fieldCollectionsAction() public method

Returns a list of all field collection definitions.

fillWebserviceData() public static method

public static fillWebserviceData ( $class, $data )

getQueryParams() protected method

protected getQueryParams ( )

imageThumbnailAction() public method

Returns the configuration for the image thumbnail with the given ID.

imageThumbnailsAction() public method

Returns a list of all image thumbnails.

init() public method

public init ( )

isDelete() public method

Returns true if this is a DELETE request. Can be overridden by providing a a method=delete parameter.
public isDelete ( ) : boolean
return boolean

isGet() public method

Returns true if this is a GET request. Can be overridden by providing a a method=get parameter.
public isGet ( ) : boolean
return boolean

isPost() public method

Returns true if this is a POST request. Can be overridden by providing a a method=post parameter.
public isPost ( ) : boolean
return boolean

isPut() public method

Returns true if this is a PUT request. Can be overridden by providing a a method=put parameter.
public isPut ( ) : boolean
return boolean

keyValueDefinitionAction() public method

Returns the group/key config as JSON.
public keyValueDefinitionAction ( ) : mixed
return mixed

objectAction() public method

- get object by id GET http://[YOUR-DOMAIN]/webservice/rest/object/id/1281?apikey=[API-KEY] returns json-encoded object data. - delete object by id DELETE http://[YOUR-DOMAIN]/webservice/rest/object/id/1281?apikey=[API-KEY] returns json encoded success value - create object PUT or POST http://[YOUR-DOMAIN]/webservice/rest/object?apikey=[API-KEY] body: json-encoded object data in the same format as returned by get object by id but with missing id field or id set to 0 returns json encoded object id - update object PUT or POST http://[YOUR-DOMAIN]/webservice/rest/object?apikey=[API-KEY] body: same as for create object but with object id returns json encoded success value
public objectAction ( )

objectBrickAction() public method

end point for the object-brick definition GET http://[YOUR-DOMAIN]/webservice/rest/object-brick/id/abt1?apikey=[API-KEY] returns the class definition for the given class
public objectBrickAction ( )

objectBricksAction() public method

Returns a list of all object brick definitions.
public objectBricksAction ( )

objectCountAction() public method

Parameters: - condition - group by key - objectClass the name of the object class (without "Object_"). If the class does not exist the filter criteria will be ignored!
public objectCountAction ( )

objectInquireAction() public method

Checks for existence of the given object IDs GET http://[YOUR-DOMAIN]/webservice/rest/object-inquire?apikey=[API-KEY] Parameters: - id single object ID - ids comma separated list of object IDs Returns: - List with true or false for each ID
public objectInquireAction ( )

objectListAction() public method

Example: GET http://[YOUR-DOMAIN]/webservice/rest/object-list?apikey=[API-KEY]&order=DESC&offset=3&orderKey=id&limit=2&condition=type%3D%27folder%27 Parameters: - condition - sort order (if supplied then also the key must be provided) - sort order key - offset - limit - group by key - objectClass the name of the object class (without "Object_"). If the class does not exist the filter criteria will be ignored!
public objectListAction ( )

objectMetaAction() public method

end point for object metadata GET http://[YOUR-DOMAIN]/webservice/rest/object-meta/id/1281?apikey=[API-KEY] returns the json-encoded class definition for the given object
public objectMetaAction ( )

quantityValueUnitDefinitionAction() public method

Returns the classification store feature definition as JSON. Could be useful to provide separate endpoints for the various sub-configs.

serverInfoAction() public method

Returns a list of all class definitions.
public serverInfoAction ( )

systemClockAction() public method

Returns the current time.
public systemClockAction ( )

translationsAction() public method

Returns translations
public translationsAction ( )

userAction() public method

GET http://[YOUR-DOMAIN]/webservice/rest/user?apikey=[API-KEY] returns the json-encoded user data for the current user
public userAction ( )