Ad Widget

Collapse

Trying to import template with APi

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tfab
    Junior Member
    • Nov 2017
    • 1

    #1

    Trying to import template with APi

    Hello,

    i try to import templates on my new zabbix server 3.45 , previously exported with api (on zabbix 2.4.3)

    i have this error (like the problem described here ZBX-10413)

    $VAR1 = {
    'jsonrpc' => '2.0',
    'error' => {
    'debug' => [
    {
    'function' => 'exception',
    'args' => [
    100,
    'Invalid parameter "/": the parameter "source" is missing.'
    ],
    'file' => '**e/classes/api/services/CConfiguration.php',
    'type' => '::',
    'class' => 'CApiService',
    'line' => 135
    },
    {
    'function' => 'import',
    'args' => [
    {
    'format' => 'xml',
    'rules' => {
    'source' => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
    <zabbix_export><version>2.0</version>*****<</zabbix_export>",
    'templates' => {
    'createMissing' => 'true',
    'updateExisting' => 'true'
    }
    }
    }
    ],
    'file' => '****include/classes/api/clients/CLocalApiClient.php',
    'type' => '->',
    'class' => 'CConfiguration',
    'line' => 123
    },
    {
    'function' => 'callMethod',
    'args' => [
    'configuration',
    'import',
    {
    'format' => 'xml',
    'rules' => {
    source' => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
    <zabbix_export></zabbix_export>",
    'templates' => {
    'createMissing' => 'true',
    'updateExisting' => 'true'
    }
    }
    },
    'd***c5336fe0d1c64ab4534'
    ],
    'file' => '*****/include/classes/core/CJsonRpc.php',
    'type' => '->',
    'class' => 'CLocalApiClient',
    'line' => 87
    },
    {
    'function' => 'execute',
    'args' => [],
    'file' => '***/data/crt/api_jsonrpc.php',
    'type' => '->',
    'class' => 'CJsonRpc',
    'line' => 63
    }
    ],
    'data' => 'Invalid parameter "/": the parameter "source" is missing.',
    'message' => 'Invalid params.',
    'code' => -32602
    },
    'id' => 3
    };



    The parameter source is missing


    like can you , the paramter source is present ,

    reaaly , don't know where come from this problem , I have tried everything , but still the same problem

    Could you pelase help me
    regards
Working...