Get a metric value
/v1/metrics/{id}Shows how a value you sent was checked against your goal programs, and which of them it rewarded. Poll this after sending a value. Any key with metric:write in your company can read any value your company sent. It doesn't count toward the company read limit.
Needs a key with the metric:write scope.
Path parameters
idstringThe
idfrom Send a metric value.
Response
200: The value and how it was checked.
idstringThe ID of this reading.
employeeIdstringWho the value belongs to.
metricKeystringThe metric it was sent for.
valueintegerThe value that was sent.
statusenumpendingis recorded and waiting.processingis being checked against your programs.completedis checked.failedmeans the last check hit a problem on our side, and Teambrite keeps retrying for 24 hours, so there's no need to send it again.pendingprocessingcompletedfailedacceptedAtstringWhen Teambrite recorded it.
checkedAtstring or nullWhen the most recent check against your programs started or finished.
nullbefore the first one.programsarray of objectsEach goal program that was live and included this employee when the value arrived. Empty if there were none.
Errors
400API_QUERY_INVALID: A query parameter, or an ID in the path, is unknown or not in the right form.401API_KEY_INVALID: The key is missing, wrong, expired or revoked.403API_KEY_SCOPE_MISSING: The key is valid but wasn't given the scope this endpoint needs.PLAN_UPGRADE_REQUIRED: Your plan doesn't include the API.COMPANY_CLOSED: Your company has closed its Teambrite account.404METRIC_OBSERVATION_NOT_FOUND: Your company has no metric value with this ID.429API_KEY_RATE_LIMITED: The key is over 600 requests a minute.