calculatedmetrics

Update an existing calculated metric

The following fields can be modified through this endpoint: <br><b>name, description, definition, owner, rsid</b> Example "defintion" for use in testing API below ("Visits per visitor"):<br> "definition": { "formula": { "func": "divide", "col1": { "func": "metric", "name": "metrics/visits", "description": "Visits" }, "col2": { "func": "metric", "name": "metrics/visitors", "description": "Unique Visitors" } }, "func": "calc-metric", "version": [ 1, 0, 0 ] }<br><br>Response will be the newly modified calculated metric object after the update request completes.<br><br><b><span style="text-decoration: underline;">CalculatedMetricResponse</span></b><br>A calculated metric response will always include these default items:* id, name, description, rsid, owner*

Other attributes can be optionally requested through the 'expansion' field as defined/documented in the GET endpoints (see GET "/calculatedmetrics" or GET "/calculatedmetrics/{id}" for more documentation).

put/calculatedmetrics/{id}

Path parameters

idstring required

Calculated Metric ID to be updated

Query parameters

localestring

Locale

expansionstring[]

Comma-delimited list of additional calculated metric metadata fields to include on response.

Request body

idstring

System generated id

namestring
descriptionstring
rsidstring

The report suite id for which the component was created/updated

reportSuiteNamestring

The report suite name for which the component was created/updated

polarity'positive' | 'negative'

Set metric polarity, which indicates whether it's good or bad if a given metric goes up. Default=positive

precisioninteger

Number of decimal places to include in calculated metric result

type'CURRENCY' | 'TIME' | 'DECIMAL' | 'PERCENT'
definitionCalculatedMetricDef required
categoriesstring[]
siteTitlestring
modifiedstring date-time
createdstring date-time

Calculated metric creation date

Response

successful operation

idstring

System generated id

namestring
descriptionstring
rsidstring

The report suite id for which the component was created/updated

reportSuiteNamestring

The report suite name for which the component was created/updated

polarity'positive' | 'negative'

Set metric polarity, which indicates whether it's good or bad if a given metric goes up. Default=positive

precisioninteger

Number of decimal places to include in calculated metric result

type'CURRENCY' | 'TIME' | 'DECIMAL' | 'PERCENT'
definitionCalculatedMetricDef required
categoriesstring[]
siteTitlestring
modifiedstring date-time
createdstring date-time

Calculated metric creation date

Changes