{
  "url": "https://telipot.com/catalog/tasks/google-analytics.properties.metadata",
  "id": "google-analytics.properties.metadata",
  "name": "Dimensions and metrics a property offers, with custom ones",
  "provider": {
    "slug": "google-analytics",
    "name": "Google Analytics 4"
  },
  "capability": "analytics.properties.metadata",
  "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": "Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics property identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.",
  "method": "GET",
  "path": "/v1beta/properties/{propertyId}/metadata",
  "host": "https://analyticsdata.googleapis.com",
  "docsUrl": "https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/getMetadata",
  "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/; 0 lists only the dimensions and metrics common to every property"
    }
  ],
  "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/; 0 lists only the dimensions and metrics common to every property",
        "examples": [
          "123456789"
        ]
      }
    },
    "required": [
      "propertyId"
    ],
    "additionalProperties": false
  },
  "output": [
    {
      "name": "name",
      "type": "string",
      "description": "The resource name, properties/<id>/metadata"
    },
    {
      "name": "dimensions",
      "type": "object[]"
    },
    {
      "name": "metrics",
      "type": "object[]"
    }
  ],
  "outputSchema": {
    "type": "object",
    "required": [
      "name"
    ],
    "properties": {
      "name": {
        "type": "string",
        "description": "The resource name, properties/<id>/metadata"
      },
      "dimensions": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "apiName": {
              "type": "string",
              "description": "The name a report request uses"
            },
            "uiName": {
              "type": "string",
              "description": "The name Google Analytics shows"
            },
            "description": {
              "type": "string"
            },
            "category": {
              "type": "string"
            },
            "customDefinition": {
              "type": "boolean",
              "description": "True for a custom dimension"
            },
            "deprecatedApiNames": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      },
      "metrics": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "apiName": {
              "type": "string",
              "description": "The name a report request uses"
            },
            "uiName": {
              "type": "string",
              "description": "The name Google Analytics shows"
            },
            "description": {
              "type": "string"
            },
            "category": {
              "type": "string"
            },
            "type": {
              "type": "string",
              "description": "The kind of value such as TYPE_INTEGER"
            },
            "expression": {
              "type": "string",
              "description": "The formula of a derived metric"
            },
            "customDefinition": {
              "type": "boolean",
              "description": "True for a custom metric"
            },
            "deprecatedApiNames": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "blockedReasons": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  },
  "example": {
    "file": "examples/google-analytics.properties.metadata.json",
    "json": {
      "name": "properties/123456789/metadata",
      "dimensions": [
        {
          "apiName": "country",
          "uiName": "Country",
          "description": "The country the user activity came from.",
          "category": "Geography",
          "customDefinition": false
        },
        {
          "apiName": "customEvent:levels_unlocked",
          "uiName": "levels_unlocked",
          "description": "A custom event parameter.",
          "category": "Custom",
          "customDefinition": true
        }
      ],
      "metrics": [
        {
          "apiName": "activeUsers",
          "uiName": "Active users",
          "description": "The number of distinct users who visited the site or app.",
          "category": "User",
          "type": "TYPE_INTEGER",
          "customDefinition": false
        },
        {
          "apiName": "eventCount",
          "uiName": "Event count",
          "description": "The number of events.",
          "category": "Event",
          "type": "TYPE_INTEGER",
          "customDefinition": false
        }
      ]
    }
  },
  "commands": {
    "mode": "run",
    "cli": "telipot run google-analytics.properties.metadata \\\n  --input-json '{\"propertyId\":\"123456789\"}'",
    "http": "curl https://api.telipot.com/v1/tasks/google-analytics.properties.metadata/run \\\n  -H \"Authorization: Bearer $TELIPOT_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"propertyId\":\"123456789\"}'",
    "quote": "telipot run google-analytics.properties.metadata \\\n  --input-json '{\"propertyId\":\"123456789\"}' \\\n  --quote"
  },
  "siblings": []
}
