Get-RelativityMetric

Prev Next

Heads up!

Relativity metrics represent the most recent daily collected metrics over the last 30 days. If you are looking for more historical data represented monthly, check out the Get-RelativityMonthlyMetric cmdlet.

Summary

Retrieves an existing Relativity metric.

Get-RelativityMetric
    -Id

Returns a Relativity metric object.

Parameters

Parameter

Type

Required?

Notes

Id

Int32

Yes

The Relativity metric id.

Examples

Get an existing Relativity metric

This example retrieves a specific Relativity metric and outputs it as JSON.

# Retrieve a specific Relativity metric by id
$metric = Get-RelativityMetric -Id 56590

Write-Output "Retrieved Relativity metric '$($metric.FieldName)' (Id: #$($metric.RelativityMetricId), Report Period: $($metric.ReportPeriodYear)-$($metric.ReportPeriodMonth), Value: $($metric.ValueAsText))"

# For debug purposes, convert the entity to output as JSON so we can see the available fields
Write-Output ""
Write-Output "JSON Results:"

$jsonOutput = $metric | ConvertTo-Json -Depth 10

# Output the entity
Write-Output $jsonOutput

Execution results:

Retrieved Relativity metric 'Workspace Name' (Id: #56590, Report Period: 2025-12, Value: AGM v MGM - Review)

JSON Results:
{
  "RelativityMetricId": 56590,
  "ReportPeriodYear": 2025,
  "ReportPeriodMonth": 12,
  "MetricTimestamp": "2025-12-20T04:27:00+00:00",
  "RelativityUsageReportRequestId": 297,
  "UsageReportRequest": null,
  "UsageReportRequestKeyId": "df88d583-4f7f-43e2-a0ba-ac5b17d15a43",
  "UsageReportRequestName": "Generated by Agility Blue on 2025-12-21 10:00:07Z",
  "RelativityMetricFieldId": 2,
  "Field": null,
  "FieldMetricKeyId": "4b7a9d1f-8c3e-4e0c-8d2b-9a6a5c0f3e1a",
  "FieldName": "Workspace Name",
  "FieldDescription": "The name of the workspace.",
  "FieldOrigin": "Workspace Utilization",
  "FieldValueType": "Text",
  "FieldLayoutStyle": "Stat Row",
  "FieldLayoutPosition": 2,
  "WorkspaceArtifactId": 1021745,
  "ValueAsText": "AGM v MGM - Review",
  "ValueAsInt64": null,
  "ValueAsDouble": null,
  "ValueAsDateTime": null,
  "CreatedById": "510e109b-6ff5-4442-9670-cd5e3cd82a7a",
  "CreatedBy": null,
  "CreatedByFullName": "Max Miller",
  "CreatedOn": "2025-12-21T10:00:20.7200397+00:00",
  "LastUpdatedById": "510e109b-6ff5-4442-9670-cd5e3cd82a7a",
  "LastUpdatedBy": null,
  "LastUpdatedByFullName": "Max Miller",
  "LastUpdatedOn": "2025-12-21T10:00:20.7200397+00:00"
}