Update a Measurement Protocol secret on a GA4 stream
google-analytics.x.analyticsadmin-properties-datastreams-measurementprotocolsecrets-patchmeasurementProtocolSecrets.patch — Updates a measurement protocol secret.
- Price
- freeAt list price
- Success rate
- —No success-rate data yetLast 30 days · 0 calls
- Latency p50
- ——
- Last verified
- —Not verified yet
PATCHhttps://toolswitch.dev/v1/tools/google-analytics.x.analyticsadmin-properties-datastreams-measurementprotocolsecrets-patchBeta- Uses platform quota
- Synchronous response
- Reads public data
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| Path parameters | ||||
name | string | Required | Identifier. Resource name of this secret. This secret may be a child of any type of stream. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} | |
| Query parameters | ||||
updateMask | string | Optional | Required. The list of fields to be updated. Omitted fields will not be updated. | |
- Path parameters
namestringRequiredIdentifier. Resource name of this secret. This secret may be a child of any type of stream. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
- Query parameters
updateMaskstringOptionalRequired. The list of fields to be updated. Omitted fields will not be updated.
Code samples
Replace $TOOLSWITCH_KEY with the key you created in the console.
Beta
curl -X PATCH 'https://toolswitch.dev/v1/tools/google-analytics.x.analyticsadmin-properties-datastreams-measurementprotocolsecrets-patch' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"PATCH",
"https://toolswitch.dev/v1/tools/google-analytics.x.analyticsadmin-properties-datastreams-measurementprotocolsecrets-patch",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/google-analytics.x.analyticsadmin-properties-datastreams-measurementprotocolsecrets-patch", {
method: "PATCH",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());This gateway API is in beta; its URL and authentication may change. The example parameters are sample data. Calls are billed at free, including the service fee.