-
Notifications
You must be signed in to change notification settings - Fork 7
DEVICE-123 - Fetch more detailed mobile device information #143
Conversation
…e Device entities Also added lastSeenOn
/** | ||
* Requires "Read - Mobile Devices" permission | ||
*/ | ||
public async fetchMobileDeviceById(id: number): Promise<MobileDeviceDetail> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much like the computers endpoint, you need to individually call the detail view on mobile devices to get most of what we care about.
const extensionAttributes = {}; | ||
|
||
// Prevent all extensionAttributes from being uploaded due to the size of the | ||
// entities that can be generated as a result from uploading every property. | ||
if (deviceDetail && deviceDetail.extension_attributes) { | ||
extensionAttributes[`extensionAttribute.${DEPLOYMENT_STATUS}`] = | ||
getDeploymentStatus(deviceDetail.extension_attributes); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was taken from the createComputerEntity and it looks like the extension properties are the same for mobile devices if you check the recordings.
lastSeenOn: parseTimePropertyValue( | ||
detailData?.general?.last_contact_time_epoch ?? device.report_date_epoch, | ||
'ms', | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default to the report_date_epoch
when we don't have detail data.
🚀 PR was released in |
Description
Summary
Fetch more detailed information about mobile devices and add it to the mobile Device entities. Also added lastSeenOn.
Type of change
Please leave any irrelevant options unchecked.
not work as expected)
Checklist
General Development Checklist:
Integration Development Checklist:
Please leave any irrelevant options unchecked.
endpoints, and have documented any additional permissions in
jupiterone.md
, where necessary.API
using
dependsOn
JupiterOne data model
to ensure that any new entities/relationships, and relevant properties,
match the recommended model for this class of data
CHANGELOG.md
file to describe my changesreviewed all existing managed questions referencing the entities,
relationships, and their property names, to ensure those questions still
function with my changes.