OverviewProductsPlatformsAPI ReferenceResources
Automated Rules

List an ad rule's runs

GEThttps://zernio.com/api/v1/ads/rules/{ruleId}/runs

Lists a rule's scheduled runs, newest first: what each run evaluated, matched and did. Runs that changed something (or tried to) are kept permanently, also after the rule is deleted; runs that changed nothing are dropped after about 31 days. For every change across all rules, use GET /v1/ads/rules/activity.

PlatformsMetaGoogleTikTokLinkedInPinterestXReddit

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Path parameters

ruleIdstringRequired

Query parameters

Optional
limitintegerDefault 20
skipintegerDefault 0

Responses

Success· the request worked

Errors· the request failed

GET/v1/ads/rules/{ruleId}/runs
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adrules.listAdRuleRuns({  path: {    ruleId: 'rule_abc123',  },});console.log(data);
{  "runs": [    {      "id": "string",      "ranAt": "2019-08-24T14:15:22Z",      "outcome": "triggered",      "objectsEvaluated": 0,      "actedObjectIds": [        "string"      ],      "evaluation": {        "unreadObjects": 0,        "rule": {          "name": "string",          "profileId": "string",          "accountId": "string",          "platform": "string",          "platformAdAccountId": "string",          "level": "campaign"        },        "today": "2019-08-24",        "timezone": "string",        "timezoneAssumed": true,        "currency": "string",        "hourlyThrough": "2019-08-24T14:15:22Z",        "matched": [          {            "id": "string",            "name": "string",            "campaignId": "string",            "campaignName": "string",            "matched": true,            "group": "string",            "conditions": [              {                "metric": "spend",                "window": "today",                "op": ">",                "value": 0,                "compareTo": "string",                "of": "usual",                "actual": 0,                "met": true              }            ],            "readings": [              {                "metric": "string",                "window": "string",                "actual": 0              }            ]          }        ],        "matchedTotal": 0,        "actions": [          {            "objectId": "string",            "type": "pause",            "status": "done",            "reason": "string",            "previousDailyBudget": 0,            "newDailyBudget": 0,            "previousName": "string",            "newName": "string",            "previousBidAmount": 0,            "newBidAmount": 0,            "targetMetric": "cpa",            "previousTarget": 0,            "newTarget": 0          }        ],        "notification": {          "status": "done",          "reason": "string"        }      },      "error": "string"    }  ]}
OpenAPI specification
Was this page helpful?