Beispiele für API Calls
Create Template
<api>
<organizationId>Virtimo</organizationId>
<locale>en</locale>
<requests>
<request>
<module>am</module>
<context>template</context>
<method>create</method>
<parameters>
<template>
<use>
<read><role>Virtimo-read</role></read>
<any><role>Virtimo-admin</role></any>
</use>
<id>CUSTOMIDVIRTIMO</id>
<labels>
<de>virtimotemplate1</de>
</labels>
<versionedAttributes>
<attribute>
<labels>
<de>Virtimo ID</de>
</labels>
<multiline>true</multiline>
<key>VirtimoID</key>
<type>string</type>
<displayName>displayNameTest</displayName>
<displayDescription>displayDescriptionTest</displayDescription>
</attribute>
<attribute>
<labels>
<de>german label test</de>
<en>english label test</en>
</labels>
<maxLength>5000</maxLength>
<key>ticketDesc</key>
<type>string</type>
<displayName>Desc DN</displayName>
</attribute>
</versionedAttributes>
</template>
</parameters>
</request>
</requests>
</api>
Get Template
<api>
<organizationId>Virtimo</organizationId>
<locale>de</locale>
<requests>
<request>
<context>template</context>
<method>get</method>
<parameters>
<customId>template_custom_id_1</customId>
<withoutHiddenAttributes>true</withoutHiddenAttributes>
<other>PREVIOUS</other>
<updatedOn>HEAD</updatedOn>
</parameters>
<withUser>false</withUser>
</request>
</requests>
</api>
Update Template
<api>
<organizationId>Virtimo</organizationId>
<locale>de</locale>
<requests>
<request>
<module>am</module>
<context>template</context>
<method>update</method>
<parameters>
<template>
<id>61</id>
<customId>template_custom_id_123456</customId>
<versionedAttributes>
<attribute>
<labels>
<de>VirtimoID</de>
</labels>
<multiline>true</multiline>
<key>VirtimoID_NEU</key>
<type>string</type>
<displayName>VirtimoID</displayName>
</attribute>
</versionedAttributes>
<unversionedAttributes/>
<parents/>
<children/>
</template>
</parameters>
</request>
</requests>
</api>
Create Asset
<api>
<organizationId>Virtimo</organizationId>
<locale>de</locale>
<requests>
<request>
<context>asset</context>
<method>create</method>
<parameters>
<asset>
<version>
<childTemplates />
<customId>Benutzerdefinierte ID</customId>
<description></description>
<versionedAttributes>
<attribute>
<key>key1</key>
<value>val1</value>
</attribute>
<attribute>
<key>key2</key>
<value>val2</value>
</attribute>
</versionedAttributes>
</version>
<unversionedAttributes />
</asset>
<templateId>40</templateId>
</parameters>
</request>
</requests>
</api>
Get Asset (ID)
<api>
<organizationId>Virtimo</organizationId>
<locale>de</locale>
<requests>
<request>
<context>asset</context>
<method>get</method>
<parameters>
<id>509</id>
<withoutHiddenAttributes>true</withoutHiddenAttributes>
<other>PREVIOUS</other>
<updatedOn>HEAD</updatedOn>
</parameters>
<withUser>false</withUser>
</request>
</requests>
</api>
Get All
<api>
<organizationId>Virtimo</organizationId>
<locale>de</locale>
<requests>
<request>
<context>asset</context>
<method>query</method>
<withUser>false</withUser>
<parameters>
<sparse>true</sparse>
<getActions>true</getActions>
<sortMode></sortMode>
<verbosity>0</verbosity>
<withTemplate>false</withTemplate>
<withoutHiddenAttributes>true</withoutHiddenAttributes>
<start>0</start>
<limit>120</limit>
<sorters>
<sorter>
<key>template.displayName</key>
<direction>asc</direction>
</sorter>
<sorter>
<key>displayName</key>
<direction>asc</direction>
</sorter>
</sorters>
</parameters>
</request>
</requests>
</api>
Update Asset (ID)
<api>
<organizationId>Virtimo</organizationId>
<locale>de</locale>
<requests>
<request>
<context>asset</context>
<method>update</method>
<parameters>
<asset>
<version>
<childTemplates/>
<customId>NEU3</customId>
<description></description>
<versionedAttributes>
<attribute>
<key>newID</key>
<value></value>
</attribute>
</versionedAttributes>
</version>
<unversionedAttributes/>
<id>483</id>
</asset>
</parameters>
</request>
</requests>
</api>
Update Asset (CustomID)
<api>
<organizationId>Virtimo</organizationId>
<locale>de</locale>
<requests>
<request>
<context>asset</context>
<method>update</method>
<parameters>
<asset>
<version>
<customId>asset_custom_id_6</customId>
<template>
<customId>template_custom_id_1</customId>
</template>
<childTemplates/>
<description></description>
<versionedAttributes>
<attribute>
<key>VirtimoID</key>
<value>val1</value>
</attribute>
</versionedAttributes>
</version>
<unversionedAttributes/>
</asset>
</parameters>
</request>
</requests>
</api>