Skip to main content
zeki893
New Member
December 14, 2021
Question

API - no master key (name) in new object

  • December 14, 2021
  • 1 reply
  • 2233 views

I was trying to use the api to create an ipv6 address and I get these errors on 7.0.1.

 

 

[httpsd 12058 - 1639445206 error] cmdb_commit_from_json[1615] -- no master key (name) in new object [httpsd 12058 - 1639445206 error] _api_cmdb_v2_config[1272] -- error editing object (nret=-3)

 

 

There's no information about this anywhere. Only found one post on github that says change API account to super_admin, which I did.

 

Has anybody know how to fix this?

 

My code if anybody is wondering.

 

 

url4 = "https://10.1.0.1:8443/api/v2/cmdb/firewall/address6" payload4 = {             'params': {                 'datasource': 1,                 'vdom': 'root'             },             'data': {                 'name': 'us-db-poe-3-copy',                 'type': 'mac',                 'macaddr': [{'macaddr': 'cc:4e:24:25:1d:c0'}]             } } r = requests.post(url4, data=json.dumps(payload4), headers=headers, verify=False) pprint (r.json()) >>> pprint (r.json()) {'build': 157,  'error': -3,  'http_method': 'POST',  'http_status': 500,  'name': 'address',  'path': 'firewall',  'revision': 'bcf63efcd8b5e414a44266c3bf0f237a',  'revision_changed': False,  'serial': 'xx',  'status': 'error',  'vdom': 'root',

 

 :folded_hands:

1 reply

bpozdena_FTNT
Staff
Staff
December 15, 2021

You only need to send the portion from 'data' key. Use the bellow variable instead:

 

payload4 = {             'name': 'us-db-poe-3-copy',             'type': 'mac',             'macaddr': [{'macaddr': 'cc:4e:24:25:1d:c0'}]             }