List Offered
GET
/users/{user_id}/metric-definitions/offered
const url = 'https://example.com/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metric-definitions/offered';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metric-definitions/offeredMetric types the user has data for but hasn’t defined yet, with their virtual default.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”user_id
required
User Id
string format: uuid
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Response List Offered Users User Id Metric Definitions Offered Get
Array<object>
OfferedMetricA metric Sesharo can offer from the user’s data but which has no definition yet — the “available to set up” list, carrying the virtual default so the editor can pre-fill it.
object
available_sources
required
Available Sources
Array<string>
category
required
Category
string
default_operator
required
Default Operator
string
default_sources
required
Default Sources
Array<string>
display_name
required
Display Name
string
metric_type_slug
required
Metric Type Slug
string
unit
required
Unit
string
Examplegenerated
[ { "available_sources": [ "example" ], "category": "example", "default_operator": "example", "default_sources": [ "example" ], "display_name": "example", "metric_type_slug": "example", "unit": "example" }]Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}