The following pages provide an overview about all functions of the API (Application Programming Interface) of the hyper Content & Digital Asset Management Server.
Please note, that you might usually only require few functions for the development of Plugins, template functions like navigation, sitemap and so on. Please read the Template Designers Guide and Programers Guide for a better insight.
The API is primarily used for the implementation of standalone applications that leverage the capabilities of the hyper Content & Digital Asset Management Server. The API is not to be confused with the OpenAPI, which is based on a SOA (Service Oriented Architecture), and is not part of the Free Edition.
For Questions & Answers please visit the Google Group.
hyperCMS API Function Reference
- Main API Functions
- Get API Functions
- Set API Functions
- Connect API Functions
- Security API Functions
- Media API Functions
- Metadata API Functions
- Link API Functions
- Plugin API Functions
- User Interface API Functions
- Template Engine API Functions
- XML API Functions
- Report API Functions
- Project API Functions
- Task API Functions
- Workflow API Functions
- Cloud Storage API Functions
- Import/Export API Functions
▲ Set API Functions
setsession
Syntax
setsession ($variable, $content="", $write=false)
Input parameters
- $variable ... temporary hyperCMS variable name [string or array]
- $content ... value [string or array] (optional)
- $write ... write session data for load balancer [boolean] (optional)
Output
settemplate
Description
This function sets the template for a single folder/object or all objects in a folder.
Syntax
settemplate ($site, $location, $object, $template, $recursive=false)
Input parameters
- $site ... publication name [string]
- $location ... location [string]
- $object ... object [string]
- $template ... template name [string]
- $recursive ... recursive [boolean] (optional)
global input parameters
Output
settaxonomy
Description
Analyzes the content regarding all taxonomy keywords, saves results in database and returns an array (multilingual support based on taxonomies).
Syntax
settaxonomy ($site, $container_id, $langcode="", $taxonomy=array())
Input parameters
- $site ... publication name [string]
- $container_id ... container ID [string]
- $langcode ... 2-digit language code [string]][array] (optional)
- $taxonomy ... taxonomy definition [array] (optional)
global input parameters
Output
- result array / false on error
setcontentupdate
Description
Appending data to an existing file with the update information of a content container.
Syntax
setcontentupdate ($container_id, $update_data)
Input parameters
- $container_id ... container ID [integer]
- $update_data ... update information [string]
global input parameters
Output
setarticle
Description
Set article content in container. The content container will be returned and not saved.
Syntax
setarticle ($site, $contentdata, $contentfile, $arttitle=array(), $artstatus=array(), $artdatefrom=array(), $artdateto=array(), $artuser=array(), $user="sys")
Input parameters
- $site ... publication name [string]
- $contentdata ... container (XML) [string]
- $contentfile ... container name [string]
- $arttitle ... article title [array]
- $artstatus ... article status [array]
- $artdatefrom ... article beginn date [array] (optional)
- $artdateto ... article end date [array] (optional)
- $artuser ... article user name [array or string] (optional)
- $user ... user name [string] (optional)
global input parameters
Output
- updated content container (XML)
false on error
settext
Description
Set text content in container and database. The content container will be returned and not saved.
Syntax
settext ($site, $contentdata, $contentfile, $text=array(), $type=array(), $art="no", $textuser=array(), $user="sys", $charset="", $addmicrotime=false)
Input parameters
- $site ... publication name [string]
- $contentdata ... container (XML) [string]
- $contentfile ... container name [string]
- $text ... text with tag Id as key and text as value [array]
- $type ... text type [array or string] [u, f, l, c, d, k, s]
- $art ... article [array or string] [yes, no] (optional)
- $textuser ... text user [array or string] (optional)
- $user ... user name [string] (optional)
- $charset ... character set of text content [string] (optional)
- $addmicrotime ... add microtime to ID used for comments [boolean] (optional)
global input parameters
- $mgmt_config
$publ_config
Output
- updated content container (XML)
false on error
setmedia
Description
Set media content in container and database. The content container will be returned and not saved.
Syntax
setmedia ($site, $contentdata, $contentfile, $mediafile=array(), $mediaobject=array(), $mediaalttext=array(), $mediaalign=array(), $mediawidth=array(), $mediaheight=array(), $art="no", $mediauser="", $user="sys", $charset="")
Input parameters
- $site ... publication name [string]
- $contentdata ... container (XML) [string]
- $contentfile ... container name [string]
- $mediafile ... media files with tag ID as key and reference as value [array] (optional)
- $mediaobject ... new media object references with tag ID as key and reference as value [array]
- $mediaalttext ... media alternative text [array] (optional)
- $mediaalign ... media alignment [array] (optional)
- $mediawidth ... media width [array] (optional)
- $mediaheight ... media height [array] (optional)
- $art ... article [array or string] [yes, no] (optional)
- $mediauser ... content user [array or string] (optional)
- $user ... user name [string] (optional)
- $charset ... character set of text content [string] (optional)
global input parameters
Output
- updated content container (XML)
false on error
setpagelink
Description
Set link content in container and database. The content container will be returned and not saved.
Syntax
setpagelink ($site, $contentdata, $contentfile, $linkhref=array(), $linktarget=array(), $linktext=array(), $art="no", $linkuser=array(), $user="sys", $charset="")
Input parameters
- $site ... publication name [string]
- $contentdata ... container (XML) [string]
- $contentfile ... container name [string]
- $linkhref ... new link with tag ID as key and link reference as value [array]
- $linktarget ... link target [array] (optional)
- $linktext ... link text [array] (optional)
- $art ... article [array or string] [yes, no] (optional)
- $linkuser ... content user [array or string] (optional)
- $user ... user name [string] (optional)
- $charset ... character set of text content [string] (optional)
global input parameters
Output
- updated content container (XML)
false on error
setcomplink
Description
Set component link content in container and database. The content container will be returned and not saved.
Syntax
setcomplink ($site, $contentdata, $contentfile, $component=array(), $condition=array(), $art="no", $compuser=array(), $user="sys")
Input parameters
- $site ... publication name [string]
- $contentdata ... container (XML) [string]
- $contentfile ... container name [string]
- $component ... new components with tag ID as key and component reference as value [array]
- $condition ... conditions [array] (optional)
- $art ... article [array or string] [yes, no] (optional)
- $compuser ... content user [array or string] (optional)
- $user ... user name [string] (optional)
global input parameters
Output
- updated content container (XML)
false on error
sethead
Description
Set content content in container head.
Syntax
sethead ($site, $contentdata, $contentfile, $headcontent=array(), $user="sys", $charset="")
Input parameters
- $site ... publication name [string]
- $contentdata ... container (XML) [string]
- $contentfile ... container name [string]
- $headcontent ... head content with tagname as ID and text as value [array]
- $user ... user name [string] (optional)
- $charset ... character set of text content [string] (optional)
global input parameters
Output
- updated content container (XML)
false on error
setrelation
Description
This function sets a relationship between two objects by adding the reference as a multi component link to the specified tag ID of both objects.
Syntax
setrelation ($site, $location_1="", $object_1="", $id_1="Related", $location_2="", $object_2="", $id_2="Related", $user="")
Input parameters
- $site ... publication name [string]
- $location_1 ... location path 1 [string]
- $object_1 ... object name 1 for component link reference 2 [string]
- $id_1 ... tag/content ID 1 for component reference to object 2 [string] (optional)
- $location_2 ... location path 2 [string]
- $object_2 ... object name 2 for component link reference 2 [string]
- $id_2 ... tag/content ID 2 for component reference to object 1 [string] (optional)
- $user ... user name [string]
global input parameters
Output
setfilename
Description
Sets or creates the file name of the hyperCMS content file, template file, media file or file name pointer
Syntax
setfilename ($filedata, $tagname, $value)
Input parameters
- $filedata ... file content [string]
- $tagname ... hyperCMS tag name in page or component [content, template, media, name]
- $value ... new value [string]
Output
setuserboxes
Syntax
setuserboxes ($name_array, $user)
Input parameters
- $name_array ... home box file names [array or string]
- $user ... user name [string]
global input parameters
Output
setguiview
Syntax
setguiview ($objectview, $explorerview, $sidebar, $user)
Input parameters
- $objectview ... object view name [formedit, cmsview, inlineview]
- $explorerview ... explorer view name [detail, small, medium, large]
- $sidebar ... show sidebar [true=1, false=0]
- $user ... user name [string]
global input parameters
Output