automatic-emailing

Create a filter for a dashboard in a scheduled email

When scheduling an email with dashboards and reports, you can choose to filter the dashboards before they are exported to PDF and sent to subscribers. Filters are defined in an execution context object, and you have to have this object created in your project before scheduling an email.

When defining a filter in an execution context object, you will need the attribute ID, the displayForm ID (label ID), and the attribute value IDs. For more information about those entities and how to find them, see Determine the Attribute Value ID.

Once you have an execution context object, you can add an executionContext parameter to the request body of the API call for scheduling an email and set it to the execution context URI:

"executionContext": "/gdc/md/{project_id}/obj/{execution_context_id}"

For more information about scheduling emails, see Schedule an email.

Request body parameters

  • dashboard (string) specifies the dashboard for which the execution context object is created.

  • id (string) specifies the identifier of a filter in the execution context object. Choose the identifier that makes sense for your project. Example: daily.reports.exec.context

post/gdc/md/{project_id}/obj/

Request

  • Base URL
    https://secure.gooddata.com
  • Auth
    none declared

Path parameters

project_idstring required

The project where the scheduled email for which you want to create an execution exists.

Request body

Example request

{
  "executionContext": {
    "filters": [
      {
        "uri": "/gdc/md/{project_id}/obj/{attribute_display_form_id1}",
        "constraint": {
          "type": "list",
          "elements": [
            "/gdc/md/{project_id}/obj/{attribute_id1}?id={element_id}"
          ]
        }
      }
    ],
    "user": "/gdc/account/profile/p123"
  }
}

Response

_

uristring uri required

Example response

{
  "uri": "/gdc/uri"
}

Changes

No recorded changes to this operation across all 1 revision of this API.