- https://.app.willowinc.com/api/v3https://.app.willowinc.com/api/v3/insights/{insightId}
const query = new URLSearchParams({
ignoreQueryFilters: 'true'
}).toString();
const insightId = 'YOUR_insightId_PARAMETER';
const instance = 'YOUR_instance_PARAMETER';
const resp = await fetch(
`https://${instance}.app.willowinc.com/api/v3/insights/${insightId}?${query}`,
{
method: 'GET',
headers: {
Authorization: 'Bearer <YOUR_TOKEN_HERE>'
}
}
);
const data = await resp.text();
console.log(data);OK
Gets or sets the unique identifier of the customer associated with the insight.
Gets or sets the type of the insight (standard or scenario).
Gets or sets the category of the insight.
Gets or sets the impact scores associated with the insight.
Gets or sets the last status of the insight.
Gets or sets the state of the insight.
Gets or sets the source type of the insight.
Gets or sets the unique identifier of the source associated with the insight.
Gets or sets the unique identifier of the user who created the insight.
Gets or sets the count of times the insight was previously ignored.
Gets or sets the count of times the insight was previously resolved.
Gets or sets the date when the insight was last resolved.
Gets or sets the location details, including twin ID, name, and model ID.
Gets or sets the secondary twins "secondary components" of the insight.
Gets or sets the recommendations of the insight.
Gets or sets the action status of the insight, using InsightActionStatusV2.None when the insight matches no category (rather than coercing to InsightActionStatusV2.NeedsAction as the deprecated InsightActionStatus InsightDto.ActionStatus does).
Gets or sets the first executed command date for the insight.
Gets or sets the date when the insight description was last updated.
Gets or sets the number of twins included in the scenario insight.
Gets or sets the number of grouped insights in the scenario insight.
Gets or sets the unique identifier of the equipment associated with the insight.
Gets or sets the type of the insight.
Gets or sets the unique identifier of the floor associated with the insight.
Gets or sets a value indicating whether the insight contains diagnostics data.
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac", "sequenceNumber": null, "equipmentId": null, "twinId": null, "twinName": null, "type": "fault", "insightType": "standard", "category": "fault", "name": null, "description": null, "recommendation": null, "impactScores": null, "priority": 0, "lastStatus": "open", "state": "inactive", "createdDate": "2019-08-24T14:15:22Z", "updatedDate": "2019-08-24T14:15:22Z", "occurredDate": "2019-08-24T14:15:22Z", "detectedDate": "2019-08-24T14:15:22Z", "sourceType": "willow", "sourceId": null, "sourceName": null, "primaryModelId": null, "externalId": null, "externalStatus": null, "externalMetadata": null, "occurrenceCount": 0, "createdUserId": null, "ruleId": null, "ruleName": null, "newOccurrence": true, "previouslyIgnored": 0, "previouslyResolved": 0, "floorId": null, "reported": true, "commentCount": 0, "lastResolvedDate": null, "lastIgnoredDate": null, "locations": null, "locationDetails": null, "tags": null, "isDiagnosticsData": true, "ignoreUntil": null, "openTicketCount": 0, "completedTicketCount": 0, "closedTicketCount": 0, "ticketClosedDate": null, "ticketCompletedDate": null, "secondaryTwins": null, "recommendations": null, "dependencyCount": 0, "actionStatus": "needsAction", "actionStatusV2": "none", "scenarioId": null, "scenarioName": null, "firstExecutedCommandDate": null, "descriptionUpdatedDate": null, "twinsIncludedCount": null, "groupedInsightsCount": null }