I’m probably missing something obvious, and it’s a case of the Friday afternoons… but using cURL I can easily create a new distribution record with a call like this:
curl --location --request POST ‘https://dss.aristotlecloud.io/api/v4/metadata/distribution’ --header ‘Authorization: Token enter_some_token_here’ --header ‘Content-Type: application/json’ --data-raw ‘{“name”: “TEST DISTRIBUTION”, “stewardship_organisation”: “id_here”, “workgroup”: 100, “definition”: “Testing distribution creation via API.”, “distributiondataelementpath_set”: [{“logical_path”: “PATH1”}],“customvalue_set”: [{“name”: “Physical Name”, “field”: 10, “content”: “PHYSICAL_NAME_HERE”}]}’
That works everytime. However I can’t seem to use a cURL PUT call to update the record just created.
If I try:
curl --location -X PUT ‘http://dss.aristotlecloud.io/api/v4/metadata/distribution/513af47e-06ee-11ec-baec-0a58a9feac02’ -H ‘accept: application/json’ -H ‘Content-Type: application/json’ -H ‘Authorization: Token some_token’ -d ‘{“name”: “NEW DISTRIBUTION TEST NAME”}’
But the error back is {“name”:[“This field is required.”]}. Yet I am specifying name…
Appreciate any help )