{
  "url": "https://telipot.com/catalog/capabilities/analytics.reports.compatibility",
  "id": "analytics.reports.compatibility",
  "description": "Which dimensions and metrics can join a report request",
  "platform": "analytics",
  "providers": [
    {
      "slug": "google-analytics",
      "name": "Google Analytics 4"
    }
  ],
  "tasks": 1,
  "taskPages": [
    {
      "id": "google-analytics.reports.compatibility",
      "name": "Dimensions and metrics compatible with a report's columns",
      "provider": {
        "slug": "google-analytics",
        "name": "Google Analytics 4"
      },
      "capability": "analytics.reports.compatibility",
      "platform": "analytics",
      "kind": "utility",
      "tier": "core",
      "identity": "account",
      "identityLabel": "Company account",
      "price": {
        "amount": "Free",
        "state": "free",
        "label": "Free",
        "detail": "Free from the tool",
        "type": "free"
      },
      "providers": 1,
      "retention": "standard",
      "runsOn": "free",
      "live": true,
      "summary": "This compatibility method lists dimensions and metrics that can be added to a report request and maintain compatibility. This method fails if the request's dimensions and metrics are incompatible. In Google Analytics, reports fail if they request incompatible dimensions and/or metrics; in that case, you will need to remove dimensions and/or metrics from the incompatible report until the report is compatible. The Realtime and Core reports have different compatibility rules. This method checks compatibility for Core reports.",
      "method": "POST",
      "path": "/v1beta/properties/{propertyId}:checkCompatibility",
      "host": "https://analyticsdata.googleapis.com",
      "docsUrl": "https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/checkCompatibility",
      "auth": {
        "scheme": "oauth",
        "label": "oauth · OAuth 2.0 with PKCE",
        "short": "oauth · OAuth 2.0"
      },
      "scope": "own_account",
      "principal": "organization",
      "requiredScopes": [
        "analytics.readonly"
      ],
      "verification": {
        "state": "none",
        "label": "Not verified yet",
        "detail": "Not checked yet. We test with a real request before we mark it."
      },
      "input": [
        {
          "name": "propertyId",
          "location": "pathParams",
          "type": "string",
          "required": true,
          "constraints": [],
          "note": "The numeric id of a GA4 property, as google-analytics.accounts.summaries returns it after properties/"
        },
        {
          "name": "dimensions",
          "location": "body",
          "type": "array",
          "required": false,
          "constraints": [],
          "note": "The dimensions already in the report, each an object with a name"
        },
        {
          "name": "metrics",
          "location": "body",
          "type": "array",
          "required": false,
          "constraints": [],
          "note": "The metrics already in the report, each an object with a name"
        },
        {
          "name": "dimensionFilter",
          "location": "body",
          "type": "object",
          "required": false,
          "constraints": [],
          "note": "The report's dimension filter, if it has one"
        },
        {
          "name": "metricFilter",
          "location": "body",
          "type": "object",
          "required": false,
          "constraints": [],
          "note": "The report's metric filter, if it has one"
        },
        {
          "name": "compatibilityFilter",
          "location": "body",
          "type": "string",
          "required": false,
          "constraints": [
            "one of \"COMPATIBLE\", \"INCOMPATIBLE\""
          ],
          "note": "Keep only the dimensions and metrics of this compatibility; COMPATIBLE lists those that can be added"
        }
      ],
      "sampleInput": {
        "propertyId": "123456789"
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "propertyId": {
            "type": "string",
            "description": "The numeric id of a GA4 property, as google-analytics.accounts.summaries returns it after properties/",
            "examples": [
              "123456789"
            ]
          },
          "dimensions": {
            "type": "array",
            "description": "The dimensions already in the report, each an object with a name",
            "examples": [
              [
                {
                  "name": "country"
                }
              ]
            ]
          },
          "metrics": {
            "type": "array",
            "description": "The metrics already in the report, each an object with a name",
            "examples": [
              [
                {
                  "name": "activeUsers"
                }
              ]
            ]
          },
          "dimensionFilter": {
            "type": "object",
            "description": "The report's dimension filter, if it has one"
          },
          "metricFilter": {
            "type": "object",
            "description": "The report's metric filter, if it has one"
          },
          "compatibilityFilter": {
            "type": "string",
            "description": "Keep only the dimensions and metrics of this compatibility; COMPATIBLE lists those that can be added",
            "enum": [
              "COMPATIBLE",
              "INCOMPATIBLE"
            ]
          }
        },
        "required": [
          "propertyId"
        ],
        "additionalProperties": false
      },
      "output": [
        {
          "name": "dimensionCompatibilities",
          "type": "object[]"
        },
        {
          "name": "metricCompatibilities",
          "type": "object[]"
        }
      ],
      "outputSchema": {
        "type": "object",
        "properties": {
          "dimensionCompatibilities": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "compatibility": {
                  "type": "string",
                  "description": "COMPATIBLE or INCOMPATIBLE"
                },
                "dimensionMetadata": {
                  "type": "object",
                  "properties": {
                    "apiName": {
                      "type": "string"
                    },
                    "uiName": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "category": {
                      "type": "string"
                    },
                    "customDefinition": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "metricCompatibilities": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "compatibility": {
                  "type": "string",
                  "description": "COMPATIBLE or INCOMPATIBLE"
                },
                "metricMetadata": {
                  "type": "object",
                  "properties": {
                    "apiName": {
                      "type": "string"
                    },
                    "uiName": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "category": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "customDefinition": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "example": {
        "file": "examples/google-analytics.reports.compatibility.json",
        "json": {
          "dimensionCompatibilities": [
            {
              "compatibility": "COMPATIBLE",
              "dimensionMetadata": {
                "apiName": "city",
                "uiName": "City",
                "description": "The city the user activity came from.",
                "category": "Geography",
                "customDefinition": false
              }
            }
          ],
          "metricCompatibilities": [
            {
              "compatibility": "COMPATIBLE",
              "metricMetadata": {
                "apiName": "sessions",
                "uiName": "Sessions",
                "description": "The number of sessions that began on the site or app.",
                "category": "Session",
                "type": "TYPE_INTEGER",
                "customDefinition": false
              }
            }
          ]
        }
      },
      "commands": {
        "mode": "run",
        "cli": "telipot run google-analytics.reports.compatibility \\\n  --input-json '{\"propertyId\":\"123456789\"}'",
        "http": "curl https://api.telipot.com/v1/tasks/google-analytics.reports.compatibility/run \\\n  -H \"Authorization: Bearer $TELIPOT_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"propertyId\":\"123456789\"}'",
        "quote": "telipot run google-analytics.reports.compatibility \\\n  --input-json '{\"propertyId\":\"123456789\"}' \\\n  --quote"
      },
      "siblings": []
    }
  ]
}
