Hello,

OTRS 5.0.22 + ITSM

There is a ConfigItem and the following definition:

[...]

        Key => 'GI_item', 
        Name => 'Example item', 
        Searchable => 1, 
        Input => { 
            Type => 'Dummy', 
        }, 
        CountMin => 1, 
        CountDefault => 1, 
        CountMax => 1, 
        Sub=>[{ 
            Key => 'GI_subitem', 
            Name => 'Example subitem', 
            Searchable => 1, 
            Input => { 
                Type => 'GeneralCatalog', 
                Class => 'ITSM::ConfigItem::Something::SomeItem', 
            }, 
            CountMin => 1, 
            CountMax => 5, 
            CountDefault => 1, 
        }] 
    }, 
[...]

What is the correct JSON format to describe this object in a GenericInterface REST POST request?

My first try was:

[...]
"GI_item": [
"GI_subitem": "subitem1" 
},
"GI_subitem": "subitem2" 
}
],
[...]

But that is no good:

{
    "Error": {
        "ErrorCode": "ConfigItemCreate.InvalidParameter",
        "ErrorMessage": "ConfigItemCreate: ConfigItem->CIXMLData->GI_item parameter repetitions is higher than the maxium value!"
    }
}

"GI_item": {
                 ?????????????
 },



Changing the definition a bit works around the problem:


        Key => 'GI_item', 
        Name => 'Example Item', 
        Searchable => 1, 
        Input => { 
            Type => 'GeneralCatalog', 
            Class => 'ITSM::ConfigItem::Something::SomeItem', 
        }, 
        CountMin => 1, 
        CountDefault => 1, 
        CountMax => 5, 
    }, 


REST POST request is accepted:

[...]
"GI_item": [
        "item1",
        "item2"
],
[...]

Thank you very much!

Pieter