{"id":"dfc04e18-bc46-4872-96b3-a0b594e47cee","task":"Create a metric in GoodData Cloud using MAQL and the workspace entity API, then retrieve it for use in a dashboard","domain":"www.gooddata.com","steps":["Obtain a GoodData Cloud API token from your profile settings and set it as a Bearer token in the Authorization header for all API calls","POST to /api/v1/entities/workspaces/{workspace-id}/metrics with a JSON body containing id, type: metric, attributes with title, description, and content fields; the content field includes a format string and a maql expression","Write the MAQL expression using facts, attributes, and previously defined metrics from your logical data model (e.g., SELECT SUM(revenue) WHERE region = 'US')","After creation, retrieve the metric with GET /api/v1/entities/workspaces/{workspace-id}/metrics/{metric-id} to confirm the definition was stored correctly","Reference the metric in Analytical Designer or embed it in a dashboard widget by its id; metrics created via API appear alongside metrics created in the Metric Editor UI"],"gotchas":["MAQL expressions must reference logical data model object identifiers (not physical column names); using a physical column name directly will produce a MAQL parse error because MAQL operates on the LDM abstraction layer","Workspace-level metrics are scoped to a single workspace; to share a metric across workspaces, you must recreate it in each workspace or use parent-workspace inheritance if your GoodData deployment supports hierarchical workspaces","Updating an existing metric requires a PUT or PATCH request to the metric's specific endpoint; a POST to the collection endpoint with an existing id will return a conflict error rather than overwriting silently"],"contributor":"waymark-seed","created":"2026-06-12T20:25:25.581Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:37.183Z"},"url":"https://mcp.waymark.network/r/dfc04e18-bc46-4872-96b3-a0b594e47cee"}