Kernel::GenericInterface::Operation::Service::ServiceGet

NAME

Kernel::GenericInterface::Operation::Service::ServiceGet – GenericInterface Service Get Operation backend

PUBLIC INTERFACE

Run()

perform ServiceGet Operation. This function is able to return one or more service entries in one call.

    my $Result = $OperationObject->Run(
        Data => {
            UserLogin          => 'some agent login',       # UserLogin or AccessToken is required
            AccessToken        => 123,
            Password           => 'some password',          # if UserLogin is sent then Password is required
            ServiceID          => '32,33',                  # required, could be comma separated IDs or an Array
            DynamicFields      => 0,                        # Optional, default 0
            IncidentState      => 0,                        # Optional, default 0, returns CurInciState etc.
            CriticalityValue   => 1,                        # Optional, default 1
            IncludePreferences => 1,                        # Optional, default 1
        },
    );

    $Result = {
        Success      => 1,                                # 0 or 1
        ErrorMessage => '',                               # In case of an error
        Data         => {
            Service => [
                {
                    ServiceID         => 123,
                    Name              => 'some::full::name',
                    NameShort         => 'some name',
                    ParentID          => 123,
                    ValidID           => 1,
                    Valid             => 'some validity',
                    Comment           => 'some comment',
                    TypeID            => 123,
                    Type              => 'some type',
                    Criticality       => 'some criticality',
                    CurInciStateID    => 123,
                    CurInciState      => 'Operational',       # e.g. Operational | Warning | Incident
                    CurInciStateType  => 'operational',       # w.g. operational | warning | incident

                    # List of dynamic fields
                    DynamicField => [
                        {
                            Name  => 'some name',
                            Value => 'some value',
                        },
                        # ...
                    ],

                    # List of preferences
                    Preference => [
                        {
                            Name  => 'some name',
                            Value => 'some value',
                        },
                        # ...
                    ],
                },
                # ...
            ],
        },
    };
Scroll to Top