Hello,
I triying Data Masking, with this documentation: https://cloud.google.com/apigee/docs/api-platform/security/data-masking
But, when I used "updateMask", the request is OK, but there is not any update in my data masking. Any suggestion about how I must use "updateMask"?
I sent:
curl "https://apigee.googleapis.com/v1/organizations/gdc-latam-apigee-internal-1/environments/dev/debugmas..." -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-type: application/json" -d '{
"requestJSONPaths": [
"$.store.book[*].date",
"$.store.book[*].version"
],
"variables": [
"request.header.via"
],
}'
updateMask
query parameter to specify a field mask that includes a comma-separated list of fully-qualified names of fields in the debug mask. For example: "requestJSONPaths"
Solved! Go to Solution.
> So, my question is what is the difference to send "updateMask" and not send it.
I think that if you do not include a field in "updateMask" then the field will not be updated. Right? I think that's how the API is defined. I am assuming that's how the service endpoint knows how to apply the PATCH request.
I think maybe you have a stray trailing comma. This works for me.
$ curl "https://apigee.googleapis.com/v1/organizations/$ORG/environments/$ENV/debugmask" \
-X PATCH -H "Authorization: Bearer $TOKEN" \
-H "Content-type: application/json" -d '{
"requestJSONPaths": [
"$.store.book[*].date",
"$.store.book[*].version"
],
"variables": [
"request.header.via"
]
}'
Thank you Dino. Without the comma it works. But, my question reffer to parameter "updateMask" in the URL, I've used "updateMask=requestJSONPaths", for example, when I specify requestJSONPaths, only updated this field, and it must to have all fields, ex. "updateMask=requestJSONPaths&updateMask=variables" to update all JSON request.
So, my question is what is the difference to send "updateMask" and not send it.
curl "https://apigee.googleapis.com/v1/organizations/$ORG/environments/$ENV/debugmask?updateMask=requestJS..." -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-type: application/json" -d '{
"requestJSONPaths": [
"$.store.book[*].tittle",
"$.store.book[*].ssb"
],
"variables": [
"request.header.ip"
]
}'
> So, my question is what is the difference to send "updateMask" and not send it.
I think that if you do not include a field in "updateMask" then the field will not be updated. Right? I think that's how the API is defined. I am assuming that's how the service endpoint knows how to apply the PATCH request.
I suppose that, although if it is not sent, it updates everything without problem. Thank you for your reply.