I am trying to run an API which will add hosts to a group. when i try running API individually using a single host or a couple more using comma and quotes. process works fine.
However when i am trying to use a CSV file with a single column which has the host id , i get AssertionError: expected false to be truthy error.
when i look into the body of the error, syntax if run individually will run without any issues.
i am using an API to perform /host-group-actions/v1?action_name=add-hosts
within the body i am calling variable HOST
{“action_parameters”:[{“name”:“filter”,“value”: “({{HOST}})”}],“ids”: [“is a randon group”]}
and in TEST tab i have:
tests[“Body contains HOST”] = responseBody.has(‘data.HOST’);
CSV looks like
HOST
HOSTNAME1
HOSTNAME2
HOSTNAME3
In the console, i can see the exact format of host names which i can simply plug in, in an individual API call and get successful result however when variable is called via CSV iteration will give Body contains HOST | Assertion Error: expected false to be truthy
to value in body i am also trying to add clientid:[’ '] not sure how to do that.
Please help