Calculated Metrics API

Update an existing calculated metric

Changed on

The following fields can be modified through this endpoint: <br><b>name, description, definition, owner, dataview ID</b>

An 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>The response shows 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 includes these items:* ID, name, description, dataview ID, owner*

Other attributes can be optionally requested through the 'expansion' field as described in the GET endpoints. See GET "/calculatedmetrics" or GET "/calculatedmetrics/{id}" for more information.

put/calculatedmetrics/{id}

Request

  • Base URL: https://cja.adobe.io
  • URL: https://cja.adobe.io/calculatedmetrics/{id}
  • Auth: none declared. Required headers: Authorization, x-api-key, x-gw-ims-org-id

Path parameters

idstring required

Calculated metric ID to be updated

Query parameters

expansionstring[]

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

localestring

Locale

cachedtrue | false

Use cached results

Headers

Authorizationstring required

The access token copied from your CJA API client integration, prefixed with "Bearer ". For more information on how to obtain this value, see Getting started with the CJA API.

x-api-keystring required

The API key copied from your CJA API client integration. For more information on how to obtain this value, see Getting started with the CJA API.

x-gw-ims-org-idstring required

The Organization ID copied from your CJA API client integration. For more information on how to obtain this value, see Getting started with the CJA API.

Request body

rsidstring
dataIdstring
dataNamestring
idstring
namestring
descriptionstring
isDeletedboolean
migratedIdsstring[]
internalboolean
ownerobject
polarity'positive' | 'negative'

Sets metric polarity, indicating whether it's desirable or undesirable if a given metric goes up. Default=positive

precisioninteger

Number of decimal places to include in calculated metric result

type'CURRENCY' | 'TIME' | 'DECIMAL' | 'PERCENT'
definitionobject required

Calculated metric definition object

legacyIdstring
templateboolean
dataGroupstring
solutionboolean
curatedItemboolean
categoriesstring[]
reportTimeAttributionboolean
tagsobject[]
sharesobject[]
approvedboolean
favoriteboolean
usageSummaryobject
siteTitlestring
modifiedstring date-time

Response

Successful operation

rsidstring
dataIdstring
dataNamestring
idstring
namestring
descriptionstring
isDeletedboolean
migratedIdsstring[]
internalboolean
ownerobject
polarity'positive' | 'negative'

Sets metric polarity, indicating whether it's desirable or undesirable if a given metric goes up. Default=positive

precisioninteger

Number of decimal places to include in calculated metric result

type'CURRENCY' | 'TIME' | 'DECIMAL' | 'PERCENT'
definitionobject required

Calculated metric definition object

legacyIdstring
templateboolean
dataGroupstring
solutionboolean
curatedItemboolean
categoriesstring[]
reportTimeAttributionboolean
tagsobject[]
sharesobject[]
approvedboolean
favoriteboolean
usageSummaryobject
siteTitlestring
modifiedstring date-time

Changes

    • breaking

      removed the enum value reportSuiteName from the property items/ of the query request parameter expansion

    • warning

      removed the request property

    • warning

      removed the optional property from the response with the status

    • breaking

      added the new required header request parameter Authorization

    • breaking

      added the new required header request parameter x-api-key

    • breaking

      added the new required header request parameter x-gw-ims-org-id