Highlighted
Trusted Contributor.. Trusted Contributor..
Trusted Contributor..
139 views

REST-API condition for boolean values

Jump to solution

Hello, does anybody know how to define a rest-api filter condition for a boolean value? E.g. I want to retrieve all instances of IP_address CIs which have the root_iscandidatefordeletion attribute set to "false". Neither of this works for me (givng a bad request return code):

....

{
"queryIdentifier" : "ip1",
"layout" : [
"display_label",
"ip_netmask",
"ip_address_type",
"root_iscandidatefordeletion"
],
"visible" : "true",
"attributeConditions" : [
{
"operator" : "equals",
"attribute" : "root_iscandidatefordeletion",
"value" : "false"
}
],
"ids" : [],
"type" : "ip_address",
"includeSubtypes" : "true"
}

.....

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: REST-API condition for boolean values

Jump to solution

Hi there,

 

the API and Rest-API components are delivered and maintained only on server side so whatever new features or fixes we deliver on these 2 coponents we will deliver them only with a new UCMDB server version.

We rarely provide new features in CUPs so most likely you will have to test this on the latest available UCMDB version.

 

Kind regards,
Bogdan Mureșan
EMEA CMS Technical Success

View solution in original post

0 Likes
6 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: REST-API condition for boolean values

Jump to solution

This works for me:

 

 

{
   "nodes":  [
     {
       "type": "ip_address",
       "queryIdentifier": "ips",
       "visible": true,
       "includeSubtypes": true,
       "layout": ["name"],
       "attributeConditions": [{
          "operator" : "equals",
          "attribute" : "root_iscandidatefordeletion",
          "value" : "true"
     }],
     "linkConditions": []
  }],
 "relations": []
}

 

 

Cheers,

Petko Popadiyski

Freelance Microfocus CMS UCMDB Consulting

Likes are appreciated!
0 Likes
Highlighted
Trusted Contributor.. Trusted Contributor..
Trusted Contributor..

Re: REST-API condition for boolean values

Jump to solution

Does not work for me. We have 10.33 CUP5 - don't know which REST API version comes with that. Could the API version be the reason for that?

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: REST-API condition for boolean values

Jump to solution

probably. You have to see the schema for 10.33. I am using 2019.02.

Likes are appreciated!
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: REST-API condition for boolean values

Jump to solution

Hi there,

 

the API and Rest-API components are delivered and maintained only on server side so whatever new features or fixes we deliver on these 2 coponents we will deliver them only with a new UCMDB server version.

We rarely provide new features in CUPs so most likely you will have to test this on the latest available UCMDB version.

 

Kind regards,
Bogdan Mureșan
EMEA CMS Technical Success

View solution in original post

0 Likes
Highlighted
Trusted Contributor.. Trusted Contributor..
Trusted Contributor..

Re: REST-API condition for boolean values

Jump to solution

Yes, in our DEV environment on 2019.08 this works as expected. Unfortunately we cannot just migrate our prod environment to that version right now. Is there a possibility to just upgrade the REST API to the latest version? I know that this was possible in the 10.3x versions...

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: REST-API condition for boolean values

Jump to solution

No supported option to backport only the Rest API from a newer UCMDB version.

 

Kind regards,
Bogdan Mureșan
EMEA CMS Technical Success
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.