API DocsRESTReport template service

UpdateReportTemplate

Updates an existing report template using the list of fields specified in `update_mask`.

PATCH
/api/v1/report-templates

Request Body

application/jsonRequired

The request for a call to ReportTemplateService_UpdateReportTemplate to update a report template. When updating tags or rules, the update will perform a full replace. Additionally, when updating rules, only the rule ID or the rule client key is required, but it is okay to provide both. If some rules contain only client keys and others only rule IDs, they will be consolidated.

reportTemplate
Required
object

updateMask
Required
string

The list of fields to be updated. The fields available to be updated are name, archived_date, description, tags, and rules.

curl -X PATCH "<API_URL>/api/v1/report-templates" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "reportTemplate": {
      "reportTemplateId": "string",
      "organizationId": "string",
      "clientKey": "string",
      "name": "string",
      "description": "string",
      "archivedDate": "2019-08-24T14:15:22Z",
      "createdByUserId": "string",
      "modifiedByUserId": "string",
      "createdDate": "2019-08-24T14:15:22Z",
      "modifiedDate": "2019-08-24T14:15:22Z",
      "rules": [
        {
          "ruleId": "string",
          "ruleVersionId": "string",
          "ruleVersionNumber": 0,
          "clientKey": "string"
        }
      ],
      "tags": [
        {
          "tagName": "string"
        }
      ]
    },
    "updateMask": "string"
  }'

A successful response.

{
  "reportTemplate": {
    "reportTemplateId": "string",
    "organizationId": "string",
    "clientKey": "string",
    "name": "string",
    "description": "string",
    "archivedDate": "2019-08-24T14:15:22Z",
    "createdByUserId": "string",
    "modifiedByUserId": "string",
    "createdDate": "2019-08-24T14:15:22Z",
    "modifiedDate": "2019-08-24T14:15:22Z",
    "rules": [
      {
        "ruleId": "string",
        "ruleVersionId": "string",
        "ruleVersionNumber": 0,
        "clientKey": "string"
      }
    ],
    "tags": [
      {
        "tagName": "string"
      }
    ]
  }
}