Jump to content

ESET API - List computers


Eric Schultz
 Share

Recommended Posts

I'm utilizing the ESET Server Api. I cannot find how to "list" computers with their UUID's. for use in

the Era.Common.NetworkMessage.ConsoleApi.Groups.RpcGetComputerRequest

 

Currently the only command I've found is:

{"Era.Common.NetworkMessage.ConsoleApi.Groups.RpcExportComputersRequest": {"parentGroupUuid": {"uuid": "00000000-0000-0000-7001-000000000001"}, "includeSubgroups": True}}

However there is only the computer name/path ... I would have expected it to return the computer objects, or at least a computer object with the path, computer name, and uuid.

I'm also looking to determine how to traverse down the static group tree. 

{'Era.Common.NetworkMessage.ConsoleApi.Groups.RpcGetStaticGroupResponse': {'groups': [{'staticObjectIdentification': {'uuid': {'uuid': '00000000-0000-0000-7001-000000000001'}, 'versionGuard': 5014}, 'staticObjectData': {'name': 'All', 'description': ''}, 'staticGroupRelations': {'parentGroup': {'uuid': '00000000-0000-0000-0000-000000000000'}}}]}}

Only show staticGroupRelations -> parentGroup, not childGroups.

Link to comment
Share on other sites

This should give you: staticgroup_name,computer_name,computer_uuid:

 

{
    "Era.Common.NetworkMessage.ConsoleApi.Reports.RpcGenerateReportRequest": {
        "reportTemplate": {
            "data": {
                "query_usage_definition_id": 21,
                "used_symbol": [
                    {
                        "column_id": 673,
                        "symbol_id": 673,
                        "aggregation_parameter": {}
                    },
                    {
                        "column_id": 657,
                        "symbol_id": 657,
                        "aggregation_parameter": {}
                    },
                    {
                        "column_id": 644,
                        "symbol_id": 644,
                        "aggregation_parameter": {}
                    }
                ]
            },
            "rendering": {
                "draw_chart": False,
                "draw_table": True,
                "table": {
                    "type_id": 100,
                    "columns": [
                        {
                            "column_id": 673,
                            "order": 0,
                            "width": 1,
                            "label": {"type": 1, "literal": "staticgroup_name"}
                        },
                        {
                            "column_id": 644,
                            "order": 0,
                            "width": 1,
                            "label": {
                                "type": 1,
                                "literal": "computer_name"
                            }
                        },
                        {
                            "column_id": 657,
                            "order": 0,
                            "width": 1,
                            "label": {"type": 1, "literal": "computer_uuid"}
                        }
                    ]
                }
            }
        }
    }
}

 

Example output:

 

{
	'Era.ServerApi.ReportCSVResponse': {
		'reportCSV': 
			'staticgroup_name,computer_name,computer_uuid
			Lost & found,desktop-vhqqkoh,3752aa8e-2675-471c-9e61-474f2fbd7eea
			Lost & found,exchange.lab.local,178a0124-b66d-426b-8097-fb3261146eed
			Lost & found,azca.lab.local,c6ef236f-6db7-4873-9e0a-14487ac9c10b
			Domain Controllers,azdc01.lab.local,e6f28980-eae2-49d9-85f7-db30b7042931
			Desktops,azwin10-02.lab.local,8737171e-408a-4b82-a006-a31a3c51c368
			Servers,eei663777.lab.local,cd3814d2-ec00-4a43-8da2-652df3491c6f
			Servers,localhost,4b61b044-1f82-454d-9806-b54dfa838a14
			Klant A,henks-mac.local,1397d5b6-ed44-4a40-ba8d-3b78a4a692b2
			Klant A,iPhone,00029835-70ca-4b37-a7bc-86849556c23e
			Klant A,Android,0002c0b5-0a49-41ab-a4c0-5c2d01be2d1a
			Klant A,henks-mac.local,2b16e91c-1497-4e6f-8c01-21f6a2c52f5a'
	}
}

 

Edited by Mitchell
fixed typo's
Link to comment
Share on other sites

17 hours ago, Eric Schultz said:

I'm utilizing the ESET Server Api. I cannot find how to "list" computers with their UUID's. for use in

the Era.Common.NetworkMessage.ConsoleApi.Groups.RpcGetComputerRequest

 

Currently the only command I've found is:

{"Era.Common.NetworkMessage.ConsoleApi.Groups.RpcExportComputersRequest": {"parentGroupUuid": {"uuid": "00000000-0000-0000-7001-000000000001"}, "includeSubgroups": True}}

However there is only the computer name/path ... I would have expected it to return the computer objects, or at least a computer object with the path, computer name, and uuid.

I'm also looking to determine how to traverse down the static group tree. 

{'Era.Common.NetworkMessage.ConsoleApi.Groups.RpcGetStaticGroupResponse': {'groups': [{'staticObjectIdentification': {'uuid': {'uuid': '00000000-0000-0000-7001-000000000001'}, 'versionGuard': 5014}, 'staticObjectData': {'name': 'All', 'description': ''}, 'staticGroupRelations': {'parentGroup': {'uuid': '00000000-0000-0000-0000-000000000000'}}}]}}

Only show staticGroupRelations -> parentGroup, not childGroups.

Hi
Can you tell me how to run ESMC API server? We want to have possibility to get report over API too

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...