[KRATOS HTTP API] Hello, can anyone patch an ident...
# talk-kratos
b
[KRATOS HTTP API] Hello, can anyone patch an identity's metadata_admin attribute ? I can do it with metadata_public but it does not seem to work with metadata_admin, example :
[
{
"op": "add",
"path": "/metadata_public",
"value": {"test":"test"}
},
{
"op": "add",
"path": "/metadata_admin",
"value": {"test":"test"}
}
]
This adds the field in public correctly but ignores the operation in admin, without any error, it just does not do it
m
Hello Yunus. Are you hosting Ory Kratos yourself? In any case, it should be possible to patch like this. I just did a test with cUrl directly, and this is how my identity looks now:
I added the patched identity directly as identity.json to the curl request. Can you share your exact request, ideally so I can test it via cUrL?
b
this is my curl request :
curl --location --request PATCH 'http://127.0.0.1:4434/admin/identities/d7ab95bc-8b79-4ec0-b364-5811217420f9' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"op": "add",
"path": "/metadata_public",
"value": {"test":"test"}
},
{
"op": "add",
"path": "/metadata_admin",
"value": {"test":"test"}
}
]'