Powershell functions for OTRS SOAP API for work with CMDB classes, LinkObjects, Tickets and Articles.
- copy folders in certain place and make same setup.
- Folders ArticleBackendObject and LinkObject to path "/otrs/Custom/Kernel/GenericInterface/Operation/"
- XML files copy to path "/otrs/Kernel/Config/Files/XML/"
- Rebuild config - "perl bin/otrs.Console.pl Maint::Config::Rebuild"
- Go to OTRS config - "GeneralInterface::Operation::ModuleRegistration" and enable new Operations:
- ArticleBackendObject::ArticleCreate
- LinkObject::LinkAdd
- LinkObject::LinkDelete
- LinkObject::LinkList
- Go to "Admin - Web Services". Create new Webservices or import files from folder WebServices_exportfiles. In examples uses Webservices names - WS_CI and WS_Ticket
- Add Operations for your WebServices. PS Functions used follow operations:
- ArticleBackendObject::ArticleCreate
- LinkObject::LinkAdd
- LinkObject::LinkDelete
- LinkObject::LinkList and default operations
- Ticket::TicketCreate
- Ticket::TicketGet
- Ticket::Update
- ConfigItem::ConfigItemCreate
- ConfigItem::ConfigItemDelete
- ConfigItem::ConfigItemGet
- ConfigItem::ConfigItemSearch
- ConfigItem::ConfigItemUpdate
- Create user for scripts with needed rights. For example - create CMDB objects.
- Create and fill Set-GlobalVars.ps1 Require Userdata, url, SOAPNameSpace.
For use additional functions for classes in OTRS 6 API - have to create backend perl module with functions for your operations and create XML file with description of new operation.
CMDB sample classes yaml files in folder "CMDB Config". Notice for separate class for Printer.(not necessary - this for my sample script imports and sync CMDB objects)
You make debug Web services on page Webservice - Debugger and Log your http server.
sync.tickets.ps1 - example import tickets from third tickets system sync.printers.ps1 - example periodic imports CMDB objects Printers from asset system sync.links.ps1 - example periodic linkin object sync with data collecting from active network switches