OTRS 7.0 API Reference Perl

Description manuals and libraries
OTRS 7.0 API Reference Perl > Perl Modules > Kernel::GenericInterface::Operation::Generic::RPC

Run()

Execute a defined method on a defined object. This function is able to execute methods on configured objects and return the method's return values.

    my $Result = $OperationObject->Run(
        Data => {
            UserLogin         => 'some agent login',     # (required) UserLogin, CustomerUserLogin or SessionID.
            CustomerUserLogin => 'some customer login',  #
            SessionID         => 123,                    #
            Password          => 'some password',        # required with UserLogin or CustomerUserLogin.
            Object            => 'Ticket',               # (required) indicates the object to be used.
            Method            => 'TicketGet',            # (required) indicates the object method to be used.
            Parameter         => { TicketID => 123, },   # (optional) hash or array reference with mnethod parameters.
        },
    );

    $Result = {
        Success      => 1,                                # 0 or 1
        ErrorMessage => '',                               # In case of an error
        Data         => {
            TicketGet => {
                TicketNumber   => '20101027000001',
                Title          => 'some title',
                TicketID       => 123,
                State          => 'some state',
                StateID        => 123,
                StateType      => 'some state type',
                Priority       => 'some priority',
                PriorityID     => 123,
                ...
            }
        },
    };