cURL create records work, but updating existing records refuse to play

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 ‘’ --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 ‘’ -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 :slight_smile: )

Hello Michael,

Could you potentially try using ‘https’ instead of ‘http’ and let me know if you have any issues?

We will ensure that future http requests are redirected to https to improve the user experience with the API.


1 Like