API Documentation

API Documentation / Wiki

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

  1. Main API Functions
  2. Get API Functions
  3. Set API Functions
  4. Connect API Functions
  5. Security API Functions
  6. Media API Functions
  7. Metadata API Functions
  8. Link API Functions
  9. Plugin API Functions
  10. User Interface API Functions
  11. Template Engine API Functions
  12. XML API Functions
  13. Report API Functions
  14. Project API Functions
  15. Task API Functions
  16. Workflow API Functions
  17. Cloud Storage API Functions
  18. 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
  • true / false on error


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
  • $mgmt_config

Output
  • true/false


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
  • $mgmt_config

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
  • $mgmt_config

Output
  • true / false on error


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
  • $mgmt_config

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
  • $mgmt_config

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
  • $mgmt_config

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
  • $mgmt_config

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
  • $mgmt_config

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
  • $mgmt_config

Output
  • true / false on error


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
  • filedata/false on error


setuserboxes


Syntax
setuserboxes ($name_array, $user)

Input parameters
  • $name_array ... home box file names [array or string]
  • $user ... user name [string]

global input parameters
  • $mgmt_config

Output
  • true / false


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
  • $mgmt_config

Output
  • true / false


Any Questions?
This website uses cookies to ensure you get the best experience on our website. More info