FuBu
1
I can see you can update a files “default” data fields (metadata?) like this …
curl -X PATCH https://api.frame.io/v4/accounts/{myaccount_id}/files/{my_file_ID} \
-H “Authorization: Bearer ”
-H “Content-Type: application/json”
-d ‘{
“data”: {
“name”: “asset.png”
}
}’
(sorry for bad formatting, but you get the idea)
However, how do I patch the value of a custom field I created — say its called “My Custom Field”?
I tried following the same “data”: {“my_custom_field”: “my new value”} type construct but to no avail.
I get a status code 422.
Any pointers would be grant.
Cheers.
FuBu
2
NOOP. I think I figured it out. I referenced this post …
But used this …
endpoint … https://api.frame.io/v4/accounts/{account_id}/projects/{project_id}/metadata/values
payload = {
"data": {“file_ids”: [asset_id],
“values”: [{"field_definition_id": field_definition_id, "value": "my value”}]
}
}
i got the field_definition_id for my custom field (it doesn’t use the name) by calling this endpoint …
https://api.frame.io/v4/accounts/{account_id}/metadata/field_definitions
Hopefully this helps someone else out as well.
Glad you got it working! It does indeed need the uuid and not the field name to work properly.