Metrics (beta)

Patch metric group

PATCH
/api/v2/projects/{projectKey}/metric-groups/{metricGroupKey}

Patch a metric group by key. Updating a metric group uses a JSON patch representation of the desired changes.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string

The project key

Formatstring
metricGroupKey*string

The metric group key

Formatstring

Request Body

application/json

[index: integer]?

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/v2/projects/string/metric-groups/string" \  -H "Content-Type: application/json" \  -d '[    {      "op": "replace",      "path": "/name",      "value": "my-updated-metric-group"    }  ]'
{  "_id": "bc3e5be1-02d2-40c7-9926-26d0aacd7aab",  "key": "metric-group-key-123abc",  "name": "My metric group",  "kind": "funnel",  "description": "Description of the metric group",  "_links": {    "parent": {      "href": "/api/v2/projects/my-project",      "type": "application/json"    },    "self": {      "href": "/api/v2/projects/my-project/metric-groups/my-metric-group",      "type": "application/json"    }  },  "_access": {    "denied": [      {        "action": "string",        "reason": {          "resources": [            "proj/*:env/*;qa_*:/flag/*"          ],          "notResources": [            "string"          ],          "actions": [            "*"          ],          "notActions": [            "string"          ],          "effect": "allow",          "role_name": "string"        }      }    ],    "allowed": [      {        "action": "string",        "reason": {          "resources": [            "proj/*:env/*;qa_*:/flag/*"          ],          "notResources": [            "string"          ],          "actions": [            "*"          ],          "notActions": [            "string"          ],          "effect": "allow",          "role_name": "string"        }      }    ]  },  "tags": [    "ops"  ],  "_creationDate": "1628192791148",  "_lastModified": "1628192791148",  "maintainer": {    "key": "569fdeadbeef1644facecafe",    "kind": "member",    "_member": {      "_links": {        "self": {          "href": "/api/v2/members/569f183514f4432160000007",          "type": "application/json"        }      },      "_id": "569f183514f4432160000007",      "firstName": "Ariel",      "lastName": "Flores",      "role": "admin",      "email": "ariel@acme.com"    },    "_team": {      "customRoleKeys": [        "access-to-test-projects"      ],      "key": "team-key-123abc",      "_links": {        "property1": {          "href": "string",          "type": "string"        },        "property2": {          "href": "string",          "type": "string"        }      },      "name": "QA Team"    }  },  "metrics": [    {      "key": "metric-key-123abc",      "_versionId": "version-id-123abc",      "name": "Example metric",      "kind": "custom",      "isNumeric": true,      "unitAggregationType": "sum",      "analysisType": "mean",      "eventKey": "event-key-123abc",      "analysisUnit": "string",      "_links": {        "self": {          "href": "/api/v2/metrics/my-project/my-metric",          "type": "application/json"        }      },      "nameInGroup": "Step 1",      "randomizationUnits": [        "user"      ],      "analysisUnits": [        "user"      ]    }  ],  "_version": 1,  "experiments": [    {      "key": "experiment-key-123abc",      "name": "Example experiment",      "environmentId": "1234a56b7c89d012345e678f",      "environmentKey": "production",      "creationDate": "1654104600000",      "archivedDate": "1654104600000",      "_links": {        "parent": {          "href": "/api/v2/projects/my-project/environments/my-environment",          "type": "application/json"        },        "self": {          "href": "/api/v2/projects/my-project/environments/my-environment/experiments/example-experiment",          "type": "application/json"        }      }    }  ],  "experimentCount": 0,  "activeExperimentCount": 0,  "activeGuardedRolloutCount": 0}