Skip to content

Powershell functions for access OTRS 6 SOAP Web Service API

License

Notifications You must be signed in to change notification settings

Daniloveb/OTRS_PS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OTRS_PS

Overview

Powershell functions for OTRS SOAP API for work with CMDB classes, LinkObjects, Tickets and Articles.

For use this set of scripts - you have to:

  • copy folders in certain place and make same setup.
  1. Folders ArticleBackendObject and LinkObject to path "/otrs/Custom/Kernel/GenericInterface/Operation/"
  2. XML files copy to path "/otrs/Kernel/Config/Files/XML/"
  3. Rebuild config - "perl bin/otrs.Console.pl Maint::Config::Rebuild"
  4. Go to OTRS config - "GeneralInterface::Operation::ModuleRegistration" and enable new Operations:
  • ArticleBackendObject::ArticleCreate
  • LinkObject::LinkAdd
  • LinkObject::LinkDelete
  • LinkObject::LinkList
  1. 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
  2. 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
  1. Create user for scripts with needed rights. For example - create CMDB objects.
  2. 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

About

Powershell functions for access OTRS 6 SOAP Web Service API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published