Enhanced Security Measures in Place:   To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.

Modify adress group by xml api with POST method

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Modify adress group by xml api with POST method

L1 Bithead

Hello

 

I'm trying to modify a shared address group bye using xml api and use POST http method

 

url:

https://$url/api/?key=$key&type=config&action=edit&xpath=/config/shared/address-group/entry[@name='GRP-NAME']

header:

Content-Type='text/xml'

body:

<entry name="GRP-NAME">
    <static>
        <member>SRV-10.0.0.32</member>
     <member>172.20.34.101</member>
    </static>
</entry>

 

But when i execute post call with POSTMAN, The response is:

<response status="error" code="12">
    <msg>
        <line>Invalid target object in edit handler</line>
    </msg>
</response>

 

I don't understand why, because if i do:

https://$url/api/?key=$key&type=config&action=get&xpath=/config/shared/address-group/entry[@name='GRP-NAME']

The response is the detail of the group 'GRP-NAME'

 

thanks

1 accepted solution

Accepted Solutions

L1 Bithead

I found the solution:

 

put in url only:

https://$url/api/

 

headers:

 ['Content-Type' => 'application/x-www-form-urlencoded']

 

body:

key=$key&type=config&action=edit&xpath=/config/shared/address-group/entry[@name="GRP-NAME"]&element=<entry name="GRP-NAME"><static><member>namemembers</member</static></entry>'

View solution in original post

1 REPLY 1

L1 Bithead

I found the solution:

 

put in url only:

https://$url/api/

 

headers:

 ['Content-Type' => 'application/x-www-form-urlencoded']

 

body:

key=$key&type=config&action=edit&xpath=/config/shared/address-group/entry[@name="GRP-NAME"]&element=<entry name="GRP-NAME"><static><member>namemembers</member</static></entry>'

  • 1 accepted solution
  • 1992 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!