Products
Applications
Support
Company
How To Buy
Skip to main content (Press Enter).
Sign in
Skip auxiliary navigation (Press Enter).
Register
Skip main navigation (Press Enter).
Toggle navigation
Search Options
Home
Communities
All Communities
Enterprise Software
Mainframe Software
Symantec Enterprise
Blogs
All Blogs
Enterprise Software
Mainframe Software
Symantec Enterprise
Events
All Events
Enterprise Software
Mainframe Software
Symantec Enterprise
VMware
Water Cooler
Groups
Enterprise Software
Mainframe Software
Symantec Enterprise
Members
DX NetOps
Private Community
View Only
Community Home
Threads
Library
Events
Members
Back to discussions
Expand all
|
Collapse all
sort by most recent
sort by thread
LIST IDs OF ALL DEVICES
Cassio Pinheiro
May 19, 2022 03:53 PM
Hi how could list the IDs of all devices? the ID in the Inventory - Items - Devices window is not matching ...
Catalin Farcasanu
May 20, 2022 03:54 AM
There are 2 API calls that make transformation of a PCItemID into a DAItemId: --- #With the data ...
1.
LIST IDs OF ALL DEVICES
0
Recommend
Cassio Pinheiro
Posted May 19, 2022 03:53 PM
Reply
Reply Privately
Options Dropdown
Hi
how could list the IDs of all devices?
the ID in the Inventory - Items - Devices window is not matching the Device admin role ID.
The goal is a possible device name change, in a more global, massive way.
Cássio
2.
RE: LIST IDs OF ALL DEVICES
0
Recommend
Catalin Farcasanu
Posted May 20, 2022 03:54 AM
Reply
Reply Privately
Options Dropdown
There are 2 API calls that make transformation of a PCItemID into a DAItemId:
---
#With the data source ID (check data_sources2 table in PC) for DA, you can run (replace SOURCEID):
#To convert DS ID to PC ID:
#POST
http://PC:8181/pc/center/webservice/datasources/dataSourceId/SOURCEID/itemids
#Body:
<
LocalIDs
>
<
LocalID
ID
=
"
id1
"
/>
<
LocalID
ID
=
"
id2
"
/>
</
LocalIDs
>
#To convert PC ID to DS ID:
#POST
http://PC:8181/pc/center/webservice/datasources/dataSourceId/SOURCEID/localids
#Body:
<
ItemIDs
>
<
ItemID
ID
=
"
id1
"
/>
<
ItemID
ID
=
"
id2
"
/>
</
ItemIDs
>
---
Try it out.
You can get the full DA list either by OpenAPI or by DA call.
#Build OData Query for Devices
odata_query
=
"
odata/api/devices
\$
top=20000&
\$
skip=0&
\$
format=xml&
\$
select=SupportedProtocols,ID,PrimaryIPAddress,IPDomainID,DiscProfileID,Name,AlternateName,PolledItemCount,CreateTime,LifeCycleState&
\$
filter=((IPDomainID%20eq%20
$daipdomainid
))
"
;
curl
-k
-s
-H
"
Content-Type: application/xml
"
-H
"
Authorization: Basic
$hash_auth
"
-X
GET
"
$daprotocol
://
$dahost
:
$daport
/
$odata_query
"
#Build OData Query for Interfaces
odata_query2
=
"
odata/api/interfaces
\$
top=20000&
\$
skip=0&
\$
format=xml&
\$
select=ID,MACAddress,SpeedIn,AdminStatus,SpeedOut,Type,Alias,IPAddresses,DeviceItemID,IsPollEnabled,DisplayName,DisplayDescription,AlternateName,Name,Description,CreateTime&
\$
filter((device/IPDomainID%20eq%20
$daipdomainid
))
"
;
curl
-k
-s
-H
"
Content-Type: application/xml
"
-H
"
Authorization: Basic
$hash_auth
"
-X
GET
"
$daprotocol
://
$dahost
:
$daport
/
$odata_query2
"
Original Message
Original Message:
Sent: May 19, 2022 03:52 PM
From: Cassio Pinheiro
Subject: LIST IDs OF ALL DEVICES
Hi
how could list the IDs of all devices?
the ID in the Inventory - Items - Devices window is not matching the Device admin role ID.
The goal is a possible device name change, in a more global, massive way.
Cássio
×
New Best Answer
This thread already has a best answer. Would you like to mark this message as the new best answer?
Copyright 2019. All rights reserved.
Powered by Higher Logic