Issue of missing xml components in response xml while fetching mutiple action id status

Hi All,

I am trying to fetch multiple action id status using a loop, but the tag in the response is missing in response. But while fetching single action id status, i am able to get the complete response.

Any help is highly appreciated.

Thanks,
Abinas

Not sure about your problem. I guess you are using the REST API “api/action/id_number/status” to get the specific “id_number” action status.Can you please attach an example of the missing status and the script you are using to fetch the multiple statuses ?

Yes, correct. I am using api/action/id_number/status to get the status. Below is the expected and actual response i am getting.

It looks like the problematic action (no target) doesn’t actually have a target yet. This is the case of an action having the targets dinamically resolved. I suggest you to check the status of the action (with missing targets), in the BES console. If the console doesn’t show any target, then investigate the action targeting.

Thanks for you reply. While creating actions i have already provided target as computer id.

Understood, but there won’t be a result for that computer until the endpoint receives the action, parses it, and sends a result back to the root server. Until then you would see "<not reported>" for the computer in the Console, and from the REST API there would be not be a result entry for the computer at all.

The "<Not Reported>" shown in the console is not an Action Result, but rather a lack of one. The console would run a couple of queries - one to find the computers targeted by the action, a second to find the results for each computer, and present "<not reported>" for a computer that was targeted but hasn’t reported. You could do the same through the API, but it takes more than one query to do it.

Thank you Jason.

Yes we are using api query to create action and getting the status of it. Can you please help me getting the API queries to get the action status with the computer tag in response.

First we’d want to verify we understand your problem correctly. Is that endpoint showing ‘Not Reported’ in the console, and you wantntonshow ‘Not Reported’ for it via the api?

Yes, it is showing “Not Reported” in the console initially and eventually updating to “Failed”. I want the same to be fetched in API as well.

I think you should use /api/query, with a query for ids of targeted computers of actions whose (id of it = <id you are looking for>

Then retrieve the /action/actionid/status.

You’ll need to fill in the based on computers in your targeted list, that have no result in your status list.

Filtering the response field could help ? Try the following command:

api/action/action_ID/status?fields=Status,Computer

I am still getting only Not Reported status in the console and from api api/action/action_ID/status does not have any computer id element.