Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Erin_Horning
Explorer

Runtime error while creating OPSEC LEA object via API

I am trying to create an OPSEC LEA object using the management API via the Ansible URI module, and am getting a generic error  with the message included in the response text below. I haven't been able to find anything online about this particular error. Can anyone shed some light on what's going on here?

- name: CONFIG ROUTING | Create splunk opsec lea object
uri:
   url: https://{{ ips_mgmt_host }}:443/web_api/add-opsec-application
   method: POST
   headers:
      Content_Type: "application/json"
      X-chkp-sid: "{{ login_result.json.sid }}"
   body:
      name: "SplunkLea"
      host: "splunk_lea"
      lea:
         access-permissions: "by profile"
         administrator-profile: "super user"
         enabled: true
      one-time-password: "test-password"
      tags: ["manager_ops"]
   body_format: json
   validate_certs: false

Below is the output from this request: 

"changed": false,
"connection": "close",
"content": "{\n \"code\" : \"generic_error\",\n \"message\" : \"Runtime error: java.util.ArrayList incompatible with com.checkpoint.management.web_api_is.common.m
ulti_values.objects.MultiString\"\n}",
"content_type": "application/json",
"json": {
"code": "generic_error",
"message": "Runtime error: java.util.ArrayList incompatible with com.checkpoint.management.web_api_is.common.multi_values.objects.MultiString"
},
"msg": "Status code was not [200]: HTTP Error 400: Bad Request",
"redirected": false,
"server": "CPWS",
"status": 400,
"transfer_encoding": "chunked",
"url": "https://<mgmt ip>/web_api/add-opsec-application",
"x_forwarded_host_port": "443",
"x_frame_options": "SAMEORIGIN",
"x_ua_compatible": "IE=EmulateIE8"

0 Kudos
3 Replies
Robert_Decker
Advisor

Hi,

Try removing the tags field and see if it works - according to the error, this is my assumption.

Robert.

Erin_Horning
Explorer

That worked, thanks! Ruled that out because I'd successfully used the same tagging syntax on other objects but I guess opsec objects require a different syntax than most. 

0 Kudos
Robert_Decker
Advisor

It should work with tags, maybe you have a syntax error.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events